Skip to content

docs: Clarify distinction between modules and script inclusion#7217

Merged
bentsherman merged 4 commits into
masterfrom
docs-clarify-module-definition
Jun 12, 2026
Merged

docs: Clarify distinction between modules and script inclusion#7217
bentsherman merged 4 commits into
masterfrom
docs-clarify-module-definition

Conversation

@bentsherman

@bentsherman bentsherman commented Jun 10, 2026

Copy link
Copy Markdown
Member

When DSL2 was introduced, "modules" referred to both "a process in a script" and "any script included by another script". Over time, I ended up emphasizing the latter definition in the docs.

However, with the emergence of registry modules, subworkflows, and meta-pipelines, the meaning of "module" has become muddled. This shows up in several places:

  • the disconnect between Nextflow and nf-core's definition of a module (nf-core subworkflow != nf-core module)
  • the explanation of local vs registry modules in the docs

I think it has become clear that a "module" is really just a "process in a script". A workflow in a script is not a module.

This PR clarifies the definition of "module", separating it from the more general concept of "script inclusion". It aligns the use of "module" with the module registry, module CLI, and nf-core convention.

Related: #6650 , #7213

TODO:

  • introduce script inclusion in the "Scripts" page instead of the modules overview?

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman bentsherman requested a review from a team as a code owner June 10, 2026 16:15
@bentsherman bentsherman changed the title docs: Clarify distinction between modules and script includsion docs: Clarify distinction between modules and script inclusion Jun 10, 2026
@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit b6a60f8
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6a2b4f2898a4ad0008a674c4
😎 Deploy Preview https://deploy-preview-7217--nextflow-docs-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread docs/script.md Outdated
@christopher-hakkaart

Copy link
Copy Markdown
Collaborator

I like the direction to limit the definition.

A module is a script that contains a single process definition.

With this definition, it's really just the main.nf with only one process definitions. Where does this leave associated files? E.g., meta.yml. Do we refer to those as module files?

@christopher-hakkaart

Copy link
Copy Markdown
Collaborator

We should also look at the training to make sure this is echoed there

Comment thread docs/modules/modules.md Outdated
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman

Copy link
Copy Markdown
Member Author

I notified the training team about this PR, they will double-check their material

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman

Copy link
Copy Markdown
Member Author

@christopher-hakkaart I think this PR is ready now

@christopher-hakkaart christopher-hakkaart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@bentsherman bentsherman merged commit 2294ab1 into master Jun 12, 2026
26 checks passed
@bentsherman bentsherman deleted the docs-clarify-module-definition branch June 12, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants