feat: CLI v2, write-target policy, and README update#4
Merged
Conversation
…ngs init - open projectpath: add click.Path(file_okay=False, resolve_path=True) for dir-only completion - new base arg: add shell_complete=_complete_templates - edit/open template args: completion coverage confirmed and tested - Banner: shown in --help and bare devcode via _DevCodeGroup.format_help(); trailing newline added - completion subcommand: devcode completion bash/zsh/fish prints eval string; README updated - settings init: _DevCodeGroup.main() calls _load_settings() before any Click processing
… list replaces ps
… setting, XDG default - Add _resolve_write_target(path_override) with three-tier priority: --path flag > settings.template_write_dir > XDG_DATA_HOME default - Add --path option to `template new` for per-invocation override - Add template_write_dir to _DEFAULT_SETTINGS (None = use XDG) - Warn when write dir is not in template_sources (template won't be discoverable) - resolve_template_search_path now returns realpath'd entries for consistent comparison - Remove _write_template_dir() (replaced by _resolve_write_target)
- Rewrite API section for full CLI v2 command tree (template group, source subcommands, prune, list replaces ps) - Fix section order per standard-readme spec (extra sections before API) - Add template_write_dir to Configuration section - Rename Prerequisites to Dependencies, add LICENSE link, fix Contributing - Fix pre-existing lint and mypy errors in devcode.py and tests - Add ruff and mypy to dev dependencies in pyproject.toml
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4 +/- ##
==========================================
+ Coverage 94.05% 94.47% +0.42%
==========================================
Files 1 1
Lines 538 670 +132
==========================================
+ Hits 506 633 +127
- Misses 32 37 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Wrap expected paths in os.path.realpath() for symlink/short-name resolution - Use os.path.join() instead of hardcoded Unix-style slashes - Replace fake Unix paths in source add/remove tests with real temp dirs
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.
Summary
templatecommand group,sourcesubcommands,prune,listreplacesps--help, settings init improvements--pathflag ontemplate new,template_write_dirsetting, XDG defaultruffandmypyto dev dependenciesTest Plan
make allpasses (lint, typecheck, 249 tests)devcode --helpshows new command tree (template,list,prune,completion)devcode template new --path /tmp/test mytemplatewrites to the specified path