Fix category budget overlaps and document the uv run test workflow.
Tests / test (push) Successful in 11s
Tests / lint (push) Successful in 12s

This commit is contained in:
2026-10-18 09:40:31 +02:00
parent ea7854473f
commit d4ebab96d6
5 changed files with 207 additions and 95 deletions
+8 -6
View File
@@ -7,15 +7,17 @@
uv sync
# Run migrations
alembic upgrade head
uv run alembic upgrade head
# Run all tests
pytest
uv run pytest
# Run a single test file
pytest tests/test_model_b4wexport.py -v
uv run pytest tests/test_model_b4wexport.py -v
```
Use `uv run` for project commands so they use the project-managed Python environment and dependencies.
## Project Structure
- **`src/`**: Application code
@@ -53,10 +55,10 @@ with get_session() as session:
```bash
# Tests automatically run migrations via conftest fixture
pytest tests/ -v --tb=short
uv run pytest tests/ -v --tb=short
# To test without migrations (in-memory SQLite), use DATABASE_URL="sqlite://"
export DATABASE_URL="sqlite://" pytest tests/test_db.py
DATABASE_URL="sqlite://" uv run pytest tests/test_db.py
```
### Environment Variables
@@ -129,7 +131,7 @@ item = B4wExportFactory.build( # build() for partial, create() for full
## Testing Tips
- Run single test: `pytest tests/test_model_b4wexport.py -v`
- Run single test: `uv run pytest tests/test_model_b4wexport.py -v`
- View migrations: `ls alembic/versions/`
- Test data location: `/scripts/dummy_data/`