-
Notifications
You must be signed in to change notification settings - Fork 206
feat: nf-core modules bump-version supports specifying the toolkit #3608
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
base: dev
Are you sure you want to change the base?
Conversation
Tools like picard, fgbio, and samtools all have sub-commands. It is onerous to have to update them all individually using nf-core modules bump-version. This change allows the module name to update to have a trailing forward slash, which will be interpreted as specifying that all subcommands should be updated. E.g. nf-core modules bump-version samtools/
This comment was marked as outdated.
This comment was marked as outdated.
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.
Thanks for the PR.
Could you please also add a unit test for this?
2753566
to
2052819
Compare
2052819
to
a5b9730
Compare
nf_core/modules/bump_versions.py
Outdated
module: Union[str, None] = None, | ||
all_modules: bool = False, | ||
show_uptodate: bool = False, | ||
_dryrun: bool = False, |
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.
adding dryrun was much easier to mock and test, so I went this route.
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.
good idea in general. I added it as a parameter
Codecov ReportAttention: Patch coverage is
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@mashehu thank-you for the review, I've added a test and improved a few others while I'm there. |
hinking about it: |
@mashehu that makes sense, but is difficult in the current state of implementation where we have a list of component names to filter against, not directories. An alternative would be to check for an exact matching component name, and if not found, append a |
I tried to implement the more general matching approach, could you have a look @nh13 ? |
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.
@mashehu lgtm, with the one caveat that the API has changed for bump_versions
in case we want to follow semver
self, | ||
module: Optional[str] = None, | ||
all_modules: bool = False, | ||
show_up_to_date: bool = False, |
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 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.
Nope, we didn't break any backwards functionality. This will be in 3.4.0
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.
The function signature changed, and the function is public.
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.
yes, but I don't know anybody who uses nf-core/tools not in CLI mode, so no breaking changes there (we are not ultra-strict semveristas here 🙂)
Tools like picard, fgbio, and samtools all have sub-commands. It is onerous to have to update them all individually using nf-core modules bump-version. This change allows the module name to update to have a trailing forward slash, which will be interpreted as specifying that all subcommands should be updated. E.g. nf-core modules bump-version samtools/
PR checklist
CHANGELOG.md
is updateddocs
is updated