Skip to content

NF-Core Sync includes template.yaml as option#1880

Merged
mirpedrol merged 7 commits into
nf-core:devfrom
adamrtalbot:1879_sync_template_yaml
Oct 12, 2022
Merged

NF-Core Sync includes template.yaml as option#1880
mirpedrol merged 7 commits into
nf-core:devfrom
adamrtalbot:1879_sync_template_yaml

Conversation

@adamrtalbot

Copy link
Copy Markdown
Contributor

Fixes #1879

Adds -t/--template-yaml to nf-core sync, so that users can update their pipeline based on existing template file.

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@github-actions

This comment was marked as resolved.

@adamrtalbot adamrtalbot changed the base branch from master to dev October 5, 2022 13:34
@adamrtalbot adamrtalbot force-pushed the 1879_sync_template_yaml branch from c0049b0 to ad6e31b Compare October 5, 2022 13:37
@codecov

This comment was marked as resolved.

@ewels ewels left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This is all that was required? Great!

I'd like to wait for the CI tests to run / pass, but reading the code LGTM 👍🏻 (haven't tested running)

@mirpedrol mirpedrol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! :)

@adamrtalbot

Copy link
Copy Markdown
Contributor Author

I haven't added a new test - is that OK?

I'm sure there are lots of edge cases but it works with a quick demo pipeline.

@adamrtalbot

Copy link
Copy Markdown
Contributor Author

Actually - it gets in a mess if the template file is in the repository. Relatively easy fix.

Adam Talbot added 2 commits October 5, 2022 16:06
- Cache template.yml file before running nf-core sync.
- If syncing fails, reset to start
@adamrtalbot adamrtalbot requested review from ewels and mirpedrol October 5, 2022 16:09
@adamrtalbot

Copy link
Copy Markdown
Contributor Author

@ewels @mirpedrol Please re-review, I've updated the code to cache the template YAML and re-write it during syncing which is a bit more involved and has to catch some exceptions.

@mirpedrol mirpedrol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates, it looks good! Feel free to merge when tests pass :)

@mirpedrol mirpedrol merged commit 33726de into nf-core:dev Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nf-core sync should support the template.yaml

3 participants