-
Notifications
You must be signed in to change notification settings - Fork 14
New commands: import
, import --scan
, fmt
#465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
This comment was marked as outdated.
This comment was marked as outdated.
add
and add-from-fs
add
and add-from-fs
a36fbef
to
69a222e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #465 +/- ##
==========================================
+ Coverage 78.93% 80.23% +1.29%
==========================================
Files 8 9 +1
Lines 413 597 +184
Branches 85 134 +49
==========================================
+ Hits 326 479 +153
- Misses 52 67 +15
- Partials 35 51 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d37cb7e
to
628830e
Compare
e85482d
to
e26036d
Compare
740c98c
to
1045626
Compare
b02d442
to
27d3297
Compare
f310106
to
9c5c92e
Compare
5149ebd
to
095d919
Compare
0499067
to
f67766f
Compare
aefcf5a
to
c5dfc5e
Compare
28b332d
to
013bd1d
Compare
add
and add-from-fs
add
, add-from-fs
, fmt
tony
added a commit
that referenced
this pull request
Oct 18, 2025
…mand why: Align with infrastructure-as-code terminology (e.g., Terraform import) and improve clarity by using a single command that better communicates the operation: importing repositories into vcspull configuration. what: - Rename add.py → _import.py (leading underscore avoids Python keyword) - Merge add_from_fs.py functionality into _import.py - Unify commands: add → import, add-from-fs → import --scan - Update all test fixtures and test names to use import terminology - Update logging tests to reflect new module names - All 132 tests passing, linting and type checking clean refs: #465
add
, add-from-fs
, fmt
import
, import --scan
, fmt
0616efd
to
1a16c43
Compare
eae7027
to
63ccf57
Compare
why: - expose configuration management (import, import --scan, fmt) through the main CLI - keep user-facing output visible after the logging refactor - ensure default config readers use UTF-8 consistently what: - wire import/import --scan/fmt subcommands into `vcspull` CLI entry and parser - implement `cli/import_.py`, `cli/fmt.py` plus extensive tests - centralize config saves via `save_config_yaml` and open configs as UTF-8 - refactor `setup_logger` to replace NullHandler with stdout stream and add regression test for CLI output - expand logging test suite to cover formatter and propagation behavior This keeps the subject succinct while the bullets break down the “why/what” of the large diff. Adjust component prefixes as needed if you prefer more granularity (e.g., separate commits per concern), but this structure documents all the key changes in one place.
why: surface import and fmt workflows introduced alongside scanner support. what: - link new cli pages in command toctrees - document manual import, --scan options, and fmt usage - reference new commands from quickstart guidance
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.
Changes
New: Added
vcspull import
import
command.vcspull import <name> <url>
--dir
/--path
helpers for base directory detectionuv run vcspull import myrepo [email protected]:user/myrepo.git --dir ~/code
vcspull import --scan <dir>
--recursive
/-r
--yes
for unattended runs--base-dir-key
uv run vcspull import --scan ~/study/typescript --recursive --yes
New: Added
vcspull fmt
fmt
subcommand to normalize configuration files (sort directories/repos, convert compact entries to verbose{repo: ...}
form, and standardize keys).uv run vcspull fmt --config ~/.vcspull.yaml --write
Logging Improvements
test_import_scan_stream_output
to guarantee user-facing output remains visible.Config & CLI Enhancements
ConfigReader
now reads files using UTF-8 explicitly.save_config_yaml
centralizes YAML writes with UTF-8 encoding._import.py
(leading underscore) avoids Python'simport
keyword conflict.Fixes: #25, #333
Testing
uv run ruff check . --fix --show-fixes
uv run mypy
uv run pytest
(132 tests passing)Additional Notes
import
clearly communicates bringing repositories under vcspull management, whether manually specified or discovered from the filesystem.