Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
17e3747
rm api from cli.py
cadenmyers13 Oct 20, 2025
82f7394
add copy_examples api to packsmanager
cadenmyers13 Oct 20, 2025
d973c83
add tests for copy_examples
cadenmyers13 Oct 20, 2025
375606c
add additional dirs to temp structure
cadenmyers13 Oct 20, 2025
711c24e
rm old tests
cadenmyers13 Oct 20, 2025
987c3e3
add news
cadenmyers13 Oct 20, 2025
9e65a27
glob only files and not dirs
cadenmyers13 Oct 20, 2025
5354831
fix target dir location to be under cwd and change name for new test …
cadenmyers13 Oct 22, 2025
47d87fb
Add additional test case, fix how copy location is tested
cadenmyers13 Oct 22, 2025
0a490b9
copy_examples function
cadenmyers13 Oct 22, 2025
6e2695d
rm error message function
cadenmyers13 Oct 23, 2025
e96988f
add test for forced overwrite of copied files
cadenmyers13 Oct 23, 2025
abfba68
Add 'force' param to copy_examples
cadenmyers13 Oct 23, 2025
d4cddf5
fix copy_tree to handle warnings and errors properly
cadenmyers13 Oct 27, 2025
38881b8
Merge branch 'main' of github.com:diffpy/diffpy.cmi into copy-func-test
cadenmyers13 Oct 28, 2025
f4fe605
pin workflow to python 3.13
cadenmyers13 Oct 30, 2025
07cbcd7
add test for force and non-force to make sure files are copied correctly
cadenmyers13 Oct 31, 2025
078b13c
update copy_tree_to_target to handle different copying cases
cadenmyers13 Oct 31, 2025
e7444d7
capture warning output in print statement
cadenmyers13 Oct 31, 2025
c792c0b
add rich to conda.txt
cadenmyers13 Oct 31, 2025
7d7a2a3
add UC comments
cadenmyers13 Oct 31, 2025
52a6752
use ANSI color code for now
cadenmyers13 Oct 31, 2025
611bdf5
rm rich from reqs
cadenmyers13 Oct 31, 2025
d6f34e0
Rm colors from print
cadenmyers13 Oct 31, 2025
087851b
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Oct 31, 2025
87c1f43
rm color from test
cadenmyers13 Nov 1, 2025
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
Prev Previous commit
Next Next commit
add copy_examples api to packsmanager
  • Loading branch information
cadenmyers13 committed Oct 20, 2025
commit 82f7394c6f655fa7475db32bee0ef610d1efc41d
18 changes: 18 additions & 0 deletions src/diffpy/cmi/packsmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,24 @@ def available_examples(self) -> dict[str, List[tuple[str, Path]]]:
)
return examples_dict

def copy_examples(
self,
examples_to_copy: List[str],
target_dir: Path = None,
) -> None:
"""Copy examples or packs into the target or current working
directory.

Parameters
----------
examples_to_copy : list of str
User-specified pack(s), example(s), or "all" to copy all.
target_dir : pathlib.Path, optional
Target directory to copy examples into. Defaults to current
working directory.
"""
return

def _resolve_pack_file(self, identifier: Union[str, Path]) -> Path:
"""Resolve a pack identifier to an absolute .txt path.

Expand Down