Skip to main content

MeSH subject terms with qualifiers

Project description

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:

pipenv install invenio-subjects-mesh

This will add it to your Pipfile.

Versions

This repository follows calendar versioning for year and month:

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

So far the package is compatible with InvenioRDM 9.1+'s subjects "ABI". If there is a breaking change, a compatibility table will be provided to indicate which version is compatible with with InvenioRDM's "ABI".

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: pipenv 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
pipenv 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
pipenv 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*
pipenv 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 ((venv) denotes that going forward):

(venv) pip install -e .[dev]
# or if using pipenv
pipenv run pip install -e .[dev]

Run tests:

(venv) invoke test
# or shorter
(venv) inv test
# or if using pipenv
pipenv run inv test

Check manifest:

(venv) inv check-manifest
# or if using pipenv
pipenv run inv check-manifest

Clean out artefacts:

(venv) inv clean
# or if using pipenv
pipenv run inv clean

Project details


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-2024.3.5.tar.gz (5.2 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for invenio_subjects_mesh-2024.3.5.tar.gz
Algorithm Hash digest
SHA256 231d7700646572fd2bbac716220fab8537d5e5870799b8f359ee6d3d49f98fa5
MD5 75793bc7c604a6deed94295d131a152c
BLAKE2b-256 10fb8451c36bbdf48032ee1a71d8fda5bb9742e7a8944e756b1254dea8a74308

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for invenio_subjects_mesh-2024.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 85421b8927d038f8eb7550eba3ec7efb0bdaf0a240b5313cd8c65543cc905cba
MD5 db4742c166134bac0f1de9b7ddb16142
BLAKE2b-256 4c0997260a13418b4620fc942f9271f17ad122229b4f6833c06534187631e2d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page