-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refactor release modules #80
Refactor release modules #80
Conversation
Update the release module to be more precise about which parameters the commands prepare, release and sign require. This will simplify using pontos release.
Re-arange tests into three different testcase classes reflecting the commands prepare, release and sign.
Codecov Report
@@ Coverage Diff @@
## master #80 +/- ##
==========================================
+ Coverage 94.05% 94.14% +0.08%
==========================================
Files 29 29
Lines 1514 1502 -12
==========================================
- Hits 1424 1414 -10
+ Misses 90 88 -2
Continue to review full report at Codecov.
|
git_space=release_info.space, | ||
release_version, | ||
project, | ||
git_tag_prefix=git_tag_prefix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is (now) already a default value in the argparser, so in add_skeleton
we probably do not need the default value anymore. (https://github.com/greenbone/pontos/blob/master/pontos/changelog/changelog.py#L50)
(Same for the git_space
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally i would keep it because these are independent modules.
help='Will release changelog as version. Must be PEP 440 compliant', | ||
required=True, | ||
) | ||
sign_parser.add_argument( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this argument is in all subparsers. Why not add it to the parent parser and save some code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally i wanted to avoid --release-version foo prepare --next-version bar
because it wont be possible to use prepare --release-version foo --next-version bar
otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah.Ok!
The main requests module already provides the request api.
Add missing typings for the return values of prepare, release and sign functions.
Use a single constant variable to the release file name. This allows for easier changing the file name and avoids typos.
What:
Update the release module to be more precise about which parameters the
commands prepare, release and sign require. This will simplify using
pontos release.
Why:
Be more explicit about which parameter is required for which command and therefore show a better --help
How:
Checklist: