Skip to content

Migrate batch strategy enum to lookup table#597

Open
maxachis wants to merge 1 commit intodevfrom
fix-586-batch-strategy-lookup
Open

Migrate batch strategy enum to lookup table#597
maxachis wants to merge 1 commit intodevfrom
fix-586-batch-strategy-lookup

Conversation

@maxachis
Copy link
Collaborator

Summary

  • migrate batches.strategy from Postgres enum storage to a batch_strategies lookup table with FK batches.batch_strategy_id
  • add BatchStrategy ORM model and refactor batch write/read paths to resolve strategy names via lookup IDs
  • update metrics/task queries to join through strategy lookup values while preserving API behavior
  • add compatibility for existing tests/usages via Batch.strategy property and preserve lookup rows during test DB wipes
  • add ruff as a dev dependency and run lint checks on touched files

Testing

  • UV_CACHE_DIR=.uv-cache uv run ruff check (touched files)
  • UV_CACHE_DIR=.uv-cache uv run pytest -q tests/automated/integration/api/metrics/batches tests/automated/integration/api/test_manual_batch.py tests/automated/integration/api/submit/data_source/test_core.py tests/automated/integration/db/client/test_insert_urls.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant