Skip to content

Conversation

@tony
Copy link
Member

@tony tony commented Nov 2, 2025

Changes

Improvements

  • Require a repository path for vcspull add, automatically deriving the
    name, remote, and workspace parent while offering --url and --name
    overrides
  • Shorten config-path log output (e.g., ~/.vcspull.yaml) so dry-run previews
    stay readable even when the config lives under the home directory.

Development

  • Normalise CLI log snapshots to replace volatile line numbers with
    placeholders, preventing future refactors from breaking Syrupy expectations

Test plan

uv run ruff check . --fix --show-fixes
uv run ruff format .
uv run mypy
uv run py.test

tony added 2 commits November 2, 2025 16:19
why: Explicit name+URL args allowed inconsistent workspace inference and bypassed confirmations, losing repos under './'.

what:
- drop the name positional, keeping path input as the single required argument
- reuse optional --url/--name overrides while sharing the path-based workflow
- ensure workspace defaults to the checkout parent unless --workspace overrides
why: Removing the name positional changes CLI prompts and URLs; tests need to validate --url overrides and avoid brittle line-number churn.

what:
- add fixtures covering explicit URL overrides while continuing merge toggles
- scrub add.py line numbers from captured logs before snapshotting
- refresh syrupy snapshots to assert the new log text
@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.10%. Comparing base (ebaf90a) to head (e2d16bf).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
src/vcspull/cli/add.py 88.88% 1 Missing ⚠️
src/vcspull/cli/discover.py 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #481      +/-   ##
==========================================
+ Coverage   78.82%   79.10%   +0.27%     
==========================================
  Files          13       13              
  Lines        1738     1737       -1     
  Branches      369      369              
==========================================
+ Hits         1370     1374       +4     
+ Misses        232      229       -3     
+ Partials      136      134       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

tony added 4 commits November 2, 2025 16:37
why: CLI accepted name+URL combinations that bypassed the path-first flow, leaving repos under './' and skipping confirmations.

what:
- replace the positional name/url pair with a single repo_path argument plus optional --url/--name overrides
- default workspace detection to the directory parent and contract saved config paths with contract_user_home
why: New CLI behavior needs regression coverage for relative paths, workspace overrides, tilde log output, and legacy positional rejection.

what:
- extend path fixtures to toggle relative inputs, workspace overrides, and dry-run tilde assertions
- normalize logs for snapshots while preserving contracted config paths when required
- add unit checks for dry-run logging and parser rejection of extra positional args
why: Ruff refactors change discover.py line numbers, causing snapshot churn and breaking pytest whenever logging shifts.

what:
- normalize captured logs to replace discover.py:<digits> with a stable placeholder before snapshot assertions
- refresh the affected Syrupy snapshot to match the normalized format
why: The name+URL syntax lived in released notes already; we need to log the new positional path requirement in the unreleased section and refresh user docs.

what:
- describe the path-first workflow under the unreleased changelog heading
- rewrite the add command guide and README bullets around path detection, --url, and --name overrides

Also, Document vcspull add path-first work

why: Release notes should reflect the path-only CLI change and the log normalization fixes shipped in PR #481.

what:
- attribute the path-first improvements to #481 and note the tilde-config logging tweak
- call out the snapshot stabilization work under a Development heading
@tony tony merged commit 6341f20 into master Nov 2, 2025
9 checks passed
@tony tony deleted the vcspull-add-bug branch November 2, 2025 22:42
tony added a commit that referenced this pull request Nov 4, 2025
why: path-first workflow should not create stray ./ workspaces.
what:
- always prefer tilde labels unless CLI requests ./ explicitly
- write duplicate sections using ordered loader items without config_items
- expand CLI coverage for dot workspace scenarios

refs: #483, #482, #481, #480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants