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

Core Nextflow: auto assign profiles #171

Open
ewels opened this issue Jul 8, 2020 · 0 comments
Open

Core Nextflow: auto assign profiles #171

ewels opened this issue Jul 8, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@ewels
Copy link
Member

ewels commented Jul 8, 2020

Originally posted on the Nextflow repo: nextflow-io/nextflow#792 but was auto-closed due to inactivity. I still think it's a cool idea, so reposting here.

Suggestion is to make a PR to Nextflow to add functionality to config profiles, to allow them to be automatically assigned when a certain condition is met. That logic could be anything, but my initial suggestion was to match the system hostname.

In short, the aim is to make Nextflow support the following syntax:

profiles {
  uppmax {
    when = host.hostname.contains('.uppmax.uu.se')
    includeConfig 'conf/uppmax.config'
  }
  system_two {
    when = host.hostname.contains('.system_two.com')
    includeConfig 'conf/system_two.config'
  }
  system_three {
    when = System.getEnv('SOME_VAR') == 'myvalue'
    includeConfig 'conf/system_two.config'
  }
}

Paolo gave some advice back on the original thread. The most pertinent bit is probably the following:

The config object is parsed using the ConfigParser. The first goal is to understand how the when definition is mapped in the config object. The ConfigParserTest can help to make some experiments.

Then once we have the auto profile information it should be enforce in the ConfigBuilder at this point.

@ewels ewels added the enhancement New feature or request label Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant