CCMM (Czech Core Metadata Model) components for NRP Invenio
Project description
CCMM-Invenio: CCMM runtime library for NRP Invenio
This library provides:
- Fixtures for vocabularies to support the CCMM model in NRP Invenio
- Schema serializers for the CCMM model
- Import and export modules 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 production repository, add the following model:
# models/datasets.py
production_dataset = model(
"production_dataset",
version="1.1.0",
presets=[
ccmm_production_preset,
],
configuration={
# "ui_blueprint": "myui
},
types=[
{
"Metadata": {
"properties": {
# your extensions come here, ccmm_production_preset will add
# all ccmm fields automatically
},
},
}
],
metadata_type="Metadata",
customizations=[],
)
# invenio.cfg
production_dataset.register()
How to generate new NMA and Production CCMM model mappings
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 CCMM model yaml files
Copy/paste 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, ccmm-invenio.yaml, ccmm-vocabularies.yaml, and gml-1.1.0.yaml files
in src/ccmm_invenio/models/<version>-<date>/ accordingly.
Then look at the src/ccmm_invenio/models/__init__.py file and add the new version
there.
Generate NMA Parser
CCMM_VERSION_DIR=1.1.0a1-2025-10-25
CCMM_VERSION=1.1.0
python ./src/ccmm_invenio/parsers/generate_parser.py \
./src/ccmm_invenio/models/$CCMM_VERSION_DIR/ccmm.yaml \
./src/ccmm_invenio/models/$CCMM_VERSION_DIR/ccmm-vocabularies.yaml \
./src/ccmm_invenio/models/$CCMM_VERSION_DIR/gml-1.1.0.yaml \
./src/ccmm_invenio/parsers/nma_$(echo "$CCMM_VERSION" | tr "." "_")$.py
Update production parser manually based on NMA parser
# file production_<version>.py
from .nma_<version> import CCMMXMLNMAParser
class CCMMXMLProductionParser(CCMMXMLProductionParserBase, CCMMXMLNMAParser):
"""Parser for CCMM XML version 1.1.0 for production repository."""
# tweaks here
TODO: imports, exports
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccmm_invenio-1.1.0a9.tar.gz.
File metadata
- Download URL: ccmm_invenio-1.1.0a9.tar.gz
- Upload date:
- Size: 390.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
279536bbdecdb600628829e8dac1e82bdb18cd2054413e6211a0680e5a36f7d8
|
|
| MD5 |
91e1832400657acff25bf27790a39902
|
|
| BLAKE2b-256 |
f09921cf2a34d94cdc565eaf9be4a475880fb79633f4b1932128806328ed3afc
|
File details
Details for the file ccmm_invenio-1.1.0a9-py3-none-any.whl.
File metadata
- Download URL: ccmm_invenio-1.1.0a9-py3-none-any.whl
- Upload date:
- Size: 420.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6e23ddbb7e2de28382440f9ac75515ee3e8aaa41aaadfc79de4b5e173a72f56
|
|
| MD5 |
80afa4bb8b4e42a8dba9d1f909e57c02
|
|
| BLAKE2b-256 |
b36b75dc0bfe508521fb99ce42289b450bc62aab93febb6df139d3be3e01ee18
|