# Stack and Dependencies ## Rules - Primary language: Python >=3.13 (evidence: pyproject.toml requires-python = ">=3.13") - Application: Streamlit app (streamlit >=1.48.0). Entrypoint: Home.py (CMD: streamlit run Home.py). Evidence: Home.py, pages/1_Stemwijzer.py, pyproject.toml, Dockerfile - Database: DuckDB + Ibis (duckdb>=1.3.2, ibis-framework[duckdb]>=10.8.0). Evidence: pyproject.toml, database.py - ML: scikit-learn, umap-learn, scipy. Evidence: pyproject.toml, pipeline/svd.py, analysis/ ## Examples ### pyproject dependencies (evidence: pyproject.toml) ```toml dependencies = [ "duckdb>=1.3.2", "ibis-framework[duckdb]>=10.8.0", "openai>=1.99.7", "scipy>=1.11", "umap-learn>=0.5", "plotly>=5.0", "pytest>=9.0.2", "requests>=2.32.4", "schedule>=1.2.2", "streamlit>=1.48.0", "scikit-learn>=1.8.0", "beautifulsoup4>=4.14.3", "lxml>=6.0.2", ] ``` ## Anti-patterns / Notes - pytest is listed under runtime dependencies in pyproject.toml (line: dependencies). Move pytest to dev-dependencies to avoid shipping test runner in production images. Evidence: pyproject.toml - Many dependencies use permissive ">=" ranges. Recommend pinning or generating lockfile (poetry.lock/requirements.txt) and adding upper bounds for reproducibility. - openai appears declared but static imports not found; possible unused dependency (evidence: pyproject.toml, ai_provider.py uses requests and environment keys instead of openai). ## Remediations - Move test-only libs (pytest) to dev-dependencies in pyproject.toml. - Add lockfile and CI step to check for pinned dependencies. - Audit declared but unused packages (openai) and remove or confirm dynamic usage. ## Evidence pointers - pyproject.toml: full dependency list (lines 1-40) - Home.py: streamlit usage and app entry (file: Home.py) - database.py: duckdb table creation and connection (file: database.py lines ~1-350)