diff --git a/.cursor/rules/python-poetry.mdc b/.cursor/rules/python-poetry.mdc deleted file mode 100644 index 484802d..0000000 --- a/.cursor/rules/python-poetry.mdc +++ /dev/null @@ -1,34 +0,0 @@ ---- -description: Python 3.11 and Poetry conventions -globs: "**/*.{py,toml}" -alwaysApply: false ---- - -# Python and Poetry - -- Runtime: **Python 3.11+** via Poetry (`pyproject.toml`). -- Run scripts: `poetry run python ...` -- Add dependencies: `poetry add ` (not pip install into the global env). - -## Style - -- Prefer type hints on public functions. -- Short English docstrings for non-obvious business logic. -- Match existing module style when extending code. - -## Libraries - -Use dependencies declared in `pyproject.toml` (pandas, polars, yfinance, etc.) as directed by the **feature spec**, not by default habit. - -## Financial domain - -- **No look-ahead bias:** only data available on or before the decision `as_of_date`. -- Document `as_of_date`, data sources, and formula versions in the feature spec when adding metrics. - -## Tooling - -No project-wide tests or linter unless configured in `pyproject.toml`. Do not add heavy CI scaffolding unless requested. - -## Network - -`yfinance` and external APIs require network access; handle failures explicitly in implementation specs. diff --git a/.cursor/rules/python-uv.mdc b/.cursor/rules/python-uv.mdc new file mode 100644 index 0000000..88d9927 --- /dev/null +++ b/.cursor/rules/python-uv.mdc @@ -0,0 +1,35 @@ +--- +description: Python 3.11 and uv workspace conventions +globs: **/*.py +alwaysApply: false +--- + +# Python and uv + +- Runtime: **Python 3.11+** via uv (`pyproject.toml` workspace + `uv.lock`). +- Install: `uv sync --group dev` or `make install`. +- Run scripts: `uv run