Skip to content

Keep the dataset and the run recipe in a project template - #17

Merged
AStaroverov merged 1 commit into
mainfrom
fix/template-keeps-dataset
Nov 16, 2026
Merged

AStaroverov merged 1 commit into
mainfrom
fix/template-keeps-dataset

Conversation

@AStaroverov

@AStaroverov AStaroverov commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A project made from a template comes with Sort-Seq Analysis without its dataset. The model refuses to run ("Select an abundance dataset"), and every block that reads its scores waits with it. Found while adding a pipeline test to platforma-testbed: of 20 blocks made from a template, both Sort-Seq Analysis blocks were skipped with "Block needs its inputs filled in", and the two Mutation Explorer and four Lead Selection blocks below them could not start.

The kind left abundanceRef out as "the dataset of one project's result pool, picked against the data in front of you". A template names its blocks, and applying one points a column id at the block made from the same entry. This kind already relies on that for conditionColumnRef, gateColumnRef and sortFractionColumnRef.

This reverses a scoping decision

The kind's comment said excludedConditions, inputGate and readFloor "are out because the operator scoped the contract to the metadata reading". This change puts them in, with gatesOrdered, baseline and baselineSequence, on request of the person the pipeline test is for. The reason: without them a project made from a template runs on defaults under the original project's name, and which score columns the block emits depends on these settings, while the blocks below keep their references to the original's columns.

A template for "the same FACS ladder over library after library" still works: every field is optional, and such a template leaves the dataset and the recipe out.

Change

  • kind: BlockParams gets abundanceRef, filterRef, excludedConditions, readFloor, gatesOrdered, inputGate, baseline, baselineSequence. Column ids and column value ids are checked as the existing ones are; the rest for their type. BaselineOption moves from the model to the kind, which names it now; the model imports it from there.
  • model: init reads the new fields from params, templateParams writes them back.
  • kind tests: the new fields are covered. The "drops keys the contract does not name" case used readFloor as its unnamed key and now uses customBlockLabel.
  • Changeset: kind minor (new optional fields), model patch.

Nothing in the UI changes. Picking a dataset by hand resets the other settings and writes nothing derived, so a block that receives its dataset from a template has nothing left to fill in.

Checked

  • build:dev-no-software and check pass; kind tests (77) and model tests (39) pass.

  • In the desktop app, with the block built from this branch (through platforma-testbed): a project created from a template whose two Sort-Seq Analysis entries name a dataset, a read floor and an excluded condition comes up with both blocks' inputs valid, each depending on its own Amplicon Profiling block. The blocks below them, Mutation Explorer and Lead Selection, now depend on them. Exported back to a template, each writes abundanceRef, readFloor and excludedConditions pointing at those entries.

Not checked: a run of the block on a dataset received this way. The build used for the check has no software the server can run.

block-tools structure check reports six files as out of date (two workflows, model/tsconfig.json, the root package.json, pnpm-workspace.yaml, model/package.json). This change touches none of them.

A project made from a template came with Sort-Seq Analysis without its
dataset, so the block could not run and everything below it waited. The
kind left `abundanceRef` out as a pick against one project's result
pool. A template names its blocks, and applying one points a column id
at the block made from the same entry, as it already does for the three
metadata columns this kind carries.

The run recipe was out of the contract too: the exclusions, the read
floor, the gate order flag, the input and the baseline. A project made
from a template then ran on defaults under the original's name, and the
columns the blocks below ask for depend on those settings.

The kind now carries the dataset, its subset and the run recipe; `init`
reads them and `templateParams` writes them back. `BaselineOption` moves
to the kind, which names it now.
@greptile-apps

greptile-apps Bot commented Nov 16, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@AStaroverov
AStaroverov added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 10c3bc8 Nov 16, 2026
13 checks passed
@AStaroverov
AStaroverov deleted the fix/template-keeps-dataset branch November 16, 2026 09:54
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.

1 participant