Skip to main content

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

Metadata

Release files for ccmm-invenio 1.1.25

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ccmm-invenio 1.1.25
File Size Uploaded
ccmm_invenio-1.1.25.tar.gz 501.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ccmm-invenio 1.1.25
File Interpreter ABI Platform
ccmm_invenio-1.1.25-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / ccmm_invenio-1.1.25.tar.gz

Download URL ccmm_invenio-1.1.25.tar.gz
Size 501.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a4c3531d39f05cdbd66db1c6b2ccd8f7b619547b974639cbf8746fdece4b977d
BLAKE2b-256 checksum
How to use checksums
98ab21c11bcdee4162ffdbc05d6f2e81f8b732e3f1f55b6aea5a19ca940f553a
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-1.1.25-py3-none-any.whl

Download URL ccmm_invenio-1.1.25-py3-none-any.whl
Size 557.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db3970d96f139e346c983dc39026f54df057cf658d4d295a016b048544c49f7a
BLAKE2b-256 checksum
How to use checksums
2d6eab776b7a5b5d268e610c7108bc5bf14281e33b7a824970821250b8fff092
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.1.27

2 release files

1.1.26

2 release files

This release

1.1.25 This release

2 release files

1.1.24

2 release files

1.1.23

2 release files

1.1.21

2 release files

1.1.18

2 release files

1.1.17

2 release files

1.1.16

2 release files

1.1.15

2 release files

1.1.14

2 release files

1.1.13

2 release files

1.1.10

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

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