Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -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/`.
16 changes: 4 additions & 12 deletions tests/test_plexosdb_copy_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),)]

Expand All @@ -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(),)]

Expand Down
Loading