Skip to content
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

Add option for custom child-template repo #2898

Open
Tracked by #2340
ewels opened this issue Mar 26, 2024 · 1 comment
Open
Tracked by #2340

Add option for custom child-template repo #2898

ewels opened this issue Mar 26, 2024 · 1 comment
Labels
command line tools Anything to do with the cli interfaces

Comments

@ewels
Copy link
Member

ewels commented Mar 26, 2024

In some cases, people want to use the nf-core template and associated best practices (and updates), but constantly need to apply the same set of modifications when creating new pipelines. In this situation, it would be nice to be able to supply a "child template" that overwrites specific desired template files, and/or adds additional ones.

Template overrides are a pretty standard mechanism, see examples such as mkdocs, MultiQC and more.

Workflow should be:

  1. Create a new repository for the custom template. Add any files that you want to overwrite.
    • For example, if you want a custom readme but everything else the same, create just a README.md file and nothing else
  2. Run nf-core create --template https://github.com/myorg/mytemplate
  3. The create command generates a pipeline as normal. It then renders the custom repo template afterwards, and copies these generated files on top of the vanilla pipeline output.
  4. The template git repo is noted in .nf-core.yml so that the same process can be repeated for pipeline syncs (and even linting?)

Will need additional docs to describe the various template variables that are available for use, such as {{ name }} etc.

@ewels ewels added template nf-core pipeline/component template command line tools Anything to do with the cli interfaces and removed template nf-core pipeline/component template labels Mar 26, 2024
@awgymer
Copy link
Contributor

awgymer commented Mar 26, 2024

This would be really useful for templating custom documentation for non-nf-core users.

A potential bonus feature would be allowing extra variables supplied by e.g. --extra_vars vars.json or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command line tools Anything to do with the cli interfaces
Projects
None yet
Development

No branches or pull requests

2 participants