Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
09966d4
Typed CWL parsers
GlassOfWhiskey Dec 18, 2025
9a4657f
WIP expression_refactor type fixes
mr-c Dec 19, 2025
69d920d
Fix typing errors in utils
GlassOfWhiskey Dec 19, 2025
bb40563
Regenerate parsers with native ints
GlassOfWhiskey Dec 19, 2025
11e81e3
ProcessGenerator schema improvement
mr-c Dec 20, 2025
f345e80
finish type fixing cwl_v1_0_expression_refactor
mr-c Dec 20, 2025
df9f82c
finish type fixing cwl_v1_1_expression_refactor
mr-c Dec 20, 2025
3080686
finish type fixing cwl_v1_2_expression_refactor
mr-c Dec 20, 2025
8ffcf87
Regenerate parsers
GlassOfWhiskey Dec 20, 2025
6cd4aa0
expression-refactor: fix detection of non-string Sequences
mr-c Dec 21, 2025
629bef3
bandit: allow asserts
mr-c Dec 21, 2025
e2edb08
inputs_schema_gen: type fixes
mr-c Dec 21, 2025
a0119d4
Using LoadContents in type alias
GlassOfWhiskey Dec 21, 2025
4b551e9
WIP
mr-c Dec 21, 2025
c500aa9
Make `param_for_source_id` return any CWL parameter
GlassOfWhiskey Dec 26, 2025
cbf749d
Regenerate prsers with fixed CWL versions
GlassOfWhiskey Dec 26, 2025
dccf400
Regenerate parsers without abstract classes
GlassOfWhiskey Apr 4, 2026
7ab48bd
Regenerate parsers with generic Loaders
GlassOfWhiskey Apr 5, 2026
deed791
Regenerate parsers with mypyc annotations
GlassOfWhiskey Apr 5, 2026
04423bd
Regenerate parsers with explicit Enum types
GlassOfWhiskey Apr 5, 2026
b0a0b2d
Simplify union types
GlassOfWhiskey Apr 5, 2026
fda9ab2
Moved out version-independent functions
GlassOfWhiskey Apr 7, 2026
8e67d0c
Merging link-based inheritance
GlassOfWhiskey Jun 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
fail_ci_if_error: false

tox-style:
name: CI linters via Tox
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -194,21 +194,25 @@ flake8: FORCE
src/cwl_utils/parser/cwl_v1_0.py: FORCE
schema-salad-tool --codegen python \
--codegen-parser-info "org.w3id.cwl.v1_0" \
https://github.com/common-workflow-language/common-workflow-language/raw/codegen/v1.0/extensions.yml \
--codegen-parent "https://w3id.org/cwl/salad=schema_salad.metaschema" \
https://github.com/common-workflow-language/common-workflow-language/raw/codegen/v1.0/CommonWorkflowLanguage.yml \
> $@

src/cwl_utils/parser/cwl_v1_1.py: FORCE
schema-salad-tool --codegen python \
--codegen-parser-info "org.w3id.cwl.v1_1" \
https://github.com/common-workflow-language/cwl-v1.1/raw/codegen/extensions.yml \
--codegen-parent "https://w3id.org/cwl/salad=schema_salad.metaschema" \
https://github.com/common-workflow-language/cwl-v1.1/raw/codegen/CommonWorkflowLanguage.yml \
> $@

src/cwl_utils/parser/cwl_v1_2.py: FORCE
schema-salad-tool --codegen python \
--codegen-parser-info "org.w3id.cwl.v1_2" \
https://github.com/common-workflow-language/cwl-v1.2/raw/codegen/extensions.yml \
--codegen-parent "https://w3id.org/cwl/salad=schema_salad.metaschema" \
https://github.com/common-workflow-language/cwl-v1.2/raw/codegen/CommonWorkflowLanguage.yml \
> $@


regen_parsers: src/cwl_utils/parser/cwl_v1_*.py

FORCE:
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ Regenerate parsers
To regenerate install the ``schema_salad`` package and run:

