Metadata-Version: 2.4
Name: scihist
Version: 0.1.0
Summary: Lineage-tracked batch execution for scientific data pipelines
Author: SciStack Contributors
License-Expression: MIT
Keywords: automation,batch,data-science,lineage,pipeline,provenance
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: scidb>=0.1.0
Requires-Dist: scilineage>=0.1.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# SciHist

Batch execution utilities for data pipelines.

Provides utilities for running functions over combinations of metadata, automatically loading inputs and saving outputs.

## Usage

```python
from scihist import for_each, Fixed

for_each(
    process_data,
    inputs={"raw": RawData, "calibration": Fixed(Calibration, session="baseline")},
    outputs=[ProcessedData],
    subject=[1, 2, 3],
    session=["A", "B", "C"],
)
```

### `for_each`

Executes a function for all combinations of metadata, loading inputs and saving outputs automatically.

### `Fixed`

Wrapper to specify fixed metadata overrides for an input. Use when an input should be loaded with different metadata than the current iteration.

```python
# Always load baseline from session="BL", regardless of current session
for_each(
    compare_to_baseline,
    inputs={
        "baseline": Fixed(StepLength, session="BL"),
        "current": StepLength,
    },
    outputs=[Delta],
    subject=[1, 2, 3],
    session=["A", "B", "C"],
)
```
