| cleanup: dead-code sweep, py2 relics, lint gate in CI (closes #136) First-principles necessity pass over the whole package. Everything removed here was verified unreachable, uncallable, or a no-op; the full suite (193 tests, including all pinned metric values) is green before and after. Deleted: - stpyr.py Steerable class + mean_cov (288 lines): mean_cov calls dgemm, which has NEVER been imported -- the entire class has raised NameError on first use since the file was added in 2018. Nothing in the package or its exports references it; STRRED uses the separate SpatialSteerablePyramid, which stays. (The np.matrix and eigh fixes had been dutifully applied inside this dead class; now moot.) - skvideo/__init__.py: the ~80-line commented-out decoder/encoder scanner block kept 'for speed concerns' since the allowlist snapshot was taken. - utils/__init__.py py2 relics: the 25-line python-2.6 check_output backport (replaced by a 3-line stdlib wrapper that preserves the stderr=DEVNULL contract), the py27 itertools.imap/ifilter shim (a no-op on py3 -- the AttributeError fired before assignment), and the never-used binary_type / check_dict. - 36 unused imports across 34 files (ruff --fix, pyflakes F401); re-export __init__ files verified untouched. - 11 dead local assignments: algorithm leftovers in msssim/ videobliinds/block.py (pure assignments, cannot affect metric output -- pinned-value tests confirm), and call-is-the-test patterns in tests. test_vwrite's 2015 'disabled for now' content hash (unfixable by design: encoded bytes are ffmpeg-version- dependent) replaced with a non-empty-output assertion. - unittest2 import blocks (python < 2.7 fallback) in 7 test files. Added: - ruff lint gate in CI, F (pyflakes) rules only -- closes the 2020 issue #136 request for flake8 in CI with the current-generation equivalent. Style rules deliberately not enforced. F403/F405 suppressed: the 'from ..utils import *' re-export mechanism is historical public API surface, tracked separately. Package + tests are now pyflakes-clean; the gate keeps them that way. | 4 months ago |
| add numpy.uint16 support | 8 years ago |
| review fixes: close empty-PATH-element CWD hole, warn on backend='libav', doc completeness Outside (Codex) review of the deprecations branch found the headline security fix incomplete plus two smaller gaps: 1. [P1] The CWD hijack was still reachable: dropping the explicit os.curdir search entry left empty PATH elements ('', ':', ':/usr/bin', '/usr/bin:'), which POSIX treats as the CWD -- reproduced: a fake ./ffprobe executed during 'import skvideo' with PATH=''. Binaries now resolve ONLY from absolute PATH entries (empty and relative entries excluded). Regression test sweeps '', ':', ':/usr/bin', '/usr/bin:', '.', 'relative/dir'; live re-probe of the attack scenario comes back clean (_HAS_FFMPEG=0, where()=[]). 2. [P2] backend='libav' via the documented high-level API never warned on systems without libav: vread/vreader/vwrite check _HAS_AVCONV and raise before LibAVReader/LibAVWriter (where the warning lives) is constructed. The three io.py libav branches now warn first via a shared helper. Tested on all three entry points. 3. [P3] Deprecation docs completed: README mediainfo line and roadmap (avconv dropped), FAQ setLibAVPath answer, and deprecated:: notes for LibAVReader/LibAVWriter/mprobe/avprobe in doc/modules/io.rst. Suite: 193 passed / 15 skipped / 0 failed. | 4 months ago |
| packaging: drop opencv-python-headless, no longer used The v1.2.0 metric-accuracy fixes replaced every cv2.resize call with the internal Pillow-based imresize (brisque.py, videobliinds.py), so nothing in the package imports cv2 anymore -- it survived only in comments. The dependency pin shipped a ~50 MB binary wheel to every user for nothing. Remove it from pyproject dependencies and the README requirements list; update the stale rationale in scripts/smoke_clean_install.sh. Verified: all six public modules import cleanly in a venv with opencv uninstalled. | 4 months ago |
| imports: replace every star-import with explicit names 'from ..utils import *' in 22 module files and star re-exports in the three package __init__ files made every module's namespace an accident: skvideo.io exposed np/os/tempfile/scipy, skvideo.measure exposed blockMotion and xmltodictparser, and whether a name resolved depended on utils' internal import order (the itertools.imap shim removed earlier could have shadowed builtins package-wide through exactly this mechanism). Each module now imports exactly the names it uses, discovered mechanically (remove the star, collect ruff F821 undefined names) -- so every import line is verified load-bearing. The package __init__ files import exactly their declared __all__. Public-namespace audit (dir() before vs after on io/measure/motion/ utils/datasets): every __all__/documented name intact; only the incidental leakage is gone. One leaked name was promoted instead of dropped: skvideo.measure.ssim_full is real user-facing API (the full SSIM map; a repo test exercises it) and is now exported explicitly and listed in __all__. The F403/F405 lint suppression is removed -- the package is now fully pyflakes-clean with no exceptions, and the CI gate enforces it. Suite: 195 passed / 15 skipped / 0 failed. | 4 months ago |
| chore: repo hygiene sweep - .gitignore: add Sphinx build output (doc/_build/, the autosummary stubs in doc/modules/generated/), .venv/, and uv.lock (the project's CI and docs are pip-based; an uncommitted lockfile was ambiguous drift). - Untrack .idea/vcs.xml -- .gitignore already ignores .idea/ but the file predated the rule. - Delete doc/sphinxext/gen_rst.py: unreferenced by conf.py or the doc Makefile, and unrunnable on any modern stack (imports sklearn.externals.six and cPickle). - doc/conf.py: replace sphinx-quickstart template leftovers -- the latex/man/texinfo output tables and the header still said 'scikit-example' by 'Your Name'. - CONTRIBUTING.rst: markdown-style [text](url) links rendered as literal brackets in rst -- converted to rst syntax. Replaced dead instructions (toplevel 'make' that has no Makefile, nose/pep8-era tool commands, nonexistent toplevel examples/) with the real workflow: pip install -e '.[test]', pytest, doc/examples/. Documented the actual part-time review cadence. | 4 months ago |
| imports: replace every star-import with explicit names 'from ..utils import *' in 22 module files and star re-exports in the three package __init__ files made every module's namespace an accident: skvideo.io exposed np/os/tempfile/scipy, skvideo.measure exposed blockMotion and xmltodictparser, and whether a name resolved depended on utils' internal import order (the itertools.imap shim removed earlier could have shadowed builtins package-wide through exactly this mechanism). Each module now imports exactly the names it uses, discovered mechanically (remove the star, collect ruff F821 undefined names) -- so every import line is verified load-bearing. The package __init__ files import exactly their declared __all__. Public-namespace audit (dir() before vs after on io/measure/motion/ utils/datasets): every __all__/documented name intact; only the incidental leakage is gone. One leaked name was promoted instead of dropped: skvideo.measure.ssim_full is real user-facing API (the full SSIM map; a repo test exercises it) and is now exported explicitly and listed in __all__. The F403/F405 lint suppression is removed -- the package is now fully pyflakes-clean with no exceptions, and the CI gate enforces it. Suite: 195 passed / 15 skipped / 0 failed. | 4 months ago |
| chore: repo hygiene sweep - .gitignore: add Sphinx build output (doc/_build/, the autosummary stubs in doc/modules/generated/), .venv/, and uv.lock (the project's CI and docs are pip-based; an uncommitted lockfile was ambiguous drift). - Untrack .idea/vcs.xml -- .gitignore already ignores .idea/ but the file predated the rule. - Delete doc/sphinxext/gen_rst.py: unreferenced by conf.py or the doc Makefile, and unrunnable on any modern stack (imports sklearn.externals.six and cPickle). - doc/conf.py: replace sphinx-quickstart template leftovers -- the latex/man/texinfo output tables and the header still said 'scikit-example' by 'Your Name'. - CONTRIBUTING.rst: markdown-style [text](url) links rendered as literal brackets in rst -- converted to rst syntax. Replaced dead instructions (toplevel 'make' that has no Makefile, nose/pep8-era tool commands, nonexistent toplevel examples/) with the real workflow: pip install -e '.[test]', pytest, doc/examples/. Documented the actual part-time review cadence. | 4 months ago |
| license: fill BSD template placeholder, drop divergent COPYING duplicate LICENSE.txt -- the file pyproject's license-files actually ships in every wheel and sdist -- still contained the unfilled boilerplate "Neither the name of [project] nor ..." from the BSD-3-Clause template. Fill in scikit-video and extend the copyright span to 2015-2026 to match the README footer and the project's actual history. Remove COPYING: it was a second, divergent copy of the same BSD-3-Clause text (2015 vs 2017 copyright line, different clause wording), referenced by nothing in the repo or packaging config. Two disagreeing license files is worse than one; LICENSE.txt is canonical. | 4 months ago |
| packaging: make sdist carry CHANGELOG, CONTRIBUTING, LICENSE, README MANIFEST.in was vestigial ('include MANIFEST.in' + 'include *.txt'), so the sdist shipped without CHANGELOG.rst or CONTRIBUTING.rst -- the CHANGELOG being the file that documents the 1.2.0 breaking metric changes. List the four top-level docs explicitly. Verified by building an sdist and listing its contents. | 4 months ago |
| review fixes: close empty-PATH-element CWD hole, warn on backend='libav', doc completeness Outside (Codex) review of the deprecations branch found the headline security fix incomplete plus two smaller gaps: 1. [P1] The CWD hijack was still reachable: dropping the explicit os.curdir search entry left empty PATH elements ('', ':', ':/usr/bin', '/usr/bin:'), which POSIX treats as the CWD -- reproduced: a fake ./ffprobe executed during 'import skvideo' with PATH=''. Binaries now resolve ONLY from absolute PATH entries (empty and relative entries excluded). Regression test sweeps '', ':', ':/usr/bin', '/usr/bin:', '.', 'relative/dir'; live re-probe of the attack scenario comes back clean (_HAS_FFMPEG=0, where()=[]). 2. [P2] backend='libav' via the documented high-level API never warned on systems without libav: vread/vreader/vwrite check _HAS_AVCONV and raise before LibAVReader/LibAVWriter (where the warning lives) is constructed. The three io.py libav branches now warn first via a shared helper. Tested on all three entry points. 3. [P3] Deprecation docs completed: README mediainfo line and roadmap (avconv dropped), FAQ setLibAVPath answer, and deprecated:: notes for LibAVReader/LibAVWriter/mprobe/avprobe in doc/modules/io.rst. Suite: 193 passed / 15 skipped / 0 failed. | 4 months ago |
| imports: replace every star-import with explicit names 'from ..utils import *' in 22 module files and star re-exports in the three package __init__ files made every module's namespace an accident: skvideo.io exposed np/os/tempfile/scipy, skvideo.measure exposed blockMotion and xmltodictparser, and whether a name resolved depended on utils' internal import order (the itertools.imap shim removed earlier could have shadowed builtins package-wide through exactly this mechanism). Each module now imports exactly the names it uses, discovered mechanically (remove the star, collect ruff F821 undefined names) -- so every import line is verified load-bearing. The package __init__ files import exactly their declared __all__. Public-namespace audit (dir() before vs after on io/measure/motion/ utils/datasets): every __all__/documented name intact; only the incidental leakage is gone. One leaked name was promoted instead of dropped: skvideo.measure.ssim_full is real user-facing API (the full SSIM map; a repo test exercises it) and is now exported explicitly and listed in __all__. The F403/F405 lint suppression is removed -- the package is now fully pyflakes-clean with no exceptions, and the CI gate enforces it. Suite: 195 passed / 15 skipped / 0 failed. | 4 months ago |