[workspace]
members = ["crates/brahe-py"]

[package]
name = "brahe"
version = "1.4.1"
authors = ["Duncan Eddy <duncan.eddy@gmail.com>"]
edition = "2024"
description = "Brahe is a modern satellite dynamics library for research and engineering applications designed to be easy-to-learn, high-performance, and quick-to-deploy. The north-star of the development is enabling users to solve meaningful problems and answer questions quickly, easily, and correctly."
homepage = "https://duncaneddy.github.io/brahe/"
documentation = "https://docs.rs/brahe/"
repository = "https://github.com/duncaneddy/brahe/"
keywords = ["space", "astrodynamics", "satellite"]
categories = ["science"]
readme = "README.md"
license = "MIT"
exclude = [# We need to keep the size down for crates.io these don't need to be included
    "/test_data",
    "/tests",
    "/scripts",
    "/docs",
    "/brahe",
    "/crates",
    ".github",
    "/examples",
    "/plots",
    "/test_assets",
    "/data/textures/world.topo.200410.3x5400x2700.png", # Python-only
    "justfile",
    "properdocs.yml",
    "uv.lock"
]

[lib]
name = "brahe"

[dependencies]
rsofa = "0.5.0"
nalgebra = { version = "0.34.1", features = ["serde-serialize"] }
numpy = { version = "0.28.0", optional = true }
once_cell = "1.21.3"
num-traits = "0.2.19"
regex = "1.12.3"
is_close = "0.1.3"
ureq = { version = "3.2.0", features = ["cookies", "multipart"] }
strum = "0.28.0"
strum_macros = "0.28.0"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
quick-xml = { version = "0.39", features = ["serialize"] }
sgp4 = "2.3.0"
uuid = { version = "1.20.0", features = ["v4", "v7", "serde"] }
rayon = "1.11"
num_cpus = "1.17"
dirs = "6.0.0"
polars = { version = "0.53", default-features = false, features = ["lazy"] }
anise = "0.9.3"

# pyo3 is an optional dependency used only by the `python` feature, which enables
# the `python_interop` module holding the `BraheError` PyErr conversion. The
# extension module itself is built from the `brahe-py` workspace crate.
[dependencies.pyo3]
version = "0.28.2"
optional = true

[dev-dependencies]
dhat = "0.3.3"
approx = "0.5.1"
rstest = "0.26.1"
serial_test = "3.3.1"
httpmock = "0.8.3"
tempfile = "3.24.0"
cargo-deny = "0.19.0"
mockall = "0.14.0"
rv = "0.19"
rand = "0.9"
criterion = { version = "0.8", features = ["html_reports"] }

[features]
ci = []
manual = []  # For tests requiring network downloads (run with: cargo test --features manual)
python = ["dep:pyo3", "dep:numpy"]
dhat-heap = []    # if you are doing heap profiling
dhat-ad-hoc = []  # if you are doing ad hoc profiling

# Build Profiles
[profile.dev]
opt-level = 0
lto = "off"

[profile.release]
opt-level = 3
codegen-units = 1
lto = "fat"

[profile.profiling]
inherits = "release"
debug = 1

# Benchmark Profiles
[profile.bench]
opt-level = 3
lto = "thin"

[[bench]]
name = "provider_benchmarks"
path = "benchmarks/provider_benchmarks.rs"
harness = false

[[bench]]
name = "propagator_benchmarks"
path = "benchmarks/propagator_benchmarks.rs"
harness = false

[lints.rust]
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage,coverage_nightly)', 'cfg(feature, values("manual"))'] }