Pydantic schemas for building Ionworks pipeline configurations
Project description
Ionworks Schema
Pydantic schemas for building Ionworks pipeline configurations.
Overview
Ionworks Schema (ionworks_schema) provides the schema for constructing Ionworks pipeline configurations. Use these classes to define pipelines (data fits, calculations, entries, validations) in Python with validation, then export JSON to submit via the Ionworks API. Pipeline concepts, objectives, and workflows are described in the Pipeline documentation and in the Ionworks documentation.
Pipelines are executed by submitting configurations to the Ionworks API. Use the ionworks-api Python client to create and run jobs: pip install ionworks-api.
Installation
pip install ionworks_schema
Quick start
Build a pipeline configuration with schema classes, export to JSON, and submit with the Ionworks API client:
import ionworks_schema as iws
import json
# Define a parameter to fit (name, initial_value, bounds)
parameter = iws.Parameter(
name="Positive electrode capacity [A.h]",
initial_value=1.0,
bounds=(0.5, 2.0),
)
# Objective: MSMR half-cell fit; data can be "db:<measurement_id>" for uploaded data (use objectives submodule)
objective = iws.objectives.MSMRHalfCell(
data_input="db:your-measurement-id",
options={"model": {"electrode": "positive"}},
)
data_fit = iws.DataFit(
objectives={"ocp": objective},
parameters={"Positive electrode capacity [A.h]": parameter},
)
pipeline = iws.Pipeline(elements={"fit": data_fit})
# Export to JSON for API submission
config = pipeline.to_config()
with open("pipeline_config.json", "w") as f:
json.dump(config, f, indent=2)
# Submit via ionworks-api (requires credentials and project ID — see ionworks-api README)
# from ionworks import Ionworks
# client = Ionworks()
# job = client.pipeline.create(config)
# client.pipeline.wait_for_completion(job.id, timeout=600)
Schema classes and pipeline elements
Schema classes mirror the pipeline configuration format consumed by the Ionworks pipeline and API. Runtime behavior and options are documented in the Pipeline user guide and in the ionworkspipeline package (e.g. parsers, data_fits, objectives).
A pipeline is a top-level Pipeline with a dictionary of named elements. Each element has an element_type: entry, data_fit, calculation, or validation.
| Role | Schema class | Description |
|---|---|---|
| Top-level | Pipeline |
Pipeline configuration with named elements. |
| Entry | DirectEntry |
Supply fixed parameter values (no fitting or calculation). |
| Data fit | DataFit, ArrayDataFit |
Fit model parameters to data; contain objectives and parameters. |
| Calculation | ionworks_schema.calculations |
Run calculations (e.g. OCP, diffusivity, geometry). See submodule for available classes. |
| Objectives | MSMRHalfCell, MSMRFullCell, CurrentDriven, CycleAgeing, CalendarAgeing, EIS, Pulse, Resistance, ElectrodeBalancing, OCPHalfCell, and others |
Used inside DataFit.objectives to define what to fit. Import from ionworks_schema.objectives (e.g. iws.objectives.MSMRHalfCell). |
| Parameters | Parameter |
name, initial_value, bounds (and optional prior, etc.). Used in DataFit.parameters; dict key is the parameter name. |
| Priors | Prior |
Used in DataFit.priors. Import from ionworks_schema.priors (e.g. iws.priors.Prior). |
| Library | Material, Library |
Built-in material library for initial parameter values. |
Material library
Access built-in materials with validated parameter values for use as initial values or entries:
import ionworks_schema as iws
# List available materials
materials = iws.Library.list_materials()
# Get a specific material (e.g. NMC - Verbrugge 2017)
material = iws.Material.from_library("NMC - Verbrugge 2017")
print(material.parameter_values)
Parameter names and interpretation are described in the Pipeline documentation.
Resources
- Pipeline documentation — workflows, objectives, data fits, and pipeline concepts.
- ionworks-api — submit and manage pipelines (
pip install ionworks-api). - Ionworks documentation — product and platform documentation.
Note
This package provides configuration schemas only. To run pipelines, export JSON with pipeline.to_config() and submit it via the Ionworks API using the ionworks-api client.
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 ionworks_schema-0.3.1.tar.gz.
File metadata
- Download URL: ionworks_schema-0.3.1.tar.gz
- Upload date:
- Size: 561.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5b4f8cb578fd0f10a395baa5137b3b33aeb0afd9965393997064f238f954ae4
|
|
| MD5 |
44bb9276d91bfef0632319a200a9216a
|
|
| BLAKE2b-256 |
32b60476428dd8d689df8d0cc51257fec5fb2bcb2b175a74ae2b902867eac3cc
|
Provenance
The following attestation bundles were made for ionworks_schema-0.3.1.tar.gz:
Publisher:
deploy-production-release.yml on ionworks/ionworks-app
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ionworks_schema-0.3.1.tar.gz -
Subject digest:
c5b4f8cb578fd0f10a395baa5137b3b33aeb0afd9965393997064f238f954ae4 - Sigstore transparency entry: 1317795798
- Sigstore integration time:
-
Permalink:
ionworks/ionworks-app@a5fc6b2995a1902b3c9187602658a67c5f3b8a5f -
Branch / Tag:
refs/tags/deploy-production-v2026.04.16 - Owner: https://github.com/ionworks
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
deploy-production-release.yml@a5fc6b2995a1902b3c9187602658a67c5f3b8a5f -
Trigger Event:
push
-
Statement type:
File details
Details for the file ionworks_schema-0.3.1-py3-none-any.whl.
File metadata
- Download URL: ionworks_schema-0.3.1-py3-none-any.whl
- Upload date:
- Size: 53.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
381131881aca4c2fef5d26bd96c1199ca665a2b9b67cd00829abd35b6bd4eb98
|
|
| MD5 |
d9e0b68dcff25f3b2b922100e2e43083
|
|
| BLAKE2b-256 |
33a9cc0f47a1b755be5b24ce7568fb273a1c4c76052ec2a8398cb6aa47032366
|
Provenance
The following attestation bundles were made for ionworks_schema-0.3.1-py3-none-any.whl:
Publisher:
deploy-production-release.yml on ionworks/ionworks-app
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ionworks_schema-0.3.1-py3-none-any.whl -
Subject digest:
381131881aca4c2fef5d26bd96c1199ca665a2b9b67cd00829abd35b6bd4eb98 - Sigstore transparency entry: 1317795962
- Sigstore integration time:
-
Permalink:
ionworks/ionworks-app@a5fc6b2995a1902b3c9187602658a67c5f3b8a5f -
Branch / Tag:
refs/tags/deploy-production-v2026.04.16 - Owner: https://github.com/ionworks
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
deploy-production-release.yml@a5fc6b2995a1902b3c9187602658a67c5f3b8a5f -
Trigger Event:
push
-
Statement type: