Skip to content

Commit 120af0a

Browse files
committed
api for copy ex function
1 parent c6f5fbf commit 120af0a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/diffpy/cmi/cli.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import argparse
1717
from pathlib import Path
1818
from shutil import copytree
19-
from typing import List, Optional, Tuple
19+
from typing import Dict, List, Optional, Tuple
2020

2121
from diffpy.cmi import __version__, get_package_dir
2222
from diffpy.cmi.conda import env_info
@@ -25,6 +25,22 @@
2525
from diffpy.cmi.profilesmanager import ProfilesManager
2626

2727

28+
def copy_examples(
29+
examples_dict: Dict[str, List[Tuple[str, Path]]], target_dir: Path = None
30+
) -> None:
31+
"""Copy an example into the the target or current working directory.
32+
33+
Parameters
34+
----------
35+
examples_dict : dict
36+
Dictionary mapping pack name -> list of (example, path) tuples.
37+
target_dir : pathlib.Path, optional
38+
Target directory to copy examples into. Defaults to current
39+
working directory.
40+
"""
41+
return
42+
43+
2844
# Examples
2945
def _get_examples_dir() -> Path:
3046
"""Return the absolute path to the installed examples directory.

0 commit comments

Comments
 (0)