Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
set -o pipefail
actual="$(cargo metadata --no-deps --format-version 1 \
| jq -r '[.packages[] | select(.publish == null) | .name] | sort | join(" ")')"
if [ "$actual" != "powerio powerio-cli powerio-core powerio-dist powerio-matrix powerio-prob powerio-synth powerio-tnd powerio-tx" ]; then
if [ "$actual" != "powerio powerio-archive powerio-cli powerio-core powerio-dist powerio-matrix powerio-prob powerio-synth powerio-tnd powerio-tx" ]; then
echo "publishable workspace members ($actual) do not match the publish list in crates.yml" >&2
exit 1
fi
Expand All @@ -61,7 +61,7 @@ jobs:
UA: powerio release workflow (https://github.com/eigenergy/powerio)
OWNER: samtalki
run: |
for crate in powerio-core powerio-tx powerio-dist powerio-tnd powerio-prob powerio-synth powerio-matrix powerio powerio-cli; do
for crate in powerio-core powerio-archive powerio-tx powerio-dist powerio-tnd powerio-prob powerio-synth powerio-matrix powerio powerio-cli; do
resp="$RUNNER_TEMP/$crate-owners.json"
code="$(curl -sS -A "$UA" --max-time 30 -o "$resp" -w '%{http_code}' \
"https://crates.io/api/v1/crates/$crate/owners")" || code=unreachable
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
# skip-existing), so a re-run after a partial publish only publishes
# what's missing.
run: |
for crate in powerio-core powerio-tx powerio-dist powerio-tnd powerio-prob powerio-synth powerio-matrix powerio powerio-cli; do
for crate in powerio-core powerio-archive powerio-tx powerio-dist powerio-tnd powerio-prob powerio-synth powerio-matrix powerio powerio-cli; do
resp="$RUNNER_TEMP/$crate.json"
code="$(curl -sS -A "$UA" --max-time 30 -o "$resp" -w '%{http_code}' \
"https://crates.io/api/v1/crates/$crate/$VERSION")" || code=unreachable
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Build docs
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --no-deps --all-features -p powerio-tnd -p powerio -p powerio-core -p powerio-tx -p powerio-synth -p powerio-matrix -p powerio-prob -p powerio-dist -p powerio-capi -p powerio-py -p powerio-wasm
run: cargo doc --no-deps --all-features -p powerio-tnd -p powerio -p powerio-core -p powerio-archive -p powerio-tx -p powerio-synth -p powerio-matrix -p powerio-prob -p powerio-dist -p powerio-capi -p powerio-py -p powerio-wasm
- name: Build Python API docs
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -143,6 +143,7 @@ jobs:
<dt>released / docs.rs</dt>
<dd><a href="https://docs.rs/powerio">powerio</a>
<a href="https://docs.rs/powerio-core">powerio-core</a>
<a href="https://docs.rs/powerio-archive">powerio-archive</a>
<a href="https://docs.rs/powerio-tx">powerio-tx</a>
<a href="https://docs.rs/powerio-dist">powerio-dist</a>
<a href="https://docs.rs/powerio-prob">powerio-prob</a>
Expand All @@ -152,6 +153,7 @@ jobs:
<dt>development / main</dt>
<dd><a href="powerio/index.html">powerio</a>
<a href="powerio_core/index.html">powerio-core</a>
<a href="powerio_archive/index.html">powerio-archive</a>
<a href="powerio_tx/index.html">powerio-tx</a>
<a href="powerio_dist/index.html">powerio-dist</a>
<a href="powerio_synth/index.html">powerio-synth</a>
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
# Bare `cargo test` only covers the default-members; name the C ABI crate
# explicitly so its end-to-end ABI tests run in CI too.
- name: Run tests
run: cargo test -p powerio -p powerio-tx -p powerio-core -p powerio-synth -p powerio-matrix -p powerio-prob -p powerio-cli -p powerio-capi -p powerio-dist -p powerio-tnd --verbose
run: cargo test -p powerio -p powerio-tx -p powerio-core -p powerio-archive -p powerio-synth -p powerio-matrix -p powerio-prob -p powerio-cli -p powerio-capi -p powerio-dist -p powerio-tnd --verbose
- name: Test problem matrix feature
run: cargo test -p powerio --features matrix --verbose
- name: Test gridfm reader feature
Expand Down Expand Up @@ -265,7 +265,7 @@ jobs:
- name: Check wasm32 component crates
run: |
cargo check --target wasm32-unknown-unknown -p powerio -p powerio-tx -p powerio-dist \
-p powerio-core -p powerio-prob -p powerio-matrix
-p powerio-core -p powerio-archive -p powerio-prob -p powerio-matrix
cargo check --target wasm32-unknown-unknown -p powerio --features matrix
# A browser consumer that sets `default-features = false` builds with no C
# compiler: SQLite enters only through the default-on `sincal` feature.
Expand Down
8 changes: 6 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ check the current source, tests, and release notes.
`Diagnostic`, `Error`, `PioModule<T>`, common module records,
`TimeSeries<T>`, `ScenarioSet<T>`, and output destination types. It has no
electrical network, matrix, or solver dependencies.
- **`powerio-archive`**: bounded in-memory ZIP transport over core, with explicit
limits, namespace validation, and lazy verified reads; no electrical types
or case discovery.
- **`powerio-tx`**: the format neutral `BalancedNetwork`, the balanced format
readers and writers, normalization, and derived indexed views.
- **`powerio-tnd`**: integrated transmission/distribution composition, explicit
Expand Down Expand Up @@ -161,8 +164,8 @@ release on its own.
its platform. Only then does it stage a **draft** GitHub release with the
five assets.
4. A human inspects and publishes the draft. Publishing starts `python.yml`
(PyPI) and `crates.yml` (crates.io: `powerio-core`, `powerio-tx`, `powerio-dist`,
`powerio-tnd`, `powerio-prob`, `powerio-matrix`, `powerio`, and
(PyPI) and `crates.yml` (crates.io: `powerio-core`, `powerio-archive`,
`powerio-tx`, `powerio-dist`, `powerio-tnd`, `powerio-prob`, `powerio-matrix`, `powerio`, and
`powerio-cli`, in dependency order). Both deploy through the `pypi` and
`crates-io` environments, which wait for the maintainer's approval. A
rerun skips files and versions already published. A crate's first
Expand All @@ -183,6 +186,7 @@ release on its own.
## Layout

```
powerio-archive/src lib.rs (ZIP index/cache/limits), preflight.rs, local.rs
powerio-core/src module.rs (PioModule<T>), source.rs, output.rs,
diagnostic.rs, codes.rs, error.rs, records.rs,
time_series.rs, scenario.rs, component_id.rs,
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

- Add `powerio-archive`: bounded ZIP indexing and verified member reads with
explicit limits and namespace checks, as shared infrastructure for #774.

## 0.11.7

**AC optimal transmission switching**
Expand Down
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
"powerio",
"powerio-tx",
"powerio-core",
"powerio-archive",
"powerio-tnd",
"powerio-matrix",
"powerio-synth",
Expand All @@ -24,6 +25,7 @@ default-members = [
"powerio",
"powerio-tx",
"powerio-core",
"powerio-archive",
"powerio-tnd",
"powerio-matrix",
"powerio-synth",
Expand Down Expand Up @@ -55,6 +57,7 @@ powerio = { path = "powerio", version = "0.11.7" }
# Model crates remain independent; the facade enables optional format adapters.
powerio-tx = { path = "powerio-tx", version = "0.11.7", default-features = false }
powerio-core = { path = "powerio-core", version = "0.11.7" }
powerio-archive = { path = "powerio-archive", version = "0.11.7" }
powerio-matrix = { path = "powerio-matrix", version = "0.11.7" }
powerio-synth = { path = "powerio-synth", version = "0.11.7" }
powerio-prob = { path = "powerio-prob", version = "0.11.7" }
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ depend on just the layer they use.
|---|---|
| `powerio` | `PioValue`, `parse`, `emit`, `serialize`, `deserialize` |
| `powerio-core` | `Source`, `PioModule`, diagnostics, collections, destinations |
| `powerio-archive` | Bounded ZIP indexing and verified member reads |
| `powerio-tx` | `BalancedNetwork` and balanced format readers and writers |
| `powerio-dist` | `MulticonductorNetwork` and OpenDSS, PMD, BMOPF, CIM converters |
| `powerio-prob` | Operating points, updates, calculation instances and solutions |
Expand Down
2 changes: 2 additions & 0 deletions docs/diagrams/architecture.dot
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ digraph powerio_architecture {
"powerio-core" [label = "powerio-core\nSource, Diagnostic, Error,\nPioModule<T>, series, output"];
"powerio-tnd" [label = "powerio-tnd\nIntegratedNetwork + transforms\nSINCAL adapters"];

"powerio-archive" [label = "powerio-archive\nbounded ZIP transport"];
"powerio-archive" -> "powerio-core";
"powerio-synth" -> "powerio-tx";
"powerio-tx" -> "powerio-core";
"powerio-tnd" -> "powerio-tx";
Expand Down
Loading
Loading