-
Notifications
You must be signed in to change notification settings - Fork 223
Dump template yml to file in pipeline repo after creation #2189
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #2189 +/- ##
==========================================
+ Coverage 71.53% 71.92% +0.38%
==========================================
Files 77 77
Lines 8369 8373 +4
==========================================
+ Hits 5987 6022 +35
+ Misses 2382 2351 -31
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
mashehu
left a comment
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.
Would be nice to also have a test for this.
| log.debug("Dumping pipeline template yml to file") | ||
| if self.template_yaml: | ||
| with open(self.outdir / "pipeline_template.yml", "w") as fh: | ||
| yaml.safe_dump(self.template_yaml, fh) |
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.
| yaml.safe_dump(self.template_yaml, fh) | |
| yaml.safe_dump(self.template_yaml, fh) | |
| run_prettier_on_file(fh.name) |
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.
So this should only trigger when a template_yml is either supplied (which perhaps is silly) or someone customises something on the CLI.
Currently there are no tests which mock passing information in via the CLI prompts that I'm aware of. Happy to try adding them but not sure if it's best done as a unit-test or as part of one of the fuller tests defined in the GH actions?
mirpedrol
left a comment
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.
LGTM :)
Adds feature to solve #2143
The template yaml is now required to properly lint/sync custom pipelines. Currently if it's initially retrieved from CLI inputs when running
nf-core createit does not get saved to file anywhere.This PR dumps the template yaml used to create the pipeline into a
pipeline_template.ymlfile in the new repo.PR checklist
CHANGELOG.mdis updateddocsis updated