Conversation
Changes since initial PR
|
| Flag | Description |
|---|---|
-name |
Module name in scope/name format |
-version |
Module version |
-description |
Short description |
-license |
SPDX license identifier |
-author |
Author name (repeatable) |
Tests
MetaYmlGeneratorTest.groovy — expanded from 14 to 37 tests:
- Full coverage of all V1 input/output qualifiers:
val,path,file(deprecated),env,stdin,stdout,tuple - All glob wildcard variants (
*,?,{},[]) via parameterised test patharity combinations for both V1 and V2- V2
path(),env(), andstdout()output expressions - Tuple render tests using SnakeYAML round-trip assertion (parse YAML back and verify structure)
RenderOptionstests: provided values used verbatim; null values fall back to TODO placeholders
ModuleGenerateMetaTest.groovy — two new tests:
- Provided CLI flags appear in the output with no TODO placeholders for those fields
- Omitted CLI flags produce TODO placeholders
Docs
docs/cli.md— added### Generating module metadatanarrative section with flag table and type-detection guidancedocs/reference/cli.md— added fullgenerate-metasubcommand reference entry (anchorcli-module-generate-meta) with all flags, type hints, and examples
|
Update:
|
|
Nit, I'd likely call this |
Code Review FindingsCritical (Must Fix)1. Bug: // CURRENT (wrong)
if( this.license )
manifest['authors'] = this.authors
// FIX
if( this.authors )
manifest['authors'] = this.authorsAuthors will be silently dropped when license is null, or emit 2. Potential NPE in // CURRENT (missing null-safe on methodTarget)
return resolveTypeFromDeclaredType(simpleTypeName(methodExpr.methodTarget.returnType?.name))
// FIX
return resolveTypeFromDeclaredType(simpleTypeName(methodExpr.methodTarget?.returnType?.name))Important (Should Fix)
Suggestions
🤖 Generated with Claude Code |
@ben suggested to call it 'spec'. This is the name in the current implementation. 'create-meta', 'create-spec' are also good alternatives to me. I fixed other issues and comments. Apart from the name, it is ready for review from my side |
✅ Deploy Preview for nextflow-docs-staging canceled.
|
module spec command
|
What's the state of this? |
|
Jorge has done his part. I'm going to test it, clean it up, and try to merge this week |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
bb5ac5e to
1b8ffcc
Compare
* Add resourceAllocation field to trace record Expose scheduler-allocated resources (cpuShares, memoryMiB, accelerators, time) in the trace record. The value is taken from the last TaskAttempt's resources, falling back to the TaskState's resourceAllocation if no attempts exist. Also bump sched-client to 0.46.0-SNAPSHOT which renames TaskState.resourceRequirement to resourceAllocation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> * Revert "Add accelerator request to trace record (#6703)" This reverts commit 00f35b3. The accelerator and accelerator_type fields in the trace record are superseded by the resourceAllocation field which carries the actual scheduler-allocated resources including accelerator info. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> * Bump sched-client to 0.47.0 (#6987) [ci fast] * Bump sched-client to 0.47.0 and update prediction model support - Upgrade sched-client from 0.41.0-SNAPSHOT to 0.47.0 - Add qr/v2 prediction model to supported values description - Remove client-side prediction model validation (moved to backend) - Fix getResourceRequirement() -> getResourceAllocation() API change Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> * Fix test to use renamed resourceAllocation API Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> --------- Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> * Bump org.apache.groovy from 4.0.30 to 4.0.31 (#6985) [ci fast] Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Docs: document Wave support for module resources directory (#6984) [ci skip] * Docs: document Wave support for module resources directory Update Wave and module docs to explain that the module `resources/` directory is automatically included in Wave-provisioned containers, removing the need for ADD/COPY Dockerfile commands. Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> * Update docs/module.md [ci skip] Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> * Update docs/wave.md [ci skip] Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> --------- Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> * Remove stale reference to soon-to-be EOL'd AWS Linux 2 (#6970) [ci skip] * Use inline metadata from trace create response (#6976) --------- Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Signed-off-by: jorgee <jorge.ejarque@seqera.io> * Replace Auth0 with Platform OIDC PKCE for auth login (#6953) * Document workflow output lineage types (#6972) Co-authored-by: Ben Sherman <bentshermann@gmail.com> * docs: Add output labels use cases and details (#6986) Co-authored-by: Ben Sherman <bentshermann@gmail.com> * docs: Improve process directive docs (#6990) Co-authored-by: Ben Sherman <bentshermann@gmail.com> * Typed workflows (#6881) * Add `module create` subcommand (#6992) Co-authored-by: Ben Sherman <bentshermann@gmail.com> * Add `module validate` subcommand (#6993) Co-authored-by: Ben Sherman <bentshermann@gmail.com> * Add `module spec` command (#6859) Co-authored-by: Ben Sherman <bentshermann@gmail.com> * docs: Add migration guide reference to legacy operators page (#7010) * Use npr-client API instead of custom ModuleRegistryClient (#7012) [ci fast] * Use npr-client API instead of custom ModuleRegistryClient Replace the custom ModuleRegistryClient with the npr-client library, delegating HTTP registry interactions to the shared client. This removes ~500 lines of duplicated HTTP/retry/auth logic. - Delete ModuleRegistryClient.groovy - Update call sites to use new npr-client method names (getModule, getModuleRelease, searchModules, downloadModuleRelease, publishModuleRelease) - Update all tests to match new API Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> * Bump npr-api and npr-client to 0.22.0 [ci fast] Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> --------- Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Restore accelerator and accelerator_type fields in TraceRecord Keep the existing trace fields for requested accelerators alongside the new resourceAllocation field for allocated resources. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> * Populate accelerator trace fields from task config and update tests Set accelerator request count and type in the trace record from the process accelerator directive. Add corresponding test coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <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: jorgee <jorge.ejarque@seqera.io> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> Co-authored-by: Clint Valentine <valentine.clint@gmail.com> Co-authored-by: Jorge Ejarque <jorgee@users.noreply.github.com> Co-authored-by: Ben Sherman <bentshermann@gmail.com> Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com>
Summary
nextflow module generate-metaCLI subcommand that parses a module'smain.nfand generates ameta.ymltemplate pre-populated with all inferable valuesval,path,tuple) and V2 (static type syntax:reads: Path,(meta, reads): Tuple<String, Path>)-forceflag to overwrite an existingmeta.ymland-dry-runflag to print to stdout without writingChanges
CmdModule.groovy— registers the newgenerate-metasubcommandModuleGenerateMeta.groovy— CLI entry point with path resolution, overwrite guard, dry-run routingMetaYmlGenerator.groovy— AST extraction (V1 + V2) and YAML rendering via SnakeYAMLMetaYmlGeneratorTest.groovy— 14 Spock unit tests covering V1 qualifiers, V2 typed inputs, symbol map inference, tuple sub-entries, YAML renderingModuleGenerateMetaTest.groovy— 10 Spock CLI tests covering generation, overwrite guard, dry-run, error casesVariableScopeVisitor.java— minor related fixTest plan
./gradlew :nextflow:test --tests "nextflow.module.MetaYmlGeneratorTest"— all 14 tests pass./gradlew :nextflow:test --tests "nextflow.cli.module.ModuleGenerateMetaTest"— CLI tests passnextflow module generate-meta <module-dir>generates a validmeta.yml-forceerrors; with-forceregenerates;-dry-runprints to stdout🤖 Generated with Claude Code