Skip to content

fix(nextflow): a basename reference to an entry names the entry again, and the corpus runs on a push - #564

Merged
vjaganat90 merged 6 commits into
PolusAI:feat/nf-supportfrom
vjaganat90:nf335_entry_basename
Oct 29, 2026
Merged

vjaganat90 merged 6 commits into
PolusAI:feat/nf-supportfrom
vjaganat90:nf335_entry_basename

Conversation

@vjaganat90

@vjaganat90 vjaganat90 commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

What

  • A basename reference to an InitialWorkDirRequirement entry names the entry again. $(inputs.X.basename) renders as the last part of the staged path, X.toString().tokenize('/').last(), in place of X.name: Nextflow's .name of a path staged under a directory, as every entry's input is (.sophios_entry_X/*), is the whole staged path. With .name, since 927d49d4 in feat(nextflow): import a pipeline Sophios wrote as one Sophios workflow #556:

    • an output globbed by $(inputs.outDir.basename) emitted the staged input, untouched, in place of the copy the tool wrote into. Every image-workflows plugin emitted an empty directory, and bbbc failed at its second step;
    • a command argument $(inputs.outDir.basename)/... wrote through the staged symlink into the user's original input.

    For an input staged as itself the new form gives what .name gave, and it still renders apart from a plain reference, (X.toString() - '.sophios_entry_X/'), so the import reads each back as written. It is one entry of the idiom table, which the renderer and the importer both read.

  • One place stages a path input's files under a directory, each under its own name: the property the basename form reads. A staging that renames a file cannot be written without changing that place.

  • tests/core/nextflow/test_reference_differential.py runs one workflow under Nextflow and under cwltool, and compares what is comparable: each output's class, basename and contents, what each reference printed, and the inputs, which neither runner may change. Its cells are each reference form ($(inputs.X), .path, .basename) in each position (a command argument, the stdout target, an output glob) for each staging a basename can reach: a plain File and Directory, an entry linked and one copied, and scattered elements of both. It fails on the old .name form, on an entry referenced by its staged path, on a writable entry linked instead of copied, and on .baseName. It runs in the Nextflow lane, about 4 s locally; the Windows leg lists it as excluded, since only the Linux Nextflow lane collects it.

  • The plugin-shape runtime test now checks what its workflow output emits, and the command-line test that the output directory a tool writes into is left empty: both failed before the fix. The renderer's tests expect the new form.

  • The corpus runs on a push, as a step of Run Workflows, after every other suite: test_corpus.py runs the five corpus workflows under Nextflow with Docker. A pull request does not run it, nor does a push to mm-workflows or image-workflows. Nextflow 26.04.2 and Java 17, the versions the Nextflow lane pins, come from bioconda and conda-forge into the lane's own conda environment (install/system_deps_ci.yml), so the lane's one setup step installs them and its one cleanup step removes them; nothing is installed outside that environment. nextflow_corpus.yml is gone: a dispatch-only workflow that is not on the default branch is never registered, so it had never run. test_ci_coverage.py pins run_workflows.yml as the corpus marker's one lane.

  • The design (§6, Basename references), the NfBasenameReference docstring and docs/nextflow.md say what the lowering relies on and where the corpus runs.

Why
The corpus lane was the one check that ran image-workflows under Nextflow, and it never ran, so the regression passed every lane: the renderer's tests pinned the new text, the plugin-shape test never read what its output emitted, and the one test that did used the basename on both sides, where the two errors cancelled. Now the corpus runs on every push beside image-workflows' CWL runs, and the differential holds each reference's meaning to cwltool's on every Nextflow lane run.

Checked

  • CI, on an earlier push of this branch (3ca9eade, which installed Nextflow outside the conda environment): Run Workflows ran the new step for the first time and passed all five corpus workflows: molgan.wic 339 s, bbbc.wic 26 s, bbbc.py 24 s, load_trained_molgan.wic 23 s, bbbc_sub.py 10 s. Lint And Test and Nextflow Phase 1 passed, the differential among the latter's 148 Nextflow tests. The environment with Nextflow 26.04.2 and Java 17 solves for linux-64 with the lane's Python 3.11.
  • Locally (macOS, Nextflow 26.04.2 on Java 17), the corpus test of bbbc.wic fails at feat/nf-support (9a9dd96f) at its subdirectory step and passes before 927d49d4 and on this branch. Over the 17 corpus .wic the target accepts, 16 render byte-identical and bbbc.wic differs only in its 7 basename lines.

Not in this PR

  • An entry under its own basename globbed by plain $(inputs.X) compiles and runs under Nextflow, while cwltool rejects that glob; design §6 admits it. The differential leaves that cell out.

@vjaganat90
vjaganat90 force-pushed the nf335_entry_basename branch from e1978c6 to 6dc30e1 Compare October 29, 2026 13:41

@darkclad darkclad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@vjaganat90
vjaganat90 merged commit 8a87b7e into PolusAI:feat/nf-support Oct 29, 2026
4 checks passed
@vjaganat90
vjaganat90 deleted the nf335_entry_basename branch October 29, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants