Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
api for copy ex function
  • Loading branch information
cadenmyers13 committed Oct 10, 2025
commit 120af0acc5bb7832dc8e4a5b1658eb43d1e49222
18 changes: 17 additions & 1 deletion src/diffpy/cmi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import argparse
from pathlib import Path
from shutil import copytree
from typing import List, Optional, Tuple
from typing import Dict, List, Optional, Tuple

from diffpy.cmi import __version__, get_package_dir
from diffpy.cmi.conda import env_info
Expand All @@ -25,6 +25,22 @@
from diffpy.cmi.profilesmanager import ProfilesManager


def copy_examples(
examples_dict: Dict[str, List[Tuple[str, Path]]], target_dir: Path = None
) -> None:
"""Copy an example into the the target or current working directory.

Parameters
----------
examples_dict : dict
Dictionary mapping pack name -> list of (example, path) tuples.
target_dir : pathlib.Path, optional
Target directory to copy examples into. Defaults to current
working directory.
"""
return


# Examples
def _get_examples_dir() -> Path:
"""Return the absolute path to the installed examples directory.
Expand Down