Skip to content

fix: use uv instead of poetry for development; upgrade to pydantic v2#273

Merged
gary-Shen merged 8 commits intomainfrom
fix/project-optimization
Mar 20, 2026
Merged

fix: use uv instead of poetry for development; upgrade to pydantic v2#273
gary-Shen merged 8 commits intomainfrom
fix/project-optimization

Conversation

@gary-Shen
Copy link
Copy Markdown
Member

No description provided.

shlab and others added 8 commits March 18, 2026 20:05
…e JWT expiration, improve code quality

- Remove hardcoded PASSWORD_SECRET_KEY, use env variable with auto-generate fallback
- Enable JWT token expiration verification (HTTP + WebSocket)
- Fix Authorization header null crash with proper error handling
- Replace bare Exception catch with specific exception types
- Fix deprecated datetime.utcnow() -> datetime.now(timezone.utc)
- Disable verbose SQL echo logging in production and tests
- Move config.py class-level side effects to post-instantiation
- Use safe default MEDIA_HOST in Dockerfile
- Add .env.example and CLAUDE.md for development guidance
- Fix hardcoded token in test to use dynamic generation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ExportJob model and async background export to prevent HTTP timeout
  on large datasets (4700+ samples)
- Remove state-based sample filtering in converter that silently dropped
  non-DONE samples (MASK, LABEL_ME, YOLO, CSV, PASCAL_VOC formats)
- Use run_in_executor for thread pool execution to avoid blocking the
  event loop with synchronous DB/IO operations
- Add export job status polling and file download endpoints
- Add regression test for multi-state sample export

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Root causes and fixes:
- LabelUException missing `detail` attribute: call super().__init__() to
  properly initialize HTTPException base class
- Query `regex` param deprecated in FastAPI 0.125: change to `pattern`
- Test URL params overridden by httpx `params` dict: move query string
  params into `params` dict to avoid silent override
- FileResponse built-in Range handling in Starlette 0.50 conflicts with
  custom Range logic: use Response for invalid Range fallback
- Hardcoded sample IDs in sort test: use dynamic IDs from actual data
- HTTPBearer returns 401 in newer Starlette (was 403): update test
  expectations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gary-Shen gary-Shen merged commit 8a79d18 into main Mar 20, 2026
1 check passed
@gary-Shen gary-Shen deleted the fix/project-optimization branch March 20, 2026 12:19
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