diff --git a/AGENTS.md b/AGENTS.md index 90b779d..4641a6e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,17 +1,18 @@ # AGENTS.md — Guidance for OpenAI Codex ## Execution Commands -- **Always** invoke Python scripts via the startup wrapper to activate dependencies: +- **Always** invoke Python scripts via the startup wrapper, which now installs dependencies globally and then runs your code under the system Python: ```bash ./startup.sh --offset --end --extend-years +```` ## Project Overview This repository, **python\_charts**, provides a framework for fetching economic time series from FRED, storing them locally, and producing custom matplotlib charts with configurable parameters. The core components are: -* **`startup.sh`**: Single-entrypoint script to bootstrap a Python venv, install dependencies, fetch data, and run specified commands under the venv interpreter. -* **`Makefile`**: Convenient high-level targets (`install`, `data`, `plot`, `plot-custom`, `test`, `clean`) that funnel through `startup.sh` for reproducible builds. +* **`startup.sh`**: Single‐entrypoint script to install dependencies globally, fetch data, and run specified commands under system Python. +* **`Makefile`**: Convenient high‐level targets (`install`, `data`, `plot`, `plot‐custom`, `test`, `clean`) that funnel through `startup.sh` for reproducible builds. * **`scripts/refresh_data.py`**: Downloads UNRATE and DCOILWTICO series into `data/fred.db`. * **`scripts/lagged_oil_unrate_chart_styled.py`**: Generates the lagged oil vs. unemployment chart with fixed axes styling and log scale. @@ -21,51 +22,71 @@ Future extensions will add additional custom chart scripts under `scripts/`, all ### Primary Commands -* **Bootstrap & default plot**: `./startup.sh` or `make plot` — runs the lagged-oil chart with an 18‑month offset. -* **Custom plot**: `./startup.sh --offset 12 --end 2025-05-31 --extend-years 5` or `make plot-custom ARGS="--offset 12 --end 2025-05-31 --extend-years 5"`. -* **Data refresh**: `./startup.sh scripts/refresh_data.py` or `make data`. -* **Run tests**: `./startup.sh pytest -q` or `make test`. +* **Bootstrap & default plot**: + + ```bash + ./startup.sh + ``` + + Installs/upgrades dependencies globally and runs the default lagged‐oil chart with an 18-month offset. + +* **Custom plot**: + + ```bash + ./startup.sh --offset 12 --end 2025-05-31 --extend-years 5 + ``` + +* **Data refresh**: + + ```bash + ./startup.sh scripts/refresh_data.py + ``` + +* **Run tests**: + + ```bash + ./startup.sh pytest -q + ``` ### Argument Rules -* Arguments beginning with `--` are forwarded to the default chart script. -* If the first token is a `.py` script or executable, it is invoked under the venv’s Python. -* Otherwise, commands are executed directly (e.g. linters, test frameworks). +* If the first token starts with `--`, it’s forwarded to the default chart script. +* If the first token names a `.py` script, it’s executed via `python