Skip to main content
A pipeline is an ordered set of elementsDirectEntry, Calculation, DataFit, Validation — that together produce a parameterised cell model. Build the pipeline with ionworks-schema and submit it with ionworks-api. For the conceptual model and what each element type does, see the Pipelines Guide.

A minimal pipeline

import ionworks_schema as iws
from ionworks import Ionworks

# Known parameters from a datasheet or literature
known = iws.direct_entries.DirectEntry(
    parameters={"Ambient temperature [K]": 298.15},
    source="datasheet",
)

# A simple capacity calculation
capacity_pos = iws.calculations.ElectrodeCapacity(electrode="positive")
capacity_neg = iws.calculations.ElectrodeCapacity(electrode="negative")

# Assemble and submit
pipeline = iws.Pipeline(
    {"known": known, "Q_pos": capacity_pos, "Q_neg": capacity_neg},
    name="Capacity pipeline",
)

client = Ionworks()
submission = client.pipeline.create(pipeline)
print(submission.id)
client.pipeline.create() accepts either an iws.Pipeline instance or the dict returned by pipeline.to_config() (useful when you want to inspect the payload before sending).

Element types

SchemaElement typeUse for
iws.direct_entries.DirectEntryentryDrop in known parameter values (literature, datasheet, manual entry)
iws.direct_entries.DirectEntryFunctionSchema subclassesentryPre-built parameterisations (electrolyte, OCP, defaults) — see Direct Entries
iws.calculations.*calculationDerive parameters from others — see Calculations
iws.DataFit / iws.ArrayDataFitdata_fitFit unknown parameters to measured data — see Data Fitting
iws.ValidationvalidationCheck fitted parameters against held-out data
The element name (the dict key) appears in the pipeline report. The order matters: each element receives the parameters produced by everything before it.

Submitting and retrieving results

See Python API for the full reference. The common flow:
submission = client.pipeline.create(pipeline)
client.pipeline.wait_for_completion(submission.id)
result = client.pipeline.result(submission.id)
print(result.element_results)

Pipelines (theory)

The conceptual model of pipeline elements and their composition.

Python API

client.pipeline.create / get / list / result / wait_for_completion.