diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..11f0848 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,10 @@ +# AGENTS.md + +- Assume concurrent human/agent work; never revert or overwrite changes you did not author. +- This repo processes model data into SQLite; watch query/transform cost, memory churn, and fixture representativeness. +- Prefer minimal, behavior-proven changes; add regression coverage for bug fixes and use existing fixtures under `tests/fixtures` or `tests/data` when practical. +- No breadcrumbs after deleting or moving code; remove the old code/comment instead of leaving relocation notes. +- Use `uv sync --all-groups` for setup. For changed areas, run the narrow relevant check first; before broad handoff use `uv run prek run --show-diff-on-failure --color=always --all-files --hook-stage pre-push` when feasible. +- Type-check package changes with `uv run ty check --output-format github ./src/plexosdb`. +- Test package changes with `uv run pytest --cov --cov-report=xml`; benchmark-sensitive changes may need `uv run pytest benchmarks/ -k "not xlarge_300k" --benchmark-only --benchmark-json=benchmark-results.json --no-cov`. +- Build docs for user/operator-facing documentation changes with `uv run sphinx-build docs/source/ docs/_build/`. diff --git a/tests/test_plexosdb_copy_object.py b/tests/test_plexosdb_copy_object.py index 51ccbe8..c2263bf 100644 --- a/tests/test_plexosdb_copy_object.py +++ b/tests/test_plexosdb_copy_object.py @@ -60,12 +60,8 @@ def test_copy_object_copies_date_from_and_date_to(db_base: PlexosDB): date_to=date_to, ) - original_date_from = db.query( - "SELECT date FROM t_date_from WHERE data_id = ?", (original_data_id,) - ) - original_date_to = db.query( - "SELECT date FROM t_date_to WHERE data_id = ?", (original_data_id,) - ) + original_date_from = db.query("SELECT date FROM t_date_from WHERE data_id = ?", (original_data_id,)) + original_date_to = db.query("SELECT date FROM t_date_to WHERE data_id = ?", (original_data_id,)) assert original_date_from == [(date_from.isoformat(),)] assert original_date_to == [(date_to.isoformat(),)] @@ -77,12 +73,8 @@ def test_copy_object_copies_date_from_and_date_to(db_base: PlexosDB): new_data_id = new_data_ids[0] assert new_data_id != original_data_id - copied_date_from = db.query( - "SELECT date FROM t_date_from WHERE data_id = ?", (new_data_id,) - ) - copied_date_to = db.query( - "SELECT date FROM t_date_to WHERE data_id = ?", (new_data_id,) - ) + copied_date_from = db.query("SELECT date FROM t_date_from WHERE data_id = ?", (new_data_id,)) + copied_date_to = db.query("SELECT date FROM t_date_to WHERE data_id = ?", (new_data_id,)) assert copied_date_from == [(date_from.isoformat(),)] assert copied_date_to == [(date_to.isoformat(),)]