Skip to main content

penguineer

Find the root cause of off-spec lots from historian and LIMS exports, on a laptop, offline.

penguineer reads files and writes files. Its engines are deterministic Python; an LLM is optional and never decides a ranking. Every command is defined once as a Pydantic parameter model, a result model and a function, and the CLI, the --json output and the Python API are generated from that one definition. Alchemist imports penguineer as a library and adds the UI, runners and project management on top.

Status: early skeleton. init, data health, graph check and graph lags work; graph draft, investigate and bench homeostat are registered with their parameters but not built yet (they exit with code 4).

Documentation

The documentation is at https://kausalflow.com/penguineer/. Its source is in docs/ and builds with Zensical:

uvx zensical serve   # preview on http://localhost:8000

Install

uv tool install penguineer   # or: pip install penguineer; Python 3.11+
penguineer --help

From a checkout: uv sync, then uv run penguineer --help.

Try it on the demo plant

uv run penguineer data health \
  --data examples/demo/historian.csv \
  --graph examples/demo/graph.yaml
data health: 5 tags, 3555 samples, 2026-08-03 00:00 to 2026-08-03 11:59 UTC
findings: 4 (1 critical, 3 warning, 0 info)

  critical PI-103.PV  out_of_range 2026-08-03 09:30  outside instrument range [0, 10]: min 10.918, max 11.114
  warning  AI-201.PV  spike        2026-08-03 08:15  spike of 2.5293 from 3.2329
  warning  FI-102.PV  gap          2026-08-03 05:59  no samples for 46 min (usual period 60 s)
  warning  TI-101.PV  flatline     2026-08-03 03:00  value frozen at 180.585 for 2.0 h

The demo data has exactly those four faults injected (see scripts/make_demo_data.py). The setpoint tag FIC-102.SP is constant all day and is not reported, because the graph says it is a loop setpoint.

Add --json to get the result model on stdout. Every run writes runs/<run_id>/run.json under --project (default: the current folder) with the params, the equivalent command line, versions and SHA-256 hashes of every input.

Try it on a live simulated plant

Homeostat Live publishes a simulated plant's sensor data, lab results and data dictionary. This downloads a released week and derives a plant graph (tags, instrument ranges, control loops, lab qualities) from the dictionary:

uv run python scripts/fetch_homeostat_live.py --plant isidis-01 \
  --since 2026-10-02T17:00:00+00:00 --until 2026-10-09T17:00:00+00:00 --out data/isidis-01
uv run penguineer data health --data data/isidis-01/live.csv --graph data/isidis-01/graph.yaml

The tests in tests/test_homeostat_live.py run on that week. They are skipped without network access, and CI requires them.

Commands

Command What it does State
penguineer init Create a project folder: penguineer.yaml, empty graph.yaml, folders works
penguineer data health --data FILE [--graph graph.yaml] Gaps, frozen tags, spikes, out-of-range values, duplicate and non-existent timestamps → health.json works
penguineer graph check --graph graph.yaml Schema and plant rules, plus the queue of inferred edges to confirm works
penguineer graph lags --data FILE --graph graph.yaml Estimate dead times along flows_to edges from the data (prewhitened cross-correlation) works
penguineer graph draft --tags tags.csv Draft the plant graph from a tag list and optional DEXPI P&ID stub
penguineer investigate --lot L --lims lims.csv --data FILE Align in material time, rank root-cause hypotheses, write the report stub
penguineer bench homeostat Score the pipeline on homeostat plants with injected faults stub

Exit codes: 0 success, 1 validation failed (for example graph errors), 2 usage error, 3 not enough data, 4 internal error or not implemented yet.

Python API

import penguineer

result = penguineer.run("data health", data="historian.csv", project="my-unit")
result.findings[0].detail

penguineer.schemas()  # JSON Schemas of every command's Params and Result

penguineer.execute(...) also returns the run record and run folder. Calls keep no global state: inputs and outputs live under the project folder passed in, so several processes can run side by side.

Repository layout

packages/plantgraph/   plant context graph schema (depends only on Pydantic), shared with homeostat
src/penguineer/
  core/                command registry, RunContext, run records, errors
  cli/                 Typer app generated from the registry
  commands/            one module per command: Params, Result, run()
  io/                  historian, LIMS, graph and Homeostat Live readers
  engines/             deterministic engines: data health, dead times
  graph/               graph check
tests/                 unit, CLI, to_argv round-trip property tests, schema snapshot
examples/demo/         a small plant with injected data faults

Development

uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check .

A change to any command's Params or Result schema fails tests/test_schemas.py on purpose, because Alchemist builds on those schemas. After an intended change, regenerate the snapshot with PENGUINEER_UPDATE_SCHEMAS=1 uv run pytest tests/test_schemas.py.

License

Apache-2.0

Metadata

Release files for penguineer 0.1.0

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

Source distribution (sdist)

Source distribution for penguineer 0.1.0
File Size Uploaded Provenance Actions
penguineer-0.1.0.tar.gz 128.3 kB With provenance Details for penguineer-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for penguineer 0.1.0
File Interpreter ABI Platform Actions
penguineer-0.1.0-py3-none-any.whl Python 3 none any Details for penguineer-0.1.0-py3-none-any.whl

Total release size: 173.0 kB

Release files / penguineer-0.1.0.tar.gz

Download URL penguineer-0.1.0.tar.gz
Size 128.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e83b3fde08f040fc3d1df9d6408a351a83df56cd0fbd0730d353e4b0ce5d1637
BLAKE2b-256 checksum
How to use checksums
7dd17576f95d8c8252a2ff7019235336f3451d836b27ac1028a54f0c1984e5d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / penguineer-0.1.0-py3-none-any.whl

Download URL penguineer-0.1.0-py3-none-any.whl
Size 44.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c31c9501875a2831d72a9554f1427ab14379bd2f748040bcabfc92ef903fdc2
BLAKE2b-256 checksum
How to use checksums
498f629372b57f8e9649fd54547fcf1f9c6c78d8709cb976cad3ceb3fed26e59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Security for penguineer 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for penguineer-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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