Skip to content

Conversation

@tony
Copy link
Member

@tony tony commented Dec 30, 2025

Summary

  • Rename _all parameters to descriptive names following Python community conventions (Django, pytest, Sphinx patterns)
  • Add get_ prefix to getter methods in sync/git.py for consistency
  • Document naming conventions in AGENTS.md for future development

Changes

cmd/git.py - Renamed _all parameters:

Method Old New
clone() _all all_branches
fetch() _all all_remotes
pull() _all all_remotes
help() _all show_all
rev_list() _all include_all_refs
remote.get_url() _all all_urls
stash.save() _all include_ignored
stash.push() _all include_ignored
branches.ls() _all all_branches

sync/git.py - Renamed getter methods:

Old New
remotes() get_remotes()
remote(name) get_remote(name)

Test plan

  • All 563 tests pass
  • mypy type checking passes
  • ruff linting passes
  • CHANGES updated with breaking changes
  • MIGRATION updated with migration guide

@codecov
Copy link

codecov bot commented Dec 30, 2025

Codecov Report

❌ Patch coverage is 61.90476% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.18%. Comparing base (de36b9c) to head (da3b88b).

Files with missing lines Patch % Lines
src/libvcs/cmd/git.py 14.28% 3 Missing and 3 partials ⚠️
src/libvcs/sync/git.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #507      +/-   ##
==========================================
- Coverage   53.22%   53.18%   -0.04%     
==========================================
  Files          38       38              
  Lines        5676     5676              
  Branches     1063     1063              
==========================================
- Hits         3021     3019       -2     
- Misses       2144     2145       +1     
- Partials      511      512       +1     

☔ 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 a commit that referenced this pull request Dec 30, 2025
why: Users need migration guidance for renamed parameters and methods.
what:
- Add Breaking changes section for API naming consistency
- Document all _all parameter renamings in cmd/git.py
- Document remotes() and remote() renames in sync/git.py
- Include migration examples with before/after code
tony added a commit that referenced this pull request Dec 30, 2025
why: Users need detailed migration guidance when upgrading.
what:
- Document _all parameter renamings with before/after examples
- Document remotes()/remote() getter method renames
- Include tables showing old vs new parameter/method names
@tony tony force-pushed the api-renaming-getters branch 2 times, most recently from c7e1f91 to 7ebe2ef Compare December 30, 2025 16:42
tony added 4 commits December 30, 2025 14:21
why: Document standard Python community patterns for API naming
what:
- Add get_* prefix convention for I/O methods
- Document descriptive parameter naming over _all style
- Include examples of good vs bad patterns
- Reference Django/pytest/Sphinx as precedent
why: Follow Python community conventions (Django/pytest/Sphinx patterns)
for clearer, more self-documenting APIs.
what:
- cmd/git.py: Rename _all parameters to descriptive names:
  - clone(_all) → all_branches
  - fetch(_all) → all_remotes
  - pull(_all) → all_remotes
  - help(_all) → show_all
  - rev_list(_all) → include_all_refs
  - get_url(_all) → all_urls
  - stash.save(_all) → include_ignored
  - stash.push(_all) → include_ignored
  - branch.ls(_all) → all_branches
- sync/git.py: Add get_ prefix to getter methods:
  - remotes() → get_remotes()
  - remote() → get_remote()
- Update all tests to use new API names
why: Users need migration guidance for renamed parameters and methods.
what:
- Add Breaking changes section for API naming consistency
- Document all _all parameter renamings in cmd/git.py
- Document remotes() and remote() renames in sync/git.py
- Include migration examples with before/after code
why: Users need detailed migration guidance when upgrading.
what:
- Document _all parameter renamings with before/after examples
- Document remotes()/remote() getter method renames
- Include tables showing old vs new parameter/method names
@tony tony force-pushed the api-renaming-getters branch from 585ecab to 1f490e2 Compare December 30, 2025 20:21
why: Document best practices for maintaining CHANGES and MIGRATION files.
what:
- Add section on file structure and purpose
- Document where to put PR references (in files, not commit messages)
- Explain rationale: avoid linkback notification noise in PRs
- Include examples for section headers and bullet items
@tony tony force-pushed the api-renaming-getters branch from 1f490e2 to da3b88b Compare December 30, 2025 20:30
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