+
Skip to content

Core Nextflow: auto assign profiles #171

@ewels

Description

@ewels

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载