-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Docs for Fall back to PEP 621 project.version #307
Conversation
updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.6 → v0.9.7](astral-sh/ruff-pre-commit@v0.9.6...v0.9.7) - [github.com/jsh9/pydoclint: 0.6.0 → 0.6.2](jsh9/pydoclint@0.6.0...0.6.2)
…ible When determining the current version, and if `tool.bumpversion.current_version` is not set, attempt to retrieve the version from `project.version` à la PEP 621. If that setting is not set, or if the version is explicitly marked as dynamically set, then continue with querying SCM tags. When updating the configuration during bumping, if we previously successfully retrieved a PEP 621 version, then update the `project.version` field in `pyproject.toml` as well. We always update, even if the true current version was read from `tool.bumpversion.current_version` instead of `project.version`. The docs have been updated; specifically, the "multiple replacements in one file" howto and the reference for `current_version`. The tests have been adapted: the new `pep621_info` property would otherwise trip up the old test output, and the `None` default would trip up the TOML serializer. Additionally, new tests assert that `project.version` (and correspondingly, the `pep621_info` property) is correctly honored or ignored, depending on the other circumstances.
If the current version is explicitly left empty during the `sample-config` questionnaire, the resulting `tool.bumpversion` table now lacks a `current_version` key, and will fall back to PEP 621 `project.version` (if not dynamic). The instruction text specifically hints at this new functionality.
Fall back to PEP 621 `project.version` before consulting SCM tags
Version hint: minor Comment ID: Display the version hint-auto-generated |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #307 +/- ##
==========================================
+ Coverage 93.63% 93.99% +0.35%
==========================================
Files 29 29
Lines 1918 1948 +30
Branches 198 204 +6
==========================================
+ Hits 1796 1831 +35
+ Misses 92 89 -3
+ Partials 30 28 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
[pre-commit.ci] pre-commit autoupdate
The tests are pretty much the same but renamed for clarity.
Tweaks on the documentation for PR #306.