Module system#6650
Merged
pditommaso merged 84 commits intomasterfrom Mar 17, 2026
Merged
Conversation
Introduce comprehensive development constitution documenting core principles and practices for Nextflow development including modular architecture, test-driven quality assurance, dataflow programming model, licensing compliance, DCO requirements, semantic versioning, and Groovy code standards. The constitution codifies existing best practices from CLAUDE.md and CONTRIBUTING.md to provide clear governance and quality standards for the project. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
- Add comprehensive documentation for all module CLI commands - Add `nextflow module run` command for standalone module execution - Remove `module update` command to simplify the design - Use single-dash prefix for Nextflow options, double-dash for module inputs - Remove @ prefix from scope in CLI commands (keep only in DSL syntax) Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
- Remove separate `dependencies` and `components` fields - Expand `requires` to include: - `nextflow`: version constraint (unchanged) - `plugins`: array with name@constraint syntax - `modules`: array of module dependencies - `workflows`: array of workflow dependencies - Unified version constraint syntax: `[scope/]name[@constraint]` - Mark `components` as deprecated (use requires.modules) - Update all examples in ADR and schema Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
- Add `args` property to tools section for type-safe argument configuration - Define toolArgSpec with flag, type, description, default, enum, required - Support implicit variable `tools.<toolname>.args.<argname>` returning formatted flag+value (e.g., "-K 100000000") - Support `tools.<toolname>.args` to return all args concatenated - Document deprecation of ext.args/ext.args2/ext.args3 pattern - Update ADR with Tool Arguments Configuration section and appendix [ci skip] Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
c956ca7 to
01c777a
Compare
Member
|
The module spec schema will be defined in the |
bentsherman
reviewed
Jan 6, 2026
bentsherman
reviewed
Jan 6, 2026
jorgee
reviewed
Jan 7, 2026
jorgee
reviewed
Jan 7, 2026
jorgee
reviewed
Jan 7, 2026
jorgee
reviewed
Jan 7, 2026
jorgee
reviewed
Jan 7, 2026
jorgee
reviewed
Jan 7, 2026
jorgee
reviewed
Jan 7, 2026
jorgee
reviewed
Jan 7, 2026
Co-authored-by: Jorge Ejarque <jorgee@users.noreply.github.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Co-authored-by: Jorge Ejarque <jorgee@users.noreply.github.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Co-authored-by: Jorge Ejarque <jorgee@users.noreply.github.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Expand deprecation notice to cover all ext.* custom directives Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
- Use consistent module path format with version: modules/@scope/name@version/ - Fix directory structure example: samtools-view -> samtools/view - Standardize on 'license' spelling (American English) - Fix author -> authors (plural array format) Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Remove @ prefix from scope in API path to match API definition Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
…m [ci skip] Signed-off-by: jorgee <jorge.ejarque@seqera.io>
…from module scopes, remove version pinning from `nextflow.config` Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
5 tasks
ewels
reviewed
Mar 13, 2026
bentsherman
reviewed
Mar 13, 2026
bentsherman
reviewed
Mar 13, 2026
| var includeUri = getIncludeUri(uri, source); | ||
|
|
||
| var isRemoteModule = ModuleResolver.isRemoteModule(source); | ||
| var parent = isRemoteModule ? Path.of("modules") : Path.of(uri).getParent(); |
Member
There was a problem hiding this comment.
This will probably not work for the language server, since the language server can manage multiple workspaces at once. I will need to pass a workspace root into this visitor.
I will look into this separately, no need to block this PR
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
… contains the .module-info. This folders can't be a module Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
bentsherman
approved these changes
Mar 16, 2026
Member
bentsherman
left a comment
There was a problem hiding this comment.
@christopher-hakkaart we should follow up on the module docs later. It seems like we are duplicating some info between the CLI page and Modules page, could likely be improved
pditommaso
commented
Mar 16, 2026
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Collaborator
|
Thanks @bentsherman - will check out the docs today |
pditommaso
added a commit
that referenced
this pull request
Mar 17, 2026
Revert condition from `!decoded.plugins` to `decoded.plugins == null` to avoid throwing an exception when the registry returns an empty list. In Groovy, an empty list is falsy, so the previous check incorrectly treated a valid empty response as a parse failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
pditommaso
added a commit
that referenced
this pull request
Mar 17, 2026
Revert condition from `!decoded.plugins` to `decoded.plugins == null` to avoid throwing an exception when the registry returns an empty list. In Groovy, an empty list is falsy, so the previous check incorrectly treated a valid empty response as a parse failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full implementation of the Nextflow Module System, enabling first-class support for installing, managing, publishing, and running modules from a centralized registry.
Main capabilities
CLI commands (
nextflow module <subcommand>)module install— Download and install a module from the registry to the localmodules/directory with checksum validation and integrity tracking. Supports-versionand-forceflags.module run— Execute a module directly from the registry without pre-installing. Auto-installs if needed, then delegates to the standardruncommand.module list— List all locally installed modules with version and integrity status (OK/MODIFIED/LOCAL/CORRUPTED). Supports table or JSON output.module remove— Remove installed modules with integrity checks to prevent accidental data loss. Supports-forceand-keep-filesflags.module search— Query the registry for modules matching a search term. Returns formatted results or JSON with metadata and relevance scores.module info— Display detailed module metadata including description, authors, tools, input/output parameter schema, and usage command templates. Smart parameter inference for nf-core modules.module publish— Publish a local module to the registry. Validates structure (requiresmain.nf,meta.yml,README.md), enforces size limits, bundles as tar.gz, computes checksum, and uploads via authenticated API. Supports-dry-run.Registry client (
ModuleRegistryClient)REST API client with built-in retry logic and multi-registry fallback:
NXF_REGISTRY_TOKENor config)Local storage management (
ModuleStorage)File-based storage in
modules/scope/name/with.module-infomarker files:Module resolution (
ModuleResolver)Coordinates between registry and local storage:
DSL integration
New syntax for remote module inclusion:
include { myWorkflow } from 'scope/name' include { myProcess } from 'scope/name@1.2.0'Pluggable resolution via
RemoteModuleResolverSPI, allowing third-party registries.Configuration (
registryscope)registry { url = 'https://registry.nextflow.io/api' apiKey = '...' // or NXF_REGISTRY_TOKEN env var }Supports multiple registries with fallback.
Data models
ModuleReference— Parses and validatesscope/nameformatModuleSpec— YAML parser formeta.ymlwith validation (name, version, description, license)InstalledModule— Tracks installed state, version, checksum, and integrity statusModuleChecksum— SHA-256 directory checksums for integrity verificationSecurity
Documentation and design
adr/20251114-module-system.md)docs/cli.md,docs/reference/cli.md)docs/module.md)specs/251117-module-system/)Testing
Comprehensive Spock test coverage for all components (~4,000 lines of tests):