``cwl_utils/parser/cwl_v1_0.py`` was created via
``schema-salad-tool --codegen python https://github.com/common-workflow-language/common-workflow-language/raw/codegen/v1.0/extensions.yml --codegen-parser-info "org.w3id.cwl.v1_0" > cwl_utils/parser/cwl_v1_0.py``
``schema-salad-tool --codegen python https://github.com/common-workflow-language/common-workflow-language/raw/codegen/v1.0/CommonWorkflowLanguage.yml --codegen-parent "https://w3id.org/cwl/salad=schema_salad.metaschema" --codegen-parser-info "org.w3id.cwl.v1_0" > src/cwl_utils/parser/cwl_v1_0.py``

``cwl_utils/parser/cwl_v1_1.py`` was created via
``schema-salad-tool --codegen python https://github.com/common-workflow-language/cwl-v1.1/raw/codegen/extensions.yml --codegen-parser-info "org.w3id.cwl.v1_1" > cwl_utils/parser/cwl_v1_1.py``
``schema-salad-tool --codegen python https://github.com/common-workflow-language/cwl-v1.1/raw/codegen/CommonWorkflowLanguage.yml --codegen-parent "https://w3id.org/cwl/salad=schema_salad.metaschema" --codegen-parser-info "org.w3id.cwl.v1_1" > src/cwl_utils/parser/cwl_v1_1.py``

``cwl_utils/parser/cwl_v1_2.py`` was created via
``schema-salad-tool --codegen python https://github.com/common-workflow-language/cwl-v1.2/raw/codegen/extensions.yml --codegen-parser-info "org.w3id.cwl.v1_2" > cwl_utils/parser/cwl_v1_2.py``
``schema-salad-tool --codegen python https://github.com/common-workflow-language/cwl-v1.2/raw/codegen/CommonWorkflowLanguage.yml --codegen-parent "https://w3id.org/cwl/salad=schema_salad.metaschema" --codegen-parser-info "org.w3id.cwl.v1_2" > src/cwl_utils/parser/cwl_v1_2.py``

Release
~~~~~~~
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies = [
"packaging",
"rdflib",
"requests",
"schema-salad >= 8.8.20250205075315,<9",
"schema-salad @ git+https://github.com/common-workflow-language/schema_salad.git@refs/pull/993/head",
"ruamel.yaml >= 0.17.6, < 0.20",
"typing_extensions >= 4.10.0",
]
Expand Down Expand Up @@ -71,6 +71,9 @@ cwl-pack = "cwl_utils.pack_cli:main"
cwl-normalizer = "cwl_utils.normalizer:main"
cwl-inputs-schema-gen = "cwl_utils.inputs_schema_gen:main"

[tool.hatch.metadata]
allow-direct-references = true

[tool.pytest.ini_options]
addopts = "-rsx -n auto --pyargs cwl_utils.tests"

Expand Down Expand Up @@ -135,3 +138,4 @@ ignore = [

[tool.bandit]
exclude_dirs = ["src/cwl_utils/tests"]
skips = ["B101"]
4 changes: 2 additions & 2 deletions src/cwl_utils/cite_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def main() -> int:


def extract_software_reqs(
process: cwl.Process,
process: cwl.Process | cwl.WorkflowStep,
) -> Iterator[cwl.SoftwareRequirement]:
"""Return an iterator over any SoftwareRequirements found in the given process."""
if process.requirements:
Expand Down Expand Up @@ -67,7 +67,7 @@ def get_process_from_step(step: cwl.WorkflowStep) -> cwl.Process:
"""Return the process for this step, loading it if needed."""
if isinstance(step.run, str):
return cast(cwl.Process, cwl.load_document_by_uri(step.run))
return cast(cwl.Process, step.run)
return step.run


def traverse_workflow(workflow: cwl.Workflow) -> Iterator[cwl.SoftwareRequirement]:
Expand Down
Loading
Loading