Skip to main content

cwl2ogc

PyPI - Version PyPI - Python Version

cwl2ogc converts CWL workflow/tool inputs and outputs into:

  • OGC API - Processes I/O descriptors
  • JSON Schema documents for those I/O definitions

This is useful when publishing CWL-based application packages through OGC API - Processes interfaces.

Why

The OGC API - Processes Deploy/Replace/Undeploy workflow requires a process description that exposes valid input and output metadata. cwl2ogc helps generate that description directly from CWL definitions.

Installation

pip install cwl2ogc

Python 3.10+ is required.

Quick Start (CLI)

Generate a process descriptor from a CWL document:

cwl2ogc tests/artifacts/cwl-types/inp.cwl \
  --workflow-id inp \
  --output process.json

Show command help:

cwl2ogc --help

Quick Start (Python API)

from cwl_utils.parser import load_document_by_uri
from cwl2ogc import BaseCWLtypes2OGCConverter

workflow = load_document_by_uri("tests/artifacts/cwl-types/inp.cwl#inp")
converter = BaseCWLtypes2OGCConverter(workflow)

inputs = converter.get_inputs()
outputs = converter.get_outputs()

inputs_json_schema = converter.get_inputs_json_schema()
outputs_json_schema = converter.get_outputs_json_schema()

Playground

Requirements:

  • docker
  • task

Run the published playground image:

task run-playground

Build and run the local playground image:

task run-playground-dev

Open http://127.0.0.1.

Development

Install development tooling with Hatch and run checks:

hatch run test:test-q
hatch run dev:check
hatch run dev:lint

Equivalent Taskfile targets:

task test
task check
task lint

Documentation

Project docs: https://eoap.github.io/cwl2ogc/

CLI docs: docs/cli.md

Contributing

Issues and pull requests are welcome: https://github.com/eoap/cwl2ogc/issues

Local quality checks

Install Hatch and Taskfiles then install the Git hook:

task quality:pre-commit:install

Every commit runs Ruff (including the configured McCabe complexity limit), Ruff formatting, strict mypy checks, and the pytest suite. Run the complete hook explicitly with:

task quality:pre-commit:run

License

Apache License, Version 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cwl2ogc-0.19.0.tar.gz (194.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cwl2ogc-0.19.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file cwl2ogc-0.19.0.tar.gz.

File metadata

  • Download URL: cwl2ogc-0.19.0.tar.gz
  • Upload date:
  • Size: 194.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for cwl2ogc-0.19.0.tar.gz
Algorithm Hash digest
SHA256 4338ae9369ba9fb450143c44795f833645e0c17bab7de9e4b6508f4c890629fe
MD5 428958506a03497d78f44a8884e73902
BLAKE2b-256 cdb77be597c081fbb937366acb6febcd861014ff849efbf8dfaa5532f3cca7e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for cwl2ogc-0.19.0.tar.gz:

Publisher: package.yaml on eoap/cwl2ogc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cwl2ogc-0.19.0-py3-none-any.whl.

File metadata

  • Download URL: cwl2ogc-0.19.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for cwl2ogc-0.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48fcc8ae4c24fde2e2649aa1db96ae135b5f3b13fb5d091d98a9edd7152b3b59
MD5 9c6bc6472a65bedbc829c5acd5f55bba
BLAKE2b-256 a62c7ae5d66b51c6d2e63033920192c941aead1900dd9d8626ff06300727d6e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cwl2ogc-0.19.0-py3-none-any.whl:

Publisher: package.yaml on eoap/cwl2ogc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.19.0 This release

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.4.0

2 files

0.3.0

2 files

0.1.0

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page