-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support new snakemake keywords prefix
and default_target
#131
Conversation
The "prefix" keyword was introduced in snakemake 6.13. This commit adds support for the keyword to snakefmt.
This keyword was added in snakemake 6.15.
Hi @koen-vg , thanks for your contribution :) This looks good! By default we merge into dev and then push new versions to master. I'm just a bit surprised that all tests passed for you, as our current snakemake dependency version fails 'grammar completeness' tests. So I recommend we merge this in dev and I then push an update of snakemake dep. version to latest (OR @koen-vg you push a commit on this branch after running |
Right, I did have to update to the latest version of snakemake, 6.15, but seem to have forgotten to document that. I'll try to push the snakemake update, that would be to the poetry.lock file? |
This is needed since we support the `default_target` keyword introduced in snakemake 6.15.
Alright I have to admit I'm not super familiar with poetry; the latest commit is what I got after updating the snakemake version in pyproject.toml and then running |
Codecov Report
@@ Coverage Diff @@
## dev #131 +/- ##
==========================================
- Coverage 98.21% 98.20% -0.02%
==========================================
Files 12 12
Lines 954 948 -6
Branches 175 209 +34
==========================================
- Hits 937 931 -6
Misses 10 10
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
All looks good. @koen-vg could you please add your changes to the CHANGELOG as well? |
Thanks @koen-vg ! so I've just done two things:
@koen-vg I've pushed your changes plus those two points above to |
That all sounds very good. Thanks for making it easy to contribute to this project! |
Fine by me. This does remind me though, black is now stable so we will need to update that dependency soon. But agree with just updating snakemake here
Ok. Normally I would prefer you push to this PR and we solve conflicts here, but it's done now. So yes, closing this makes sense. |
For future ref- not sure how I could have pushed a change that removed one of the commits (updating all dependencies), i.e. rewriting history, to the If you have suggestions i'll do that next time round |
Ah didn't realise you had removed a commit. Ignore me. |
Hi! Thanks for the great project; snakefmt is much appreciated.
Recently two new keywords have been added to snakemake:
prefix
(in module blocks) anddefault_target
(in rules). This pull request adds support to snakefmt for both. I have also included both in test. All tests pass, and I have also tested this with success on a more involved snakefile I personally work with.This also closes #130.
Let me know if any improvements are changes are needed or wished for before merging.