Skip to main content

rs-metadata

This repository generates and defines the LUMC CodeMeta profile with CodeMeta 3.1 vocabulary. It also checks consistency across the metadata in a repository. The project supports LUMC Research Software guidelines on metadata.

The documentation is available at lumc-dcc.github.io/rs-metadata.

Quick start

pip install rs-metadata
rs-metadata init

init creates missing codemeta.json, CITATION.cff, and CI workflow files. It uses metadata files and the git remote where possible, and it never overwrites existing files.

rs-metadata validate

tells you if you still missing real values.

If you already have the metadata files, you can add just one workflow:

name: Validate software metadata
on: [push, pull_request]

jobs:
  metadata:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: LUMC-DCC/rs-metadata@v1

What it checks

  • Profile conformance. Every field the profile includes, in a valid shape, with a valid JSON-LD context. Values are checked against their declared CodeMeta/schema.org types.
  • Value sanity. E.g., we check if identifiers (ORCID and ROR) and dates are of valid shape, if the licenses exist, and whether some placeholder values remain.
  • Cross-file consistency. codemeta.json is the anchor metadata; every other metadata file is compared against it.
flowchart LR
    S0[CITATION.cff]:::src --> N([normalized CodeMeta concepts]):::mid
    S1[github-repo.json]:::src --> N
    S2[.zenodo.json]:::src --> N
    S3[biotools.json]:::src --> N
    S4[pyproject.toml]:::src --> N
    S5[package.json]:::src --> N
    S6[DESCRIPTION]:::src --> N
    S7[Cargo.toml]:::src --> N
    S8[Project.toml]:::src --> N
    S9[Dockerfile]:::src --> N
    CM[codemeta.json<br/><i>anchor</i>]:::anchor --> N

    S0 ~~~ S1 ~~~ S2 ~~~ S3 ~~~ S4
    S5 ~~~ S6 ~~~ S7 ~~~ S8 ~~~ S9
    CM

    classDef src fill:#eef4fb,stroke:#5b8db8
    classDef anchor fill:#fdf1e2,stroke:#c98b34
    classDef mid fill:#f2f2f2,stroke:#888
Source Detected as Required
CodeMeta codemeta.json anchor
Citation File Format CITATION.cff yes
GitHub repository metadata github-repo.json auto-detected
Zenodo deposition metadata .zenodo.json auto-detected
bio.tools metadata biotools.json auto-detected
Python project metadata pyproject.toml auto-detected
npm package metadata package.json auto-detected
R package DESCRIPTION DESCRIPTION auto-detected
Rust package manifest Cargo.toml auto-detected
Julia project metadata Project.toml / JuliaProject.toml auto-detected
Dockerfile (OCI image labels) Dockerfile / Containerfile auto-detected

Comparison is semantic. https://spdx.org/licenses/Apache-2.0 equals Apache-2.0, git+https://github.com/o/t.git equals https://github.com/o/t, J. Carberry matches Josiah Carberry, >=1.24 equals >=1.24.0, and list order never matters.

It does not treat naming conventions as conflicts: a PyPI package named my-tool can match a citation title of MyTool. A dependency in only one file is incomplete metadata, not a contradiction.

Example output

ERROR [consistency.mismatch]
Property: version

  codemeta.json:10
    version = 1.4.0

  CITATION.cff:8
    version = 1.2.0

  version differs between codemeta.json and CITATION.cff.

  Suggested fix:
    Update whichever file is stale so both describe the same release.

In CI, the same finding becomes an inline annotation, a job summary, and a machine-readable report.

Commands

Command What it does
rs-metadata init Create any missing metadata files and CI workflow
rs-metadata validate Validate the current directory
rs-metadata validate --strict Treat warnings as failures
rs-metadata validate --format json Emit the machine-readable report
rs-metadata explain <code> Explain a diagnostic code

Exit status is 0 when the run passes, 1 when it fails, 2 for a usage error. Full reference: Running rs-metadata.

Contributing

Contributions are welcome! Please read CONTRIBUTING.md and Architecture.


License

This project is licensed under Apache 2.0. See the LICENSE file for details.

Metadata

Release files for rs-metadata 1.0.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 rs-metadata 1.0.0
File Size Uploaded
rs_metadata-1.0.0.tar.gz 306.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rs-metadata 1.0.0
File Interpreter ABI Platform
rs_metadata-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 665.7 kB

Release files / rs_metadata-1.0.0.tar.gz

Download URL rs_metadata-1.0.0.tar.gz
Size 306.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5db82bfb46b8691c604a5811c8eb7e7b6e4bd9c143a7551654c8faf4974fbafc
BLAKE2b-256 checksum
How to use checksums
67164a1528314e4cc73f3c02b8520acd3ea5b341c3b0173c8f7f81b1ea3e0d1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / rs_metadata-1.0.0-py3-none-any.whl

Download URL rs_metadata-1.0.0-py3-none-any.whl
Size 359.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
484d3059acbe517ab5ce66adf09dccdabc673c23625c0856233a2acd181278b1
BLAKE2b-256 checksum
How to use checksums
5f9b30cabece040a7b62388de24b0aa68aed2b9cd922c587d2b48cc237627b6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release 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