Skip to content

Conversation

@YazdanRa
Copy link

@YazdanRa YazdanRa commented Dec 10, 2025

Description

Added a new version scheme for monotonic single number versions. e.g. v1 -> v2 -> v3 -> ...

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
  • Check and fix any broken links (internal or external) in the documentation

Expected Behavior

In some scenarios, we have to use a single number as our version that increases as code progress. For these kind of verions that doesn't follow a 3 part section, I introduced a new version_scheme called monotonic which increases the version by 1 in any situation.
Furthermore, we can generate changelog for repos with monotonic tags.

Steps to Test This Pull Request

  1. Running new unit tests.
  2. Install the new artifact via pip install https://github.com/YazdanRa/commitizen/releases/download/v4.10.0b1/commitizen-4.10.0.tar.gz.
  3. Update the pyproject.toml file with version_scheme = "monotonic" or use the --version-scheme=monotinic param.

Additional Context

#1704
I have added this feature for our own use, in some scenarios we have to use a monotonic version to be in sync with our registry.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.68%. Comparing base (120d514) to head (d5d3b5f).
⚠️ Report is 861 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1705      +/-   ##
==========================================
+ Coverage   97.33%   98.68%   +1.34%     
==========================================
  Files          42       60      +18     
  Lines        2104     2665     +561     
==========================================
+ Hits         2048     2630     +582     
+ Misses         56       35      -21     
Flag Coverage Δ
unittests 98.68% <100.00%> (+1.34%) ⬆️

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.

@YazdanRa YazdanRa marked this pull request as ready for review December 10, 2025 05:11
@YazdanRa YazdanRa force-pushed the feature/single-number-version branch from 03899d1 to d5d3b5f Compare December 10, 2025 18:22
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.

1 participant