[package]
name = "paft"
version.workspace = true
edition = "2024"
license.workspace = true
authors.workspace = true
description = "Facade crate for paft: unified public API over the paft ecosystem."
readme = "README.md"
repository.workspace = true
homepage = "https://github.com/paft-rs/paft"
documentation = "https://docs.rs/paft"
keywords = ["finance", "types", "stocks", "trading", "polars"]
categories = ["finance", "data-structures", "api-bindings"]

[dependencies]
paft-core = { workspace = true }
paft-money = { workspace = true, default-features = false }
paft-domain = { workspace = true, optional = true, default-features = false }
paft-market = { workspace = true, optional = true, default-features = false }
paft-fundamentals = { workspace = true, optional = true, default-features = false }
paft-aggregates = { workspace = true, optional = true, default-features = false }
paft-utils = { workspace = true }
iso_currency = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true, optional = true }

[features]
default = ["domain", "market", "fundamentals"]

bigdecimal = [
  "paft-money/bigdecimal",
  "paft-market?/bigdecimal",
  "paft-fundamentals?/bigdecimal",
  "paft-aggregates?/bigdecimal",
]

domain = ["dep:paft-domain"]
market = ["dep:paft-market", "domain"]
fundamentals = ["dep:paft-fundamentals", "domain"]
aggregates = ["dep:paft-aggregates", "domain", "market", "fundamentals"]

tracing = [
  "dep:tracing",
  "paft-domain/tracing",
  "paft-money/tracing",
  "paft-market/tracing",
  "paft-fundamentals/tracing"
]

dataframe = [
  "paft-utils/dataframe", 
  "paft-money/dataframe", 
  "paft-domain?/dataframe", 
  "paft-market?/dataframe", 
  "paft-fundamentals?/dataframe", 
  "paft-aggregates?/dataframe"
]

panicking-money-ops = ["paft-money/panicking-money-ops"]
money-formatting = ["paft-money/money-formatting"]

full = ["domain", "market", "fundamentals", "aggregates", "dataframe"]

[dev-dependencies]
serde_json = { workspace = true }
chrono = { workspace = true }
chrono-tz = { workspace = true }
rust_decimal = { workspace = true }

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
