Skip to main content

rsm-schema

This repository defines the Research Software Management (RSM) Metadata Schema and its Python representation.

The package includes:

  • the JSON Schema itself
  • generated Pydantic v2 models for validating RSM documents
  • a small inspection API for traversing the JSON Schema

The documentation is available at lumc-dcc.github.io/rsm-schema.

Quick start

pip install rsm-schema

Python 3.14 is required.

Validate a document

RSMMetadata is the document root. Only project_slug is required.

from rsm_schema import RSMMetadata, validate_document

document = {
    "project_slug": "my-project",
    "project_name": "My Project",
    "development_status": "wip",
    "topics": {
        "entries": [
            {
                "term": "Data analysis",
                "uri": "https://edamontology.org/topic_3474",
            }
        ]
    },
    "contributors": {
        "entries": [
            {
                "name": "Ada Lovelace",
                "email": "ada@example.org",
                "roles": ["Original author", "Maintainer"],
                "affiliations": [
                    {"name": "Leiden University Medical Center"},
                    {"name": "Leiden University"},
                ],
            }
        ]
    },
}

validate_document(document)
metadata = RSMMetadata.model_validate(document)

print(metadata.contributors.entries[0].affiliations[0].name)
print(metadata.topics.entries[0].term)

topics describes the project-level research domains using EDAM terms. Function-specific software_functions separately describes operations, inputs, outputs, commands, and notes.

validate_document() is the authoritative validation path and enforces JSON Schema conditionals that generated Pydantic models cannot represent.

Inspect the schema

from rsm_schema import schema

print(schema.title)

for field in schema.root.properties:
    print(field.name, field.types, field.required)

person = schema.definition("person")
for field in person.properties:
    print(field.pointer, field.types, field.required)

SchemaNode.resolve() follows local JSON Pointer $ref values, and Schema.walk() traverses properties, definitions, array items, and composition keywords such as oneOf, anyOf, and allOf. External references are never fetched.

Development

git clone https://github.com/lumc-dcc/rsm-schema.git
cd rsm-schema
poetry install --with dev,docs
poetry run pre-commit install
poetry run pre-commit run --all-files
poetry run pytest

The JSON Schema at src/rsm_schema/schema/rsm.schema.json is canonical. After changing it, regenerate the models and commit both together:

poetry run datamodel-codegen
poetry run pytest

Build the documentation locally with:

poetry run sphinx-build -b html -W --keep-going docs docs/_build/html

Released schemas are archived under schema-archive/, one immutable directory per version. The documentation site publishes every archived version so versioned $refs continue to resolve. See CONTRIBUTING.md and the schema workflow for the release steps.


License

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

Metadata

Release files for rsm-schema 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 rsm-schema 1.0.0
File Size Uploaded
rsm_schema-1.0.0.tar.gz 25.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rsm-schema 1.0.0
File Interpreter ABI Platform
rsm_schema-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.2 kB

Release files / rsm_schema-1.0.0.tar.gz

Download URL rsm_schema-1.0.0.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ec270e1f50976495cb93bc9df7add67f7915623cc5e992c506c2d09d25faec25
BLAKE2b-256 checksum
How to use checksums
86157a4282563c40553d66bb06d7f59b586b59607c24a5f9fabcd64bde5be3f5
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 Oct 12, 2026.

Transparency log

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

Download URL rsm_schema-1.0.0-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9789411a28b3208c19c99f17d80ca61731c668908d364679ac29ab183e45af54
BLAKE2b-256 checksum
How to use checksums
4bf17550182884dd5d1f7dcc41080b2d7277f23fd3da641d735db8b178da91e3
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 Oct 12, 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