CCMM-Invenio: CCMM runtime library for NRP Invenio
This library provides:
- an OARepo model preset for CCMM datasets (
ccmm_preset_1_1_0) - CCMM XML import and export (REST, OAI-PMH)
- vocabulary fixtures for the CCMM model
- UI components for working with the CCMM model in NRP Invenio
Installation
pip install ccmm-invenio
Usage
To use CCMM in a repository, add the following model:
# models/datasets.py
from ccmm_invenio.models import ccmm_preset_1_1_0
ccmm_dataset = model(
"ccmm_dataset",
version="1.1.0",
presets=[
ccmm_preset_1_1_0,
],
configuration={
# "ui_blueprint": "myui
},
types=[
{
"Metadata": {
"properties": {
# your extensions come here, ccmm_preset_1_1_0 will add
# all ccmm fields automatically
},
},
}
],
metadata_type="Metadata",
customizations=[],
)
# invenio.cfg
ccmm_dataset.register()
ccmm_production_preset_1_1_0 is an alias of ccmm_preset_1_1_0.
The preset adds the CCMM XML import and export (application/vnd.ccmm+xml,
also OAI-PMH with the ccmm metadata prefix). See AGENTS.md for the design of the
model and of the CCMM conversion.
How to adapt to a new CCMM version
Download and pre-process CCMM XML
Follow the instructions in ccmm_versions/README.md to download and pre-process
the CCMM XML schemas for the desired version. This will create:
- Cleaned XSD files in
ccmm_versions/src/ccmm_versions/ccmm-<version>-<date>/out - A diff file in
ccmm_versions/diffs/comparing the new version to the previous one - A schema overview in
ccmm_versions/summaries/ccmm-<version>-<date>.summary.md
Adapt the model yaml files
Copy the model in src/ccmm_invenio/models/<previous-version>-<date>/ to
src/ccmm_invenio/models/<new-version>-<date>/.
Look at the diff file generated in the previous step and adapt the
ccmm.yaml (the CCMM types used by the model), ccmm-invenio.yaml (the dataset, RDM based)
and ccmm-vocabularies.yaml files in src/ccmm_invenio/models/<version>-<date>/ accordingly.
Then add the new version to src/ccmm_invenio/models/__init__.py, the new XSD to
src/ccmm_invenio/resources/serializers/ccmm/xsd/ (updating the path in
converter.py) and adapt the marshmallow schemas in
src/ccmm_invenio/resources/serializers/ccmm/schema/.
Metadata
Release files for ccmm-invenio 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ccmm_invenio-2.0.1.tar.gz | 918.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ccmm_invenio-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / ccmm_invenio-2.0.1.tar.gz
| Download URL | ccmm_invenio-2.0.1.tar.gz |
|---|---|
| Size | 918.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e828fc9b050a19f404dd66d062c833f3dcc7abb2ab9cfd6e53b22f3a27109410
|
|
BLAKE2b-256 checksum How to use checksums |
98e324e41c89499bf63a084a9f894cb56dabb3fe09df2c1d0134ca8d10564c4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / ccmm_invenio-2.0.1-py3-none-any.whl
| Download URL | ccmm_invenio-2.0.1-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e677428a3a57bd796c5cfed84a54c53aed05ceb2178d28ca0e60ec09d4dcea24
|
|
BLAKE2b-256 checksum How to use checksums |
23d8186c6bff0017e6deceed5cd5a0da653a2d410bdb5449d5d59abd319c6ea1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|