Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

feat(bump_rule): add BumpRule, VersionIncrement, Prerelease Enum #1518

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

Open
wants to merge 1 commit into
base: v4-9-0-test
Choose a base branch
from

Conversation

bearomorphism
Copy link
Contributor

Related issue: #129
Original PR: #1431

Description

Please see bump_rule.py, bump.py, cz/base.py, version_scheme.py and commands/bump.py (~350 lines).
The rest 1000+ lines are just tests and renaming.

  • Rewrote the bump pattern matching mechanism to make the algorithm more strict and maintainable.
  • Maintained backward compatibility with CustomBumpRule.
  • Simplified code.
  • Added a new Enum class SemVerIncrement and replace MAJOR, MINOR, PATCH with the Enum.
  • Now Prerelease is Enum.
  • Simplify find_increment logic in SemVerIncrement.get_highest_by_messages.
    • find_increment was the combination of 2 features: "finding the highest semantic version increment" and "parsing the semantic version increment from each git commit message".

Checklist

Code Changes

  • Add test cases to all the changes you introduce
  • Run poetry all locally to ensure this change passes linter check and tests
  • Manually test the changes:
    • Verify the feature/bug fix works as expected in real-world scenarios
    • Test edge cases and error conditions
    • Ensure backward compatibility is maintained
    • Document any manual testing steps performed
  • Update the documentation for the changes

Documentation Changes

  • Run poetry doc locally to ensure the documentation pages renders correctly

Expected Behavior

Steps to Test This Pull Request

Additional Context

@Lee-W Lee-W added this to the 4.9.0 milestone Jun 9, 2025
@bearomorphism bearomorphism force-pushed the bump-rule-interface branch from bb305ad to 8a6c84f Compare June 9, 2025 15:53
Copy link

codecov bot commented Jun 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.01%. Comparing base (120d514) to head (8dd8d42).
Report is 744 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1518      +/-   ##
==========================================
+ Coverage   97.33%   98.01%   +0.67%     
==========================================
  Files          42       59      +17     
  Lines        2104     2768     +664     
==========================================
+ Hits         2048     2713     +665     
+ Misses         56       55       -1     
Flag Coverage Δ
unittests 98.01% <100.00%> (+0.67%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@bearomorphism bearomorphism force-pushed the bump-rule-interface branch from 8a6c84f to 8dd8d42 Compare June 9, 2025 16:04
@Lee-W Lee-W changed the base branch from master to v4-9-0-test June 10, 2025 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants