-
Notifications
You must be signed in to change notification settings - Fork 11
tests(config-variations): Git schemes in repo URLs #490
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
base: master
Are you sure you want to change the base?
Conversation
… explicit VCS matches; update docs, tests, and create_project overloads
Reviewer's Guide by SourceryThis pull request adds support for parsing Git URLs in the SCP format (e.g., No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #490 +/- ##
==========================================
+ Coverage 54.09% 54.32% +0.22%
==========================================
Files 40 40
Lines 3627 3634 +7
Branches 793 794 +1
==========================================
+ Hits 1962 1974 +12
+ Misses 1314 1306 -8
- Partials 351 354 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tony - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a test case with
is_explicit=False
to ensure the regex patterns work as expected without explicit matching.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -68,6 +68,17 @@ def create_project( | |||
) -> HgSync: ... | |||
|
|||
|
|||
@t.overload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (complexity): Consider using a single function signature with union types to reduce overload duplication and simplify the API while maintaining functionality
You can reduce overload duplication by declaring a single function signature that uses the union types for both the parameter and the return value. For example, remove the extra overload and use this unified signature:
def create_project(
*,
url: str,
path: StrPath,
vcs: VCSLiteral | None = None,
progress_callback: ProgressCallbackProtocol | None = None,
**kwargs: t.Any,
) -> GitSync | HgSync | SvnSync:
...
This minimizes duplicate parameters and keeps the API clear while preserving all functionality.
Related to vcs-python/vcspull#49, vcs-python/vcspull#426
In main repo URLs:
Main repo URLs require
libvcs.url.git.GitURL
support:Scheme:
[email protected]:org/repo.git
Example:
[email protected]:tmux-python/tmuxp.git
Note: The workaround is to prepend
git+ssh://[email protected]:tmux-python/tmuxp.git
Summary by Sourcery
Add support for detecting and parsing Git URLs with SCP-style syntax (e.g., [email protected]:org/repo.git) in the libvcs library
New Features:
Enhancements:
Tests: