Skip to content

refactor!: delete the python_script step, and review cleanups - #610

Merged
vjaganat90 merged 7 commits into
PolusAI:masterfrom
vjaganat90:fix/master-review
Nov 23, 2026
Merged

vjaganat90 merged 7 commits into
PolusAI:masterfrom
vjaganat90:fix/master-review

Conversation

@vjaganat90

@vjaganat90 vjaganat90 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

What

  • The python_script step is gone: the adapter that imported a script at compile time to generate its tool, its special cases in the front door, Resolve, Lower and from_wic, wic014 (retired), and Sophios's example copies of the driver and types file it ran.
  • Review cleanups: cwl.int, cwl.file and the other type names are the values of lang.cwl.CWLAtomicType, held to it at import; the architecture page names ir.check as where names are checked; the salad duplicate-id filter says why it exists (a tool that names an input and an output alike, as append.cwl does); get_tools_cwl keeps one key per tool found.
  • CI and tests: each discovered Python workflow (examples/workflows, image-workflows' bbbc.py and bbbc_sub.py) compiles on every leg and runs through Workflow.run in a temp directory, so nothing writes its .wic and a config_ci.json into the checkout and the five "Generate Sophios Python API Workflows" steps are gone. The corpus checks drop the graph-isomorphism re-check, which ran only after the embedded CWL equalled the CWL compiled alone, with its alarm and serial run, and the kept-call warning count test_inline_flags already pins, and they compile a workflow that calls nothing once, not five times; they run in parallel, and every large workflow is checked weekly (elm, vs_demo_2 and vs_demo_3 were checked nowhere). Scatter scaling moves from a pull-request test, which timed cwltool under a bound 180 times what it measured, to the weekly benchmarks, at 200 and 2000 elements under cwltool and Toil.

Why python_script compiled only from a Sophios source checkout beside the working directory, and four phases carried a case for its one step id.

Before and after

steps:
  python_script:
    in:
      script: !ii ../scripts/atomselect.py
      dockerPull: !ii jakefennick/atomselect
      selection_string: !ii protein

Before, Sophios imported atomselect.py while compiling and generated a tool that ran it through python_cwl_driver.py and workflow_types.py baked into the image. Now python_script is an ordinary step id: with no tool of that name it is wic013. A script is a tool like any other, a .cwl file or a .wic tool document, named by its step. mm-workflows gives atomselect.py and nmr4md.py such tools in the paired NovagenResearch/mm-workflows#269 (same branch name), and its workflows compile to the same edges and job as before.

I point the Names section at sophios.ir.check, which checks names before Resolve for every document.
A tool that names an input and an output alike gives both one id, which salad warns of and cwltool runs; the compiled CWL adds none of its own.
Both loops walk paths and file each under the same StepId, so I name it once; get_tools_cwl is back under pylint's local-variable limit.
cwl.int, cwl.file and the rest are lang.cwl's members, and the set is held to it at import, so a name can no longer drift from the standard's.
@vjaganat90
vjaganat90 force-pushed the fix/master-review branch 2 times, most recently from fcce233 to d6ec545 Compare November 19, 2026 01:35
@vjaganat90 vjaganat90 changed the title fix: python_script types from beside the script, and review cleanups refactor!: delete the python_script step, and review cleanups Nov 19, 2026
A step named python_script no longer builds a tool from a Python script. The adapter, its hooks in the front door,
Resolve, Lower and from_wic, wic014, and the example driver and types files go; tests import files through a helper.
The corpus lanes wrote each discovered Python workflow's .wic and a
config_ci.json beside it, then ran the .wic. Each script now compiles on
every leg and runs through Workflow.run in a temp directory.
Drops the graph-isomorphism re-check behind the CWL equality, its alarm and
serial run, and the kept-call warning count; checks every large workflow
weekly; times scatter scaling in the weekly benchmarks, cwltool and Toil.
@vjaganat90
vjaganat90 merged commit 4b11628 into PolusAI:master Nov 23, 2026
3 checks passed
@vjaganat90
vjaganat90 deleted the fix/master-review branch November 23, 2026 17:40
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