You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Pipeline registration
* Convert worker tests to integration tests with real ML inference
Replaces fully mocked unit tests with integration tests that validate
the Antenna API contract and run actual ML models. Tests now exercise
the worker's unique code path (RESTDataset → rest_collate_fn) with real
image loading and inference.
Changes:
- Add trapdata/api/tests/utils.py with shared test utilities
- Add trapdata/api/tests/antenna_api_server.py to mock Antenna API
- Rewrite test_worker.py as integration tests (17 tests, all passing)
- Update test_api.py to use shared utilities
Tests validate: real detector/classifier inference, HTTP image loading,
schema compliance, batch processing, and end-to-end workflow.
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* Add AsyncPipelineRegistrationResponse schema
Add Pydantic model to validate responses from pipeline registration API.
Fields: pipelines_created, pipelines_updated, processing_service_id.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Refactor registration functions to use get_http_session
Update get_user_projects() and register_pipelines_for_project() to use
the session-based HTTP pattern established in PR #104:
- Use get_http_session() context manager for connection pooling
- Add retry_max and retry_backoff parameters with defaults
- Remove manual header management (session handles auth)
- Standardize URL paths (base_url now includes /api/v2)
- Use Pydantic model validation for API responses
- Fix error handling with hasattr() check
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Add integration tests for pipeline registration
Add mock Antenna API endpoints:
- GET /api/v2/projects/ - list user's projects
- POST /api/v2/projects/{id}/pipelines/ - register pipelines
Add TestRegistrationIntegration with 2 client tests:
- test_get_user_projects
- test_register_pipelines_for_project
Update TestWorkerEndToEnd.test_full_workflow_with_real_inference to include
registration step: register → get jobs → process → post results.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Add git add -p to recommended development practices
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Read retry settings from Settings in get_http_session()
When max_retries or backoff_factor are not explicitly provided,
get_http_session() now reads defaults from Settings (antenna_api_retry_max
and antenna_api_retry_backoff). This centralizes retry configuration and
allows callers to omit these low-level parameters.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Use Settings pattern in register_pipelines()
- Accept Settings object instead of base_url/auth_token params
- Remove direct os.environ.get() calls for ANTENNA_API_* vars
- Fix error message to reference correct env var (AMI_ANTENNA_API_AUTH_TOKEN)
- Remove retry params from get_user_projects() and register_pipelines_for_project()
since get_http_session() now reads settings internally
- Remove unused os import
Co-Authored-By: Claude Opus 4.5 <[email protected]>
---------
Co-authored-by: Carlos Garcia Jurado Suarez <[email protected]>
Co-authored-by: Carlos Garcia Jurado Suarez <[email protected]>
Co-authored-by: Claude Sonnet 4.5 <[email protected]>
0 commit comments