Project hardening: tests, bug fixes, versioning, CI, and docs - #9
Merged
Conversation
Remove np.int monkey-patch — dtcwt 0.14.0 doesn't need it. Keep fps as float instead of truncating with int() (3.2% error on 29.97fps). Add frame_count guard in load_video to prevent buffer overflow. Guard flattop_filter_1d against zero window size. Fixes #2
Single source of truth for version in VERSION file. Build script reads from it, tags image, and passes version as Docker build arg. Fixes #3
Add requirements-dev.txt (pytest, ruff), tests directory with initial format_duration tests. Dockerfile installs dev deps and copies tests. test.sh builds image if needed, runs lint + tests inside Docker. Fix ruff F541 lint error. Fixes #4
Tier 1: normalize_phase (unit magnitude, zero safety, phase preservation). Tier 2: flattop_filter (DC passthrough, smoothing, small width guard), extract_temporal_phases (constant phase, output shape). Tier 3: magnify_motions smoke tests (shape, dtype, finite values). Buffer guard test with mocked VideoCapture. Input validation: all CLI error paths. Fixes #5, fixes #6
Run all CI steps inside Docker matching dev workflow. Add ruff lint step. Update actions/checkout to v6. Remove actions/setup-python (not needed with Docker). Fixes #7
Create CHANGELOG.md (Keep a Changelog, starting fresh). Commit design doc covering architecture decisions and hardening plan. Pin dtcwt upper bound to <1. Add Development section to README (testing, versioning, project structure). Update CONTRIBUTING.md with test.sh instructions. Fixes #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VERSIONfile, Docker image version labels and tagstest.shfor local dev testing inside DockerCHANGELOG.md, design doc,requirements-dev.txtdtcwtupper bound (<1)Fixes #1, fixes #2, fixes #3, fixes #4, fixes #5, fixes #6, fixes #7, fixes #8
Test plan
./test.sh