-
Notifications
You must be signed in to change notification settings - Fork 60
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
Version handling #198
Merged
Merged
Version handling #198
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We are going to depend on packaging for converting to a PEP 440 compliant version.
Move a slightly modified version of get_version_from_pyproject_toml function to the utils module.
The pyproject.toml file is **NOT** contained in the distributed python package and therefore the version can't be loaded from the pyproject.toml file at all. As a result the version information must be set at two places 1. In the [tool.poetry] section of the pyproject.toml file 2. In a file within the installed and distributed python package
Convert verify-version.py into a more general utility to handle the version information in python-gvm.
Allow to call the module via python -m
These function as version relates thus they should be in the new version module.
Allow to reuse some of the code in external libraries and tools.
Also don't crash if version is not contained in [tool.poetry] section.
Rename check_version_is_pep440_compliant to is_version_pep440_compliant and add a testcase.
Don't add extra spaces at the end of the generated __version__.py file.
tomlkit allos to preserver the current structure and layout when saving the toml file.
Update the pyproject.toml version by reading and writing the file directly instread of calling poetry update.
Codecov Report
@@ Coverage Diff @@
## master #198 +/- ##
==========================================
- Coverage 91.59% 87.78% -3.82%
==========================================
Files 12 14 +2
Lines 1047 1146 +99
==========================================
+ Hits 959 1006 +47
- Misses 88 140 +52
Continue to review full report at Codecov.
|
wiegandm
approved these changes
Apr 2, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist: