config, version_variables: allow @ as separator and v to precede the version#1185
config, version_variables: allow @ as separator and v to precede the version#1185codejedi365 merged 4 commits intopython-semantic-release:masterfrom benedikt-hess-km:master
Conversation
|
formatted the tests with ruff. all tests should pass now |
…`@` symbol separator Resolves: #1156
… `@` separator usage
There was a problem hiding this comment.
@benedikt-hess-km, thanks for the great work. I kinda went overboard as I was trying to help fully implement the tag_format support and thanks to you for motivating me to refactor the Declaration classes. I ended up going so far that I had to re-organize the commits to slice out the v? portion you had so I'm sorry that it doesn't look the same any more but I transplanted your authorship to the @ symbol part (just in a different file), tests, and docs.
|
I am glad i could help! Don't worry about refactoring my code! The whole reason i spitted my proposed changes into multiple commits was so you could pick whatever you liked! |
🎉 This PR has been published as part of Version 9.20.0 🎉You can find more information about this release on the GitHub Releases page. |
Purpose
As discussed in #1156 and #846, this adds two features to the version_variables configuration:
E.g. when running psr with the following configuration
and there is a
my-versions.txtwith contentand the new version is
2.3.4the content ofmy-versions.txtwill be:Rationale
Simple adaption of the regex did the trick
How did you test?
Unittesting was not easy as the implementation was entangled with other code. Therefore I did multiple commits:
Regarding the e2e tests: The tests are massive. I don't know where (and how i can expand those). I you point me to the right direction, i will add those tests.
How to Verify
The new documentation gives an example how to configure
PR Completion Checklist
Reviewed & followed the Contributor Guidelines
Changes Implemented & Validation pipeline succeeds
Commits follow the Conventional Commits standard
and are separated into the proper commit type and scope (recommended order: test, build, feat/fix, docs)
Appropriate Unit tests added/updated
Appropriate End-to-End tests added/updated
Appropriate Documentation added/updated and syntax validated for sphinx build (see Contributor Guidelines)