Skip to main content

Transpiler Mate

PyPI - Version PyPI - Python Version

Transpiler Mate is a Python library and CLI that extracts schema.org/SoftwareApplication metadata from annotated CWL documents and converts it into publication-ready formats.

What It Does

Given an input CWL metadata source, Transpiler Mate can:

  • Generate CodeMeta JSON-LD.
  • Generate DataCite metadata payloads.
  • Generate OGC API - Records payloads.
  • Generate Markdown documentation for workflows.
  • Generate OCI Annotations.
  • Bundle CWL documents into self-contained files with external references resolved.
  • Publish records to InvenioRDM.
  • Bump semantic versions in metadata files.

Documentation: https://terradue.github.io/transpiler-mate/

Supported Outputs

Requirements

  • Python >= 3.10

Installation

From source (recommended for development)

git clone https://github.com/Terradue/transpiler-mate.git
cd transpiler-mate
pip install -e .

Install tooling for local workflows

pip install hatch ruff

CLI Usage

Entry point:

transpiler-mate --help

Main commands:

  • transpiler-mate codemeta <source> [--code-repository URL] [--output codemeta.json]
  • transpiler-mate datacite <source> [--output datacite.json]
  • transpiler-mate ogcrecord <source> [--output record.json]
  • transpiler-mate markdown <source> --workflow-id <id> [--output DIR] [--code-repository URL]
  • transpiler-mate oci-annotations <source> --workflow-id <id> [--image-source URL] [--image-revision ] [--output annotations.json]
  • transpiler-mate invenio-publish <source> --base-url URL --auth-token TOKEN [--attach FILE ...]
  • transpiler-mate bump-version <source> [--version-part major|minor|patch|build|pre-release]
  • transpiler-mate bundle <source> [--output bundle.cwl] [--oci-hostname HOST] [--oci-username USER] [--oci-password PASSWORD] [--oauth2-bearer TOKEN]

Examples

Generate CodeMeta:

transpiler-mate codemeta ./metadata.cwl --output ./dist/codemeta.json

Generate DataCite metadata:

transpiler-mate datacite ./metadata.cwl --output ./dist/datacite.json

Generate OGC Record:

transpiler-mate ogcrecord ./metadata.cwl --output ./dist/record.json

Generate Markdown documentation:

transpiler-mate markdown ./workflow.cwl --workflow-id main --output ./docs

Bundle a CWL document and resolve its external references:

transpiler-mate bundle ./workflow.cwl --output ./dist/bundle.cwl

The bundle command was migrated from the CWL Loader CLI.

Publish to InvenioRDM:

export INVENIO_AUTH_TOKEN="<token>"
transpiler-mate invenio-publish ./metadata.cwl --base-url https://invenio.example.org --auth-token "$INVENIO_AUTH_TOKEN"

Development

Run lint and formatting checks:

hatch run dev:check
hatch run dev:lint

Run tests for one interpreter:

hatch run test.py3.12:test-q

Run full Hatch test matrix (local environment permitting):

hatch run test:test-q

Project Tasks

Taskfile.yaml includes helper tasks for schema/model generation and quality checks:

  • task quality:test
  • task quality:lint
  • task quality:check

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](https://img.shields.io/badge/license-Apache%20License%202.0-blue)](https://www.apache.org/licenses/LICENSE-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

transpiler_mate-0.49.0.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

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

transpiler_mate-0.49.0-py3-none-any.whl (248.5 kB view details)

Uploaded Python 3

File details

Details for the file transpiler_mate-0.49.0.tar.gz.

File metadata

  • Download URL: transpiler_mate-0.49.0.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for transpiler_mate-0.49.0.tar.gz
Algorithm Hash digest
SHA256 a7ae280950cf0417861bdca9953d22f985c570f4a776af8250669c7a091f8f62
MD5 39f5eb510af5b7d8f8b0c5e3daed26cf
BLAKE2b-256 722f21018057b3e3c0a1f4a4dc9ac8fc030b3b508cbcd88482554abf43f57f4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for transpiler_mate-0.49.0.tar.gz:

Publisher: package.yaml on Terradue/transpiler-mate

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

File details

Details for the file transpiler_mate-0.49.0-py3-none-any.whl.

File metadata

File hashes

Hashes for transpiler_mate-0.49.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67d63b5390ff8eb52b03bf2e8f2f5e3ca84583c6827a478fd993376c9f85d7f6
MD5 e1ecf3cfb82affd1979975c18ad45c0f
BLAKE2b-256 b7dc21f7bd9626ceb029c3b93a0f2b371696a2443b50f2f0f3d84a309a09e902

See more details on using hashes here.

Provenance

The following attestation bundles were made for transpiler_mate-0.49.0-py3-none-any.whl:

Publisher: package.yaml on Terradue/transpiler-mate

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

Release history Release notifications | RSS feed

0.50.0

2 files

This release

0.49.0 This release

2 files

0.48.0

2 files

0.47.0

2 files

0.46.0

2 files

0.45.0

2 files

0.44.0

2 files

0.43.0

2 files

0.42.0

2 files

0.41.0

2 files

0.40.0

2 files

0.39.0

2 files

0.38.0

2 files

0.37.0

2 files

0.36.0

2 files

0.35.0

2 files

0.34.0

2 files

0.33.0

2 files

0.32.0

2 files

0.31.0

2 files

0.30.0

2 files

0.29.0

2 files

0.28.0

2 files

0.27.0

2 files

0.26.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

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.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

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