Skip to main content

Sophios

doc-build-status

Sophios is a Python-first authoring layer for Common Workflow Language (CWL) workflows. It lets users describe command-line tool contracts, compose those tools into workflow DAGs, compile the graph to inspectable CWL, and run locally or prepare schema-validated compute submissions.

Documentation

The documentation is available on readthedocs.

Quick Start

See the installation guide for more details, but:

For pip users:

pip install sophios

Sophios installs its Python workflow-building and validation dependencies with the package. Some workflows also depend on external system tools such as Docker, Podman, Graphviz, Node.js, or the command-line programs invoked by your CWL tools.

For conda users / developers:

See the installation guide for developers

from pathlib import Path

from sophios.api.python.workflow import Step, Workflow


echo = Step(clt_path=Path("cwl_adapters") / "echo.cwl")
echo.inputs.message = "Hello World"

workflow = Workflow([echo], "hello_python")
compiled = workflow.compile()
compiled.write_cwl("autogenerated")
compiled.write_job_inputs("autogenerated")

For the file-native YAML path, the CLI still supports .wic workflows:

sophios --yaml docs/tutorials/helloworld.wic --graphviz --run_local --outdir helloworld_output --quiet

Sophios compiles both Python-authored workflows and .wic workflows to CWL. Users should inspect important generated DAGs and CWL artifacts before relying on edge inference in production workflows.

Python API

The public Python API is split into three deliberate surfaces:

  • sophios.api.python.tool_builder builds CWL CommandLineTool contracts.
  • sophios.api.python.workflow composes Step and Workflow DAGs.
  • sophios.compute_request packages compiled workflows for compute submission.

Use Workflow([steps], "name") to make the DAG explicit, Step(clt_path=...) for existing CWL tools, Step(tool) or tool.to_step() for in-memory tool-builder handoff, and workflow.compile() to produce the public compiled CWL boundary.

Edge Inference

Sophios can infer many linear edges based on CWL types, file formats, and naming conventions. In Python workflows, leaving a required step input unbound allows the compiler to apply the same inference mechanism used by .wic workflows. Inference is useful, but it is not a substitute for reviewing generated artifacts when correctness matters.

Subworkflows

Subworkflows are very useful for creating reusable, composable building blocks. As shown above, recursive subworkflows are fully supported, and the edge inference algorithm has been very carefully constructed to work across subworkflow boundaries.

Explicit CWL

Sophios produces ordinary CWL artifacts. Users do not need to write raw CWL for the common path, but generated CWL remains available for inspection, execution by CWL runners, and advanced integration.

Metadata

Release files for sophios 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sophios 0.6.0
File Size Uploaded
sophios-0.6.0.tar.gz 1.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for sophios 0.6.0
File Interpreter ABI Platform
sophios-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / sophios-0.6.0.tar.gz

Download URL sophios-0.6.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
f3872b52839cc9a855046c07f6ea70bb11196a3a2c60f2ac3dfdf2abd75cfc23
BLAKE2b-256 checksum
How to use checksums
c37ca928e4d64dd620e89e4d5c55bb32cc26ddc6a055aaafdd16380ade9a6e5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / sophios-0.6.0-py3-none-any.whl

Download URL sophios-0.6.0-py3-none-any.whl
Size 190.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebc8a3c905a8f7cc2fdfe52d49c1fb74fa8bc41bf19a846d7990c1ea54a7cf8f
BLAKE2b-256 checksum
How to use checksums
7699ac97e3ca01208ca8f4d479ddd56503032a0586ceeeaa8fb5d1668a9f91d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page