[package]
name = "etl-unit"
version = "0.1.0"
edition = "2024"
description = "Semantic data model for ETL units — qualities and measurements over subjects and time. Built on Polars."
license = "MIT OR Apache-2.0"
repository = "https://github.com/EdmundsEcho/etl-unit"
homepage = "https://github.com/EdmundsEcho/etl-unit"
documentation = "https://docs.rs/etl-unit"
readme = "README.md"
keywords = ["etl", "polars", "data", "dataframe", "schema"]
categories = ["data-structures", "science"]
authors = ["Edmund Cape"]

[[bin]]
name = "convert_chartjs"
path = "src/bin/convert_chartjs.rs"
required-features = ["cli"]

[dependencies]
chrono              = { version = "0.4", features = ["serde"] }
humantime           = "2.3"
humantime-serde     = "1.1"
indexmap            = { version = "2", features = ["serde"] }
serde               = { version = "1.0", features = ["derive"] }
serde_json          = "1.0"
serde_path_to_error = "0.1"
thiserror           = "1.0"
toml                = "0.8"
tracing             = "0.1"
memuse              = "0.2"

# `path` for local development against a sibling clone; `version` is what
# downstream users resolve from crates.io once etl-unit is published.
meta-tracing        = { path = "../meta-tracing", version = "0.1" }

polars = { version = "0.51", features = [
    "abs",
    "asof_join",
    "concat_str",
    "cum_agg",
    "diff",
    "dynamic_group_by",
    "dtype-datetime",
    "dtype-struct",
    "interpolate",
    "is_in",
    "lazy",
    "pivot",
    "rank",
    "rolling_window",
    "round_series",
    "strings",
    "temporal",
    "timezones",
] }

# Optional CLI dependencies (behind the `cli` feature).
clap = { version = "4.5", features = ["derive"], optional = true }
csv  = { version = "1.3", optional = true }

[dev-dependencies]
serde_json         = "1.0"
tokio              = { version = "1", features = ["rt-multi-thread", "macros"] }
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt", "ansi", "json"] }
reqwest            = { version = "0.12", default-features = false, features = ["blocking", "json", "rustls-tls"] }
serial_test        = "3.2"

[features]
cli = ["dep:clap", "dep:csv"]

# Crate-wide lint configuration. Applies to lib, tests, and examples.
# Tightened incrementally in follow-up releases.
[lints.rust]
dead_code     = "allow"
unused_imports = "allow"
# polars 0.51 has duplicate glob re-exports (rust-lang/rust#114095);
# both paths resolve to the same function. Suppress until polars >= 0.52.
ambiguous_glob_imports    = "allow"
ambiguous_glob_reexports  = "allow"
