[package]
name = "powerio-matrix"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
description = "Sparse matrices and graph views for power system case files, built on powerio."
readme = "README.md"
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/powerio-matrix"
keywords = ["matpower", "sparse", "ptdf", "dc-opf"]
categories = ["science", "mathematics"]

# Render the feature-gated surface (gridfm Parquet export, the kkt operators) on
# docs.rs when this crate is published.
[package.metadata.docs.rs]
all-features = true

[features]
# Experimental DC OPF interior point operators (optional).
kkt = []
# GridFM interchange: write the gridfm-datakit Parquet schema (and the shared
# Arrow record batches behind it). Pulls in arrow + parquet, off by default.
gridfm = ["dep:arrow", "dep:parquet"]

[lib]
name = "powerio_matrix"
path = "src/lib.rs"

[dependencies]
powerio.workspace = true
sprs.workspace = true
num-complex.workspace = true
serde.workspace = true
serde_json.workspace = true
rand = "0.9"
rand_chacha = "0.9"
walkdir = "2"
rayon = "1"
sha2 = "0.10"
# arrow and parquet release in lockstep and share `RecordBatch`; keep both on the
# same major. `snap` matches the Snappy compression pandas/datakit write by default.
arrow = { workspace = true, optional = true }
parquet = { version = "59", default-features = false, features = ["arrow", "snap"], optional = true }

[dev-dependencies]
approx = "0.5"
tempfile = "3"

[lints]
workspace = true
