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 ability to provide custom defaults for publishDir directive via config file #4186

Open
pditommaso opened this issue Aug 14, 2023 · 6 comments

Comments

@pditommaso
Copy link
Member

This ticket aims to provide the ability to custom default settings for the publishDir directive via the nextflow.config file.

The default settings should be provided using the nextflow.defaults.publishDir configuration scope. For example:

nextflow {
  defaults {
    publishDir = [mode: 'copy', enabled: false]
  }
}

When provided, they should override the built-in default settings and applied when creating a PublishDir instance.

@bentsherman bentsherman changed the title Add ability to provider custom defaults for publishDir directive via config file Add ability to provide custom defaults for publishDir directive via config file Aug 31, 2023
@bentsherman
Copy link
Member

@pditommaso you closed a bunch of issues and PRs about supporting closures for these fields, so do you intend for these default settings to support closures in some way? Otherwise it isn't really addressed those other issues. In many cases they want to configure the PublishDir with task-specific inputs which requires closures.

@bentsherman
Copy link
Member

If the publishDir directive can be specified in the pipeline code (#4375), then you could instead use a function to provide defaults:

def publishDir(path, opts=[:]) {
  final defaults = [
    path: params.outdir,
    mode: params.publish_mode
  ]
  defaults + [path: path] + opts
}

Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 17, 2024
@pditommaso pditommaso removed the stale label Mar 17, 2024
@bentsherman
Copy link
Member

This convenience is no longer needed once the workflow output DSL #4784 is implemented

@bentsherman
Copy link
Member

Closing in favor of the output i.e. "publish" DSL and #4839 which provides some config options for publish retry strategy

@bentsherman bentsherman removed this from the 24.04.0 milestone Apr 15, 2024
@pditommaso
Copy link
Member Author

Not 100% this should be thrown away

@pditommaso pditommaso reopened this Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants