|
| 1 | +# JOSS Submission — Testing & CI Polish Task List |
| 2 | + |
| 3 | +Tracked tasks for improving test coverage and CI quality before JOSS submission. |
| 4 | +Created 2026-02-27 based on coverage analysis of v1.4.1. |
| 5 | + |
| 6 | +**Baseline:** 774 tests, 750 passed, 24 skipped, 47.75% line coverage. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## 1. High-ROI Test Additions |
| 11 | + |
| 12 | +### 1.1 Pure utility functions (0% coverage, easiest wins) |
| 13 | + |
| 14 | +- [x] **`utils/math_utils.py`** — 45 lines, 0% -> covered. Tests in `tests/unit/utils/test_math_utils.py`. |
| 15 | +- [x] **`utils/transform_utils.py`** — 17 lines, 0% -> covered. Tests in `tests/unit/utils/test_transform_utils.py`. |
| 16 | + |
| 17 | +### 1.2 Validation and export logic (0–16% coverage, high JOSS value) |
| 18 | + |
| 19 | +- [x] **`validation/coco_validator.py`** — 218 lines, 0% -> covered. Tests in `tests/unit/validation/test_coco_validator.py`. |
| 20 | +- [x] **`exporters/native_formats.py`** — 215 lines, 16% -> covered. Tests in `tests/unit/exporters/test_native_formats.py`. Also fixed 3 bugs (WebVTT append, praatio import, TextGrid save). |
| 21 | + |
| 22 | +### 1.3 Auth and data layer gaps (44–56% coverage) |
| 23 | + |
| 24 | +- [ ] **`auth/token_manager.py`** — 141 lines, 56% coverage. JWT create/verify/refresh logic. Estimated +40–60 lines covered. |
| 25 | +- [ ] **`database/crud.py`** — 166 lines, 44% coverage. CRUD operations, testable with in-memory SQLite. Estimated +50–80 lines covered. |
| 26 | + |
| 27 | +### 1.4 Other notable gaps |
| 28 | + |
| 29 | +- [ ] **`utils/automatic_labeling.py`** — 156 lines, 6% coverage. |
| 30 | +- [ ] **`utils/person_identity.py`** — 163 lines, 18% coverage. |
| 31 | +- [ ] **`pipelines/face_analysis/openface_compatibility.py`** — 69 lines, 0% coverage. |
| 32 | +- [ ] **`schemas/industry_standards.py`** + **`schemas/storage.py`** — 21 lines total, 0% coverage. |
| 33 | + |
| 34 | +### 1.5 Lower priority (large modules, harder to unit-test) |
| 35 | + |
| 36 | +- [ ] **`cli.py`** — 637 lines, 8% coverage. CLI commands are integration-heavy; consider a few smoke tests via `typer.testing.CliRunner`. |
| 37 | +- [ ] **`main.py`** — 84 lines, 0% coverage. App factory / startup glue. |
| 38 | + |
| 39 | +**Target:** reach ≥55% line coverage (from 47.75%) by completing sections 1.1–1.2. |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | +## 2. CI/CD Fixes |
| 44 | + |
| 45 | +### 2.1 Linting alignment |
| 46 | + |
| 47 | +- [x] **Match ruff rules in CI to pyproject.toml** — Removed `--select` override. CI now uses project config. All 82 pre-existing lint errors fixed. |
| 48 | +- [x] **Add `ruff format --check`** to CI for consistent formatting. |
| 49 | + |
| 50 | +### 2.2 Un-gate quality checks |
| 51 | + |
| 52 | +- [x] **Run mypy on all PRs** — Now runs on ubuntu-latest for every push/PR. |
| 53 | +- [x] **Run integration tests on PRs** — Now runs on push and workflow_dispatch. |
| 54 | + |
| 55 | +### 2.3 Coverage enforcement |
| 56 | + |
| 57 | +- [x] **Add `--cov-fail-under=45`** to the pytest step to prevent coverage regressions. Raise threshold as coverage improves. |
| 58 | + |
| 59 | +### 2.4 Bump outdated GitHub Actions — DONE |
| 60 | + |
| 61 | +All actions bumped in ci-cd.yml: |
| 62 | + |
| 63 | +| Action | Old | New | |
| 64 | +|---|---|---| |
| 65 | +| `actions/setup-python` | `@v4` | `@v5` | |
| 66 | +| `codecov/codecov-action` | `@v3` | `@v4` | |
| 67 | +| `aquasecurity/trivy-action` | `@master` | `@0.28.0` | |
| 68 | +| `github/codeql-action/upload-sarif` | `@v2` | `@v3` | |
| 69 | +| `docker/setup-buildx-action` | `@v2` | `@v3` | |
| 70 | +| `docker/login-action` | `@v2` | `@v3` | |
| 71 | +| `docker/metadata-action` | `@v4` | `@v5` | |
| 72 | +| `docker/build-push-action` | `@v4` | `@v6` | |
| 73 | + |
| 74 | +### 2.5 Dependency hygiene |
| 75 | + |
| 76 | +- [ ] **Move `pytest` and `pytest-asyncio` from `[project.dependencies]` to dev-only** — they are runtime test deps shipped to end users today. |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## 3. Metadata Fixes |
| 81 | + |
| 82 | +- [x] **Fix `project.urls`** in pyproject.toml — updated to `InfantLab/VideoAnnotator`. |
| 83 | +- [ ] **Add Codecov badge** to README.md. |
| 84 | + |
| 85 | +--- |
| 86 | + |
| 87 | +## 4. JOSS Checklist Remaining Items |
| 88 | + |
| 89 | +- [ ] Push tag to remote: `git push origin v1.4.1` |
| 90 | +- [ ] Create GitHub Release for v1.4.1 |
| 91 | +- [ ] Improve git contributor attribution (only 1 contributor visible in history) |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +## Progress Log |
| 96 | + |
| 97 | +| Date | Change | Coverage Impact | |
| 98 | +|---|---|---| |
| 99 | +| 2026-02-27 | Baseline measured | 47.75% line, ~25% branch | |
| 100 | +| 2026-02-27 | Added tests for math_utils, transform_utils, coco_validator, native_formats (4 new test files, 86 new tests) | 47.75% -> 51.97% (+4.22%) | |
| 101 | +| 2026-02-27 | Fixed 3 bugs in native_formats.py (WebVTT append, praatio import, TextGrid save) | — | |
| 102 | +| 2026-02-27 | Fixed all 82 ruff lint errors (31 autofix + 51 manual) | — | |
| 103 | +| 2026-02-27 | CI: broadened ruff rules, un-gated mypy, un-gated integration tests, added coverage threshold, bumped all action versions | — | |
| 104 | +| 2026-02-27 | Fixed project.urls to point to InfantLab/VideoAnnotator | — | |
0 commit comments