Skip to main content

MDF Enforced Validator and Loader (MEVAL)

MDF Enforced Validator and Loader is a lightweight and modular framework designed to ensure data integrity through MDF enforced validation and seamless data ingestion into the graph database. This repository serves as the source code for MEVAL, providing tools, scripts, and workflows to validate and load data to graph database using Graph Model Description Format (MDF) as the source of accessing model features.

Core Modules

MEVAL includes three core classes under the meval package that work together to support model-aware validation and graph loading workflows:

ModelParser (meval/parser.py)

ModelParser wraps bento_mdf.MDFReader and provides easy access to MDF model metadata.(bento_mdf repository: https://github.com/CBIIT/bento-mdf)

It is used to inspect node definitions, key properties, required fields, parent-child relationships, property types, and permissible values. This class is the model introspection layer used by both validation and loading logic.

Loader (meval/loader.py)

Loader handles graph database ingestion for TSV data files. It reads files in chunks, prepares node properties and relationships from each chunk, and performs upsert operations (MERGE semantics) for nodes and edges. It also includes helper methods for index creation, duplicate cleanup, and graph maintenance tasks such as finding floating/orphan nodes (nodes without a path to a root node, such as study/program node).

Validator (meval/validator.py)

Validator enforces MDF-based data quality checks before loading. It validates TSV file format, validates record-level values against model constraints, checks relationship consistency across files, and supports unique-entry checks. It also provides utilities such as deterministic UUID generation and adding UUID columns to TSV files.

Installation

Prerequisites

  • Python 3.13

Install from source

  1. Clone this repository.
  2. Create and activate a virtual environment.
  3. Install dependencies:
    • pip install -r requirements_python3.13.txt
  4. Install the package:
    • pip install .

Example Usage (Imports and Instances)

from neo4j import GraphDatabase
from meval.loader import Loader
from meval.parser import ModelParser
from meval.validator import Validator

# Create ModelParser
model_parser = ModelParser(
   model_file="tests/test_files/ccdi-dcc-model-test.yml",
   props_file="tests/test_files/ccdi-dcc-model-props-test.yml",
   handle="ccdi_dcc",
)

# Create Validator (uses MDF object from ModelParser)
validator = Validator(mdf=model_parser.mdf)

# Create Loader
driver = GraphDatabase.driver(
   "bolt://localhost:7687",
   auth=("neo4j", "your_password"),
)
loader = Loader(driver=driver)

Metadata

Release files for ctos-meval 1.1.1

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

Source distribution (sdist)

Source distribution for ctos-meval 1.1.1
File Size Uploaded
ctos_meval-1.1.1.tar.gz 37.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ctos-meval 1.1.1
File Interpreter ABI Platform
ctos_meval-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 70.9 kB

Release files / ctos_meval-1.1.1.tar.gz

Download URL ctos_meval-1.1.1.tar.gz
Size 37.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6bf5b3d61206c094ce9249720ce5931164b9f253707d31cc05fcc015bf9fd9c1
BLAKE2b-256 checksum
How to use checksums
ee9976e7c57341fadcc07a819510ee07831e9bb4ae2c1b76deb55c27d97499ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / ctos_meval-1.1.1-py3-none-any.whl

Download URL ctos_meval-1.1.1-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10d6eac3185eee45d7cd1655ddaafe8e3a5e25b09bdcce19fe19aca11f658076
BLAKE2b-256 checksum
How to use checksums
6abb12bf9b412d11942eeba816e242a0034046b672e2d17ee16c4f2b4d2531ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

This release

1.1.1 This release

2 release files

1.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