Repository navigation
Migrate to Nextflow 26.04 syntax - #46
Merged
Merged
Conversation
Adopt the Nextflow 26.04 strict/static-typing syntax across the pipeline:
- Static types: typed `params {}` block in main.nf; typed process inputs
and outputs (`name: Type`) in PUBLISH_REPORT, PRINT_PRIVACY_MESSAGE,
PRINT_ASCII_LOGO and CONGRATULATIONS under `nextflow.enable.types`.
- Record types: new shared types.nf defining the EventConfig record
(optional fields nullable); event config built with `record(...)` and
consumed as a record input by PRINT_PRIVACY_MESSAGE.
- Workflow output syntax: replace publishDir in PUBLISH_REPORT with a
workflow `publish:`/`output {}` block; map --outdir to outputDir in
nextflow.config.
- Misc: lowercase `channel.` namespace, explicit closure params, and the
`onComplete:` workflow section.
ENTER_RAFFLE and main.nf's onComplete remain legacy (untyped) because they
read `workflow.session.config` to detect Platform monitoring, which the
typed `workflow` namespace does not expose. Keeping them legacy preserves
the exact platform_enabled value submitted to the raffle form.
Validated: `nextflow lint` clean across all 8 files; `nextflow run -preview`
builds the typed DAG and constructs the record with no type errors.
- Remove obvious/narrating comments that explain what code does - Keep brief comments explaining non-obvious 'why' (untyped workflow.session.config usage, immutability constraint) - Reduce comment verbosity in main.nf, enter_raffle/main.nf, types.nf, and nextflow.config Co-authored-by: Adam Talbot <adamrtalbot@users.noreply.github.com>
The params{} default for outdir in main.nf is not visible when the config is read, so outputDir resolved to null without --outdir. Fall back to 'results'.
Add manifest.nextflowVersion '!>=26.04.0' so older versions fail with a clear error, and update the README install section (Java 17, Nextflow 26.04).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Some minor changes but LGTM, merge! |
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
Migrates the pipeline to Nextflow 26.04 strict / static-typing syntax.
Static types
params {}block inmain.nfname: Type) inPUBLISH_REPORT,PRINT_PRIVACY_MESSAGE,PRINT_ASCII_LOGO,CONGRATULATIONSundernextflow.enable.typesRecord types
types.nfdefining theEventConfigrecord (optional fields nullable so every event config duck-types to it)record(...)and consumed as a record input byPRINT_PRIVACY_MESSAGEWorkflow output syntax
publishDirinPUBLISH_REPORTreplaced by a workflowpublish:+output {}block--outdirmapped tooutputDirinnextflow.configMisc
channel.namespace, explicit closure parameters, and theonComplete:workflow sectionDeliberate legacy carve-out
ENTER_RAFFLEandmain.nf'sonComplete:are kept legacy (untyped) because they readworkflow.session.config.navigate('tower.enabled' / 'tower.accessToken')to detect Platform monitoring — an accessor the typedworkflownamespace does not expose. This preserves the exactplatform_enabledvalue submitted to the raffle form. It's also whyEventConfiglives in its owntypes.nfrather than inlined inmain.nf(declaring the record would force the types flag onto the whole file and breakworkflow.session).Validation
nextflow lint— clean across all 8 filesnextflow run . -preview— builds the typed DAG, constructs theEventConfigrecord, runs validation +onComplete, resolves theoutputtarget; no type/compile errors