Skip to main content

CoMET-RS — Code Metadata Extraction Toolkit for Research Software

DOI License: GPL-3.0

CoMET-RS extracts FAIR (Findable, Accessible, Interoperable, Reusable), machine-actionable metadata from GitHub, GitLab, and Codeberg repositories, and outputs it as JSON-LD conforming to a schema of your choice (ConnOSS, maSMP, or CODEMETA).

It ships as both a command-line tool (comet-rs) and a Python library (comet_rs).

Installation

Requires Python 3.10 or higher.

pip install comet-rs

CLI usage

After installation, the comet-rs command is available on your PATH.

comet-rs --help
usage: comet-rs [-h] {extract,extract_property,fairness} ...

Extract metadata (and per-property sources) from code repositories, for any
supported schema.

Extract full metadata

comet-rs extract <url> <schema> [--schema-class SCHEMA_CLASS] [--token TOKEN] [--with-enrichment]
  • url — Repository URL (GitHub, GitLab, or Codeberg).
  • schema — Schema to use: connoss, maSMP, or CODEMETA (case-insensitive).
  • --schema-class — Schema class to use (default: software).
  • --token — Personal access token for the platform. If omitted, CoMET-RS looks for GITHUB_TOKEN, GITLAB_TOKEN, or CODEBERG_TOKEN in the environment, based on the repository URL. A token increases API rate limits and allows access to private repositories.
  • --with-enrichment — Include per-property enrichment metadata (source, confidence, category) alongside the extracted JSON-LD.

Example:

comet-rs extract https://github.com/zbmed-semtec/comet-metadata-extraction connoss --with-enrichment

Output (written to stdout as JSON):

{
  "schema": "connoss",
  "code_url": "https://github.com/zbmed-semtec/comet-metadata-extraction",
  "results": { "...": "JSON-LD metadata document..." },
  "enriched_metadata": { "...": "per-property source/confidence/category..." }
}

Extract a single property

comet-rs extract_property <url> <property> [--schema SCHEMA] [--schema-class SCHEMA_CLASS] [--token TOKEN]
  • url — Repository URL.
  • property — Property name, e.g. name, identifier, codemeta:referencePublication, or codemeta_referencePublication.
  • --schema — Schema to use (default: connoss).
  • --schema-class — Schema class to use (default: software).
  • --token — See above.

Example:

comet-rs extract_property https://github.com/zbmed-semtec/comet-metadata-extraction license

Output:

{
  "property_name": "license",
  "property_value": ["GPL-3.0"],
  "source": "github_api",
  "confidence": 0.95
}

FAIRness assessment

comet-rs fairness <url> [--token TOKEN]

Runs a FAIRness assessment of the repository against the ConnOSS schema.

Example:

comet-rs fairness https://github.com/zbmed-semtec/comet-metadata-extraction

Note: the FAIRness assessment feature is under active revision upstream and may change or be temporarily limited in future releases.

Authentication

CoMET-RS works without authentication, but unauthenticated requests are subject to strict API rate limits on GitHub/GitLab/Codeberg, and cannot access private repositories. Provide a token via --token, or set one of the following environment variables (selected automatically based on the repository URL):

export GITHUB_TOKEN=your_github_token
export GITLAB_TOKEN=your_gitlab_token
export CODEBERG_TOKEN=your_codeberg_token

Python API

CoMET-RS can also be used as a library:

import comet_rs

# Full extraction
result = comet_rs.extract_metadata(
    repo_url="https://github.com/zbmed-semtec/comet-metadata-extraction",
    schema_name="connoss",       # or "maSMP" / "CODEMETA"
    schema_class="Software",
    token=None,                  # or rely on GITHUB_TOKEN / GITLAB_TOKEN / CODEBERG_TOKEN
    with_enrichment=True,
)

# Single property
result = comet_rs.extract_property(
    repo_url="https://github.com/zbmed-semtec/comet-metadata-extraction",
    property_name="author",
    schema_name="connoss",
)
for prop,findings in result.extraction_state.metadata_collector.data.items():
  print(prop)
  for finding in findings:
    print(" -", finding.source, finding.property_value)

Supported schemas

  • ConnOSS
  • maSMP
  • CODEMETA

Supported platforms

  • GitHub
  • GitLab
  • Codeberg

Other ways to run CoMET

CoMET-RS is also available as a web API (via Docker or manual installation) and previously shipped a web frontend (now discontinued/in migration). See the full project documentation on GitHub for Docker Compose instructions, the FastAPI/Swagger backend, and architecture details: https://github.com/zbmed-semtec/comet-metadata-extraction

Citation

If you use CoMET-RS in your research, please cite it using the metadata in CITATION.cff on the GitHub repository: https://github.com/zbmed-semtec/comet-metadata-extraction/blob/main/CITATION.cff

License

CoMET-RS is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.

Release files for comet-rs 0.4.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 comet-rs 0.4.0
File Size Uploaded
comet_rs-0.4.0.tar.gz 70.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for comet-rs 0.4.0
File Interpreter ABI Platform
comet_rs-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 158.8 kB

Release files / comet_rs-0.4.0.tar.gz

Download URL comet_rs-0.4.0.tar.gz
Size 70.4 kB
Tags Source
SHA-256 checksum
How to use checksums
88fa67014f3e00d627cbd5520ab75e73e7cbcd32b73529e4ed1c01429b14dce1
BLAKE2b-256 checksum
How to use checksums
9ca51b9634258c90943b617d26da4ea2e9276259aa5600720c2c1d070d7fc89a
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 23, 2026.

Transparency log

Release files / comet_rs-0.4.0-py3-none-any.whl

Download URL comet_rs-0.4.0-py3-none-any.whl
Size 88.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b8a056845efbfa1b09e3667bb6b0ec46740c2a0e2dac7264ab89dd67b88fcde
BLAKE2b-256 checksum
How to use checksums
8d70d3c952166f8161d7d94df90d0f334de33093adfe442baa78dabb6fc68484
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 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.3

2 release files

0.4.2

2 release files

This release

0.4.0 This release

2 release files

0.1.1

2 release files

0.1.0

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