# Lean CLI / local development
# NOTE: the correct PyPI name is "lean", not "lean-cli" - "lean-cli" and the
# formerly-listed "qcalgorithm" do not exist on PyPI at all (confirmed via
# PyPI's JSON API: both 404). Neither is needed to run `pytest` (main.py imports
# only inside Lean; tests/test_main_wiring.py and test_main_on_data_target_weights.py
# load it against a stub AlgorithmImports), so this was never caught until a truly clean install was
# attempted (CI, or a fresh machine) rather than an existing dev venv.
# Phase 4.8 - this is no longer dev-only: requirements/requirements.txt
# (the Docker image's own requirements file) now also lists it, so
# retraining-worker's container has it too - kept here as well so a local
# dev venv installed purely from this file still has it for `aq backtest`.
lean>=1.0.233

# Dashboard / optional local exploration
plotly>=5.17.0

# Development
pytest>=9.0.3
black>=26.10.1

# Parallel test execution (`aq test --parallel`, opt-in only - off by
# default, since multiple workers each importing torch is a real OOM risk
# on memory-constrained dev machines)
pytest-xdist>=3.8.0

# In-process Redis mock for tests (V2-13)
fakeredis>=2.20.0

# PostgreSQL driver for test imports — connection is mocked in tests (V2-14)
psycopg[binary]>=3.3.8

# Yahoo Finance historical data backfill (V2-19.5) — dev/offline-script only,
# never in requirements.txt/requirements-runtime.txt since it never runs
# inside Lean or any always-on worker container
yfinance>=0.2.40

# Interactive Brokers historical futures/options backfill
# (data_pipeline/ib_backfill.py, `aq fetch futures`/`aq fetch options`) —
# dev/offline-script only, same "never inside Lean or any always-on worker
# container" convention as yfinance above. Deferred-imported, so the rest
# of the CLI/test suite works with this package absent as long as
# phase_v2.ib.enabled stays false (the default).
ib_insync>=0.9.86

# README backtest-chart generation (generate_backtest_report.py, called by
# `aq backtest`) — dev/local-script only, never inside Lean or any Docker image
matplotlib>=3.8.0

# Build-time only, for the OPTIONAL cpp_inference_ext/ accelerator
# (inference/exported_model.py's _linear_batched() - see
# development/Problems.md #32). Never required at runtime -
# inference/exported_model.py deferred-imports the compiled extension and
# falls back to the NumPy path when it's absent/unbuilt, same convention
# as ib_insync above. Building the extension itself also needs a C++
# compiler (MSVC on Windows), which this file can't install for you - see
# cpp_inference_ext/README.md.
pybind11>=2.10

# V6.4.4 - the research chains (scripts/v643_research.py, v644_research.py) cache scores and trial returns as parquet and
# run on the training Codespace, whose devcontainer installs only these requirement files (pyproject's `research` extra
# was never installed there; the V6.4.4 session stopped on the missing reader)
pyarrow>=23.0.1

# V5.3.9 - CI hardening: coverage gate (pytest --cov-fail-under in ci.yml)
pytest-cov>=7.1.0
# V6.6.6: pyproject's [tool.coverage.run] patch = ["subprocess"] needs coverage 7.10
coverage>=7.10.0

# V5.3.9 - Python lint job in ci.yml + local parity (ruff check .)
# V5.5.0 - pinned to the SAME version ci.yml's python-lint job installs
# (tests/test_ci_workflows.py keeps the two equal): an unbounded range let
# local ruff and CI ruff disagree about what is clean.
ruff==0.16.4

# Property-based tests (V6.6.4): tests/test_v664_properties.py, derandomized so a failure reproduces on every host
hypothesis>=6.100
