-
Notifications
You must be signed in to change notification settings - Fork 10
Allow local version for PEP440 #335
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
Conversation
WalkthroughWalkthroughThe recent changes introduce enhanced functionality for parsing and handling PEP 440 compliant version strings. This includes the addition of new regex patterns for local versions, updated test cases, and new version fields to manage detailed version information. Changes also involve new classes and functions to handle these version strings more effectively and with greater granularity. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant VersionParser
participant RegexUtils
participant VersionInfo
User->>VersionParser: parse_version("1.0+local.1.2.3")
VersionParser->>RegexUtils: match_pattern("1.0+local.1.2.3")
RegexUtils-->>VersionParser: matched_groups
VersionParser->>VersionInfo: new VersionInfo(matched_groups)
VersionInfo-->>VersionParser: parsed_version
VersionParser-->>User: return parsed_version
sequenceDiagram
participant User
participant VersionParser
participant PEP440Version
participant VersionInfo
User->>VersionParser: parse_pep440_version_string("1.0rc1+local.1.2.3")
VersionParser->>PEP440Version: new PEP440Version("1.0rc1+local.1.2.3")
PEP440Version-->>VersionParser: extracted_version_info
VersionParser->>VersionInfo: new VersionInfo(extracted_version_info)
VersionInfo-->>VersionParser: parsed_version
VersionParser-->>User: return parsed_version
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (5)
Additional context usedRuff
Additional comments not posted (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
|
@coderabbitai review |
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.
Actionable comments posted: 0
Outside diff range comments (2)
tests/test_strategy.py (2)
Line range hint
11-11: Correct the type for@pytest.mark.parametrize.The first argument should be a tuple to match the expected type.
- @pytest.mark.parametrize( + @pytest.mark.parametrize((
Line range hint
104-113: Usage ofassertin tests should be handled cautiously.Although using
assertdirectly in tests is common, consider wrapping these in a more descriptive testing framework or function for better error messaging and maintainability.
Proposed change
PEP440 allows for local versions, this is now added here as well.
Doc: https://peps.python.org/pep-0440/#local-version-identifiers
Type of change
Additional information
Checklist
make lint)