CPDataKit
Crystal Plasticity Data Quality Toolkit is a solver-independent Python toolkit for validating, normalizing, summarizing, and visualizing crystal-plasticity simulation datasets.
Alpha software: CPDataKit verifies conformance to an explicit data contract. It does not certify that a simulation, constitutive model, or physical interpretation is correct. Bundled datasets are deterministic, wholly synthetic examples for demonstration and tests.
Why and for whom
CPDataKit helps researchers, simulation engineers, and data stewards make tabular materials simulation data explicit and traceable before analysis or exchange. The core package is not a finite-element solver, DAMASK post-processor, Abaqus plug-in, UMAT runner, or ODB reader. It has no official affiliation with DAMASK, Abaqus, or Dassault Systèmes.
Supported contracts and formats
The open CPDataKit schema v1.0 defines three profiles:
curve: ordered macroscopic steps such as time, strain, stress, and load curves;point: material-point, integration-point, element, or sample records;field2d: scalar samples with two-dimensional Cartesian coordinates.
Inputs are UTF-8 CSV, JSON arrays of records, and CPDataKit HDF5 (.h5/.hdf5). CSV and JSON
take units and semantics from the selected schema. HDF5 embeds units, mapping, validation
summary, source filename and SHA-256, UTC conversion time, Python/CPDataKit versions, and an
operation log. CPDataKit HDF5 is not DAMASK DADF5 or Abaqus ODB.
Schemas declare standard names, aliases, requiredness, dtype, per-record shape, role, unit,
missing-value policy, index constraints, ranges, and scientific conventions. Custom fields
must be declared or use user_. CPDataKit never guesses stress/strain measures, tensor order,
orientation representation, units, or identifier semantics. See
the data format.
Install
When v0.1.1 is visible on PyPI, install it with:
python -m pip install cpdatakit
Until then, install the current v0.1.1 wheel directly from GitHub:
python -m pip install "https://github.com/17636365690/cpdatakit/releases/download/v0.1.1/cpdatakit-0.1.1-py3-none-any.whl"
Then follow the five-minute quickstart to validate, summarize, convert, and plot a deterministic example.
Installing from the source checkout is intended for contributors:
git clone https://github.com/17636365690/cpdatakit.git
cd cpdatakit
python -m venv .venv
Activate on Windows PowerShell:
.venv\Scripts\Activate.ps1
python -m pip install -e ".[dev]"
Activate on POSIX shells:
source .venv/bin/activate
python -m pip install -e ".[dev]"
Regenerate the fixed-seed examples at any time:
python examples/generate_sample_data.py --output sample_data
Command line
Validate and write a JSON report:
cpdatakit validate sample_data/synthetic_curve.csv --schema curve --json-output validation.json
Summarize, convert, and create both image formats:
cpdatakit summary sample_data/synthetic_curve.csv --schema curve --json-output summary.json
cpdatakit convert sample_data/synthetic_curve.csv --schema curve --output curve.h5 --source-description "Synthetic README example"
cpdatakit plot curve.h5 --schema curve --kind stress-strain --output stress-strain.png
cpdatakit plot curve.h5 --schema curve --kind stress-strain --output stress-strain.svg
Use --force to replace an output. Expected errors are concise and have no traceback; put the
global --debug option before the subcommand to debug unexpected failures. A validation or
summary command returns 0 for conforming data and 1 for findings; usage/read/output failures
return 2. Run cpdatakit --help or cpdatakit <command> --help for details.
Python API
from cpdatakit import (
FieldMapping,
load_dataset,
normalize_dataset,
summarize_dataset,
validate_dataset,
)
raw = load_dataset("raw.csv")
normalized = normalize_dataset(
raw,
"curve",
[
FieldMapping("increment", "step", "1", "dimensionless"),
FieldMapping("eps", "strain", "1", "dimensionless"),
FieldMapping("sigma_pa", "stress", "Pa", "MPa", "export specification"),
],
)
report = validate_dataset(normalized, "curve")
summary = summarize_dataset(normalized, "curve", validation=report)
print(report.valid, summary["record_count"])
Mapping conflicts, unknown fields, and incompatible units raise documented subclasses of
CPDataKitError. Normalization returns a copy and preserves unmapped columns unless
drop_unmapped=True.
Example outputs
After running the commands above, stress-strain.png and stress-strain.svg contain a titled,
unit-labeled synthetic curve with a legend. Plotting functions in cpdatakit.plotting return
Matplotlib (Figure, Axes) for further editing and use the non-interactive Agg backend.
Development
pytest --cov=cpdatakit
ruff check .
ruff format --check .
python -m build
Architecture, extension boundaries, and maintainer checks are in the architecture documentation. Contributions follow CONTRIBUTING.md and the Code of Conduct.
If CPDataKit helps your workflow, star the repository to improve discoverability and open an issue describing the data contract or solver-neutral workflow you need. Concrete research use cases guide the roadmap more than raw popularity metrics.
Known limitations and roadmap
Version 0.1.1 handles in-memory tabular data and an explicit two-dimensional scalar sample representation. It does not perform solver integration, constitutive integration, 3D interactive graphics, automatic scientific inference, streaming, or distributed processing. DAMASK and Abaqus are only reserved adapter boundaries; no unverified adapter is shipped. See the roadmap for the next three versions.
Citation and license
Use CITATION.cff to cite the software. CPDataKit is licensed under Apache-2.0; see LICENSE. Direct runtime dependency licenses and review notes are in NOTICE. No real experimental or commercial-solver data are redistributed.
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 cpdatakit-0.1.1.tar.gz.
File metadata
- Download URL: cpdatakit-0.1.1.tar.gz
- Upload date:
- Size: 247.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa3e6b050491534e09b9da7ede1eb8c629bb884cbfdedce39b3a53abfc1bfc58
|
|
| MD5 |
d8f8abd232aa43cb0fcc20d41fe868ec
|
|
| BLAKE2b-256 |
441b74cc5f139e3fa9d55cae5cca01214b10802fdc3671adb7ff961dec51ba3e
|
Provenance
The following attestation bundles were made for cpdatakit-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on 17636365690/cpdatakit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpdatakit-0.1.1.tar.gz -
Subject digest:
aa3e6b050491534e09b9da7ede1eb8c629bb884cbfdedce39b3a53abfc1bfc58 - Sigstore transparency entry: 2580018391
- Sigstore integration time:
-
Permalink:
17636365690/cpdatakit@04337a68486b046e9db4f4ea85602ec3b9c455aa -
Branch / Tag:
refs/heads/main - Owner: https://github.com/17636365690
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@04337a68486b046e9db4f4ea85602ec3b9c455aa -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file cpdatakit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cpdatakit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f249352192f5343cd9463fb92da89c4f80e29442b33a3d74461845bf9b2339af
|
|
| MD5 |
df6dd0d8aafb5a07b67bce6da4595272
|
|
| BLAKE2b-256 |
5a7a84a3d278694ca170e94159c5f04b8058f29efff67b8ccf89eb0ca3935139
|
Provenance
The following attestation bundles were made for cpdatakit-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on 17636365690/cpdatakit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpdatakit-0.1.1-py3-none-any.whl -
Subject digest:
f249352192f5343cd9463fb92da89c4f80e29442b33a3d74461845bf9b2339af - Sigstore transparency entry: 2580018398
- Sigstore integration time:
-
Permalink:
17636365690/cpdatakit@04337a68486b046e9db4f4ea85602ec3b9c455aa -
Branch / Tag:
refs/heads/main - Owner: https://github.com/17636365690
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@04337a68486b046e9db4f4ea85602ec3b9c455aa -
Trigger Event:
workflow_dispatch
-
Statement type: