Skip to main content

fairscape-conversion

Your metadata is already written down — as a datasheet, a datapackage, or a workflow engine's run output. Convert it into a FAIRSCAPE/EVI RO-Crate (ro-crate-metadata.json) instead of re-entering it. One command per format.

pip install -e .        # from this directory; installs fairscape-conversion

The fairscape import / fairscape export commands come with the companion fairscape CLI (not yet published). Without it, every conversion also runs as python -m fairscape_conversion.core.cli convert <format> <import|export> IN [OUT].

Import — get an RO-Crate

Pick the row that matches what you have.

You have You need Run
A Datasheet for Datasets (D4D) the datasheet as YAML or JSON fairscape import d4d datasheet.yaml -o ./crate
A CFDE C2M2 datapackage the directory of TSVs + C2M2_datapackage.json fairscape import c2m2 ./datapackage-dir -o ./crate
A Workflow Run RO-Crate its ro-crate-metadata.json fairscape import wrroc ro-crate-metadata.json -o ./crate
A finished Cromwell/WDL run the file from cromwell run -m metadata.json fairscape import cromwell metadata.json -o ./crate
A finished Snakemake run the records JSON from snakemake --reporter fairscape fairscape import snakemake records.json -o ./crate
Finished MLflow runs the tracking store (an mlruns dir or tracking URI) and pip install mlflow fairscape import mlflow ./mlruns --experiment NAME -o ./crate

Export — from an RO-Crate

You want Run
A D4D datasheet fairscape export d4d ro-crate-metadata.json
A Workflow Run RO-Crate fairscape export wrroc ro-crate-metadata.json
An MLCommons Croissant document fairscape export croissant ro-crate-metadata.json

Try it — no data needed

Every format ships a real example input and its expected output inside its plugin folder, so you can run any conversion right now:

fairscape import d4d plugins/d4d/input.yaml -o /tmp/crate
format example input expected output
d4d plugins/d4d/input.yaml (the AI-READI datasheet) plugins/d4d/golden.json
c2m2 plugins/c2m2/input-datapackage/ (miniature datapackage) plugins/c2m2/golden.json
wrroc plugins/wrroc/input.json (CWL revsort run crate) plugins/wrroc/golden.json
cromwell plugins/cromwell/input.json (scatter workflow records) plugins/cromwell/golden.json
snakemake plugins/snakemake/input.json (3-rule chain records) plugins/snakemake/golden.json
mlflow plugins/mlflow/input.json (iris experiment records) plugins/mlflow/golden.json
croissant plugins/croissant/input.json (export this crate) plugins/croissant/golden.json

From Python

import yaml
from fairscape_conversion.plugins import d4d

crate = d4d.convert("import", yaml.safe_load(open("datasheet.yaml")))

Same shape for every format: wrroc, c2m2, cromwell, snakemake, mlflow (convert("import", ...)), and d4d/wrroc/croissant (convert("export", crate)).

More

Download files

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

Source Distribution

fairscape_conversion-0.1.0.tar.gz (144.0 kB view details)

Uploaded Source

Built Distribution

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

fairscape_conversion-0.1.0-py3-none-any.whl (167.8 kB view details)

Uploaded Python 3

File details

Details for the file fairscape_conversion-0.1.0.tar.gz.

File metadata

  • Download URL: fairscape_conversion-0.1.0.tar.gz
  • Upload date:
  • Size: 144.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for fairscape_conversion-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7f540486218eaa688ade1d5687d8ec3e79649296a631b191e7ed60e19d55a8b3
MD5 5734e2ae5d7b13d392ae62d7102fbc65
BLAKE2b-256 0237b86c83ba5635c9a0376112d0698245818a9123b98bda2d210d4476b04154

See more details on using hashes here.

File details

Details for the file fairscape_conversion-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fairscape_conversion-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d35d2ba037670faffa362552160a8084f863742c8afb071240501ea95fa5133
MD5 ab919cecc0696ca921cc24d6ed787c07
BLAKE2b-256 af8a6c5acf0ffe9188547ee4916036e5495b94c2fa0d98d3d40fb407bc4e9ee4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

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