Skip to main content

invenio-subjects-mesh

MeSH topical subject terms with qualifiers for InvenioRDM

Install this extension to get Medical Subject Headings topics with qualifiers into your instance.

If you are looking for a smaller MeSH vocabulary without the qualifiers, use invenio-subjects-mesh-lite instead.

[!NOTE] Both extensions map the MeSH subject id, so you can only install one of them. However, they use the same pattern for subject ids, so you can switch from one to the other easily if your needs change in the future.

Installation

From your instance directory:

uv add invenio-subjects-mesh

Versions

From 2025.1.15.2 onwards

This package follows the following format for versions: YYYY.mm.dd.patch where

  • YYYY.mm.dd is the date of retrieval of the MeSH terms with mm and dd NOT being 0-prefixed.
  • patch is the patch number (0-indexed) so that multiple releases can be done on the same day (bug/security fixes) and non-subject related releases can be done as well.

This follows calendar versioning (for year, month, and day) and adds a patch number at the end. The package is typically updated on a quarterly basis. The following are illustrative (fictitious) examples of how to understand the versioning of this distribution package:

Last MeSH update included patch number version of this project
2025-06-31 2 2025.6.31.2
2025-12-01 0 2025.12.1.0

Prior to 2025.1.15.2

This repository follows calendar versioning for year and month. It does a "best effort" attempt at tracking the MeSH updates in an up-to-and-including version date manner. The following are illustrative cases of how to understand the versioning of this distribution package:

Last MeSH update included version of this project date of release of this project
2024-01-31 2024.1.X any time after 2024-01-31
2023-12-31 2023.12.X any time after 2023-12-31

2021.06.18 is both a valid semantic version and an indicator of the year-month corresponding to the loaded terms. 18 here is a patch number (not a day).

Usage

There are 2 types of users for this package. Instance administrators and package maintainers.

Instance operators

For instance operators, after you have installed the extension as per the steps above, you will want to reload your instance's fixtures: uv run invenio rdm-records fixtures. This will install the new terms in your instance.

Alternatively, or if you want to update your already loaded subjects to a new listing (e.g. from one year's list to another), you can update your instance's MeSH subjects as per below. Updating subjects this way takes care of everything for you: the subjects themselves and the records/drafts using those subjects. WARNING This operation can remove subjects.

# In your instance's project
# Download up-to-date listings
uv run invenio galter_subjects mesh download -d /path/to/downloads/storage/ -y YEAR
# Generate file containg deltas to transition your instance to the downloaded listing
uv run invenio galter_subjects mesh deltas -d /path/to/downloads/storage/ -y YEAR -f topic-qualifier -o deltas_mesh.csv
# Update your instance - *this operation will modify your instance*
uv run invenio galter_subjects update deltas_mesh.csv

Look at the help text for these commands to see additional options that can be passed. In particular, options for galter_subjects update allow you to store renamed, replaced or removed subjects on records according to a template of your choice.

Maintainers

When a new list of MeSH term comes out, this package should be updated. Here we show how.

Pre-requisite/Context

Install the distribution package for development before you do anything.

Commands

Once you have it installed, you can run the following commands in the isolated virtualenv:

# In this project
# Download up-to-date listings
(venv) invenio galter_subjects mesh download -d /path/to/downloads/storage/ -y YEAR
# Generate file containing initial listing
(venv) invenio galter_subjects mesh file -d /path/to/downloads/storage/ -y YEAR -f topic-qualifier -o invenio_subjects_mesh/vocabularies/subjects_mesh.csv

When you are happy with the list, bump the version in pyproject.toml and release it.

Development

Install the project in editable mode with dev dependencies in an isolated virtualenv:

uv run pip install -e .[dev]

Run tests:

uv run inv test

Test compatibility with the pre-release version of InvenioRDM (invenio-app-rdm):

uv run --extra dev_pre --prerelease=allow inv test

Clean out artefacts:

uv run inv clean

Download files

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

Source Distribution

invenio_subjects_mesh-2026.1.27.1.tar.gz (5.2 MB view details)

Uploaded Source

Built Distribution

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

invenio_subjects_mesh-2026.1.27.1-py3-none-any.whl (5.2 MB view details)

Uploaded Python 3

File details

Details for the file invenio_subjects_mesh-2026.1.27.1.tar.gz.

File metadata

File hashes

Hashes for invenio_subjects_mesh-2026.1.27.1.tar.gz
Algorithm Hash digest
SHA256 2c04bc3ccf84d15c4455c75f456df3b7a5d5d8c3c943ab136a54a108cd077a3b
MD5 200964c6d33c78c9ff0ee1bfa1516f04
BLAKE2b-256 96fc9bcd8a2f9e0ef59bff4a31e1faff2f66d040278371d2026dead7a1ad7a34

See more details on using hashes here.

Provenance

The following attestation bundles were made for invenio_subjects_mesh-2026.1.27.1.tar.gz:

Publisher: publish-to-pypi.yml on galterlibrary/invenio-subjects-mesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file invenio_subjects_mesh-2026.1.27.1-py3-none-any.whl.

File metadata

File hashes

Hashes for invenio_subjects_mesh-2026.1.27.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42fb53d7f9213fa0a0098fc1cb18ea21da8879f3e9a06861bf1a61c3d75b54d3
MD5 ca8d7ce140092a21fe3256642162adb5
BLAKE2b-256 8420fae3ebc0fbe96c742c8da116a3c672d361b2502c7536d91c357140d54bef

See more details on using hashes here.

Provenance

The following attestation bundles were made for invenio_subjects_mesh-2026.1.27.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on galterlibrary/invenio-subjects-mesh

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 Sentry Error logging StatusPage Status page