Skip to main content

Schema.org 2 metadata formats transpiler

Project description

Transpiler Mate

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.
  • 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]

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

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 test
  • task check
  • task lint

License

Apache License 2.0. See LICENSE.

Project details


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.32.0.tar.gz (848.5 kB 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.32.0-py3-none-any.whl (221.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: transpiler_mate-0.32.0.tar.gz
  • Upload date:
  • Size: 848.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for transpiler_mate-0.32.0.tar.gz
Algorithm Hash digest
SHA256 171ab2e7324c05abc691768c528857109db6b722ad462083bd1858bd52d02d39
MD5 bb950d340f62b3bc8f3585780d3054e5
BLAKE2b-256 90cdf1767883833e8c21a9d32472d9a156cdbf104a464fbcd99b3060fd9f797d

See more details on using hashes here.

Provenance

The following attestation bundles were made for transpiler_mate-0.32.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.32.0-py3-none-any.whl.

File metadata

File hashes

Hashes for transpiler_mate-0.32.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7d02ea02ec9392e25e8d2fa3fb64920cd98ced002c4ddc0e0c4e624089a5a16
MD5 18c77b91c04b7c29c3a5b8df1f27cffe
BLAKE2b-256 cbae3b2d8ae58d904d0c4e5d654744a75f8624d5165583855ac7d15357f32282

See more details on using hashes here.

Provenance

The following attestation bundles were made for transpiler_mate-0.32.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.

Supported by

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