feat: Add cross-platform copy_folder script - #37
Merged
Conversation
With a test suite in tests/run_copy_folder_tests.py, auto-discovered by tests/run_tests.py so it runs on PR checks with the rest of the tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #36 (merged to main by mistake, then main was reset — retargeting to
dev).Summary
skills/render-spec/scripts/copy_folder.py: copies complete folder contents to a destination (two args: source, destination), stdlib-only viashutil.copytree(..., dirs_exist_ok=True), works identically on macOS/Linux/Windows. Creates destination (incl. missing parents) if absent, merges/overwrites if present. Requires Python 3.8+ (matches skill's declared minimum).cp -r.node_modules/,.venv/,__pycache__/, …) while keeping dependency manifests and lock files.Testing
tests/run_copy_folder_tests.py(12 assertions, harness style): fresh copy incl. missing parents, merge keeps unrelated files and overwrites same-name files, missing/non-directory source exits 1, usage errors exit 2. Auto-discovered bytests/run_tests.py, so it runs on PR checks with the rest of the tests.🤖 Generated with Claude Code