nextflow-io / nextflow-io/nextflow

Repo config file for lint / format

Open
#5,934 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Groovy
Stars
3.5k
Forks
811
Avg merge
2d 11h
Merged PRs (30d)
61

Description

Putting down some ideas for a potential new config file to be used by the new Nextflow lint and format commands.

Starting position:

  • Can't use nextflow.config as separation of concerns, also potentially a bit recursive
  • Want to make as generic as possible so it can be future-proofed (eg. not .nextflowignore to ignore files only, adaptable for more functionality)
  • Common file format for easy interoperability

To make it clear what this is for, I'd suggest calling this thing nextflowrc, following the *nix convention with rc files for startup config / actions. It could be a hidden .nextflowrc.* dotfile or not, I could go either way.

With this, my initial stab is either YAML or TOML. Here's a very rough first draft with some suggestions for things that we may want to configure

nextflowrc.yml

lint:
   exclude:
      - "testing/*"
      - "docs/**/*.nf"
   output-format: concise
format:
   exclude:
      - modules
   spaces: 4
   harshil-alignment: true

Or toml, as used by pyproject.toml and netlify.toml etc:

nextflowrc.toml

[lint]
exclude = ["myworkdir/*", "snippets/**/*.nf"]
output-format = "extended"

[format]
exclude = ["modules"]
tabs = true
harshil-alignment = false

Note that we could support multiple formats, though I'm not sure that this would add much.

To avoid the proliferation of root-level config files, it may be possible for @nf-core to consider adopting this new file to replace .nf-core.yml (probably optionally), in an nf-core section in the file.

Thoughts + feedback welcome!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed Nextflow lint and format commands alongside nextflow.config and the suggested nextflowrc.yml or nextflowrc.toml formats. Consider how the proposed configuration could relate to .nf-core.yml, then establish a decided file name, format, and supported settings as the definition of done.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.