update `list_videos_in_folder` (#3303)
* Update `list_video_files_in_folder` only filter explicitly provided files if filter `video_type` is set. - Accept files without extension - Default folder searching is kept as is (using valid video extensions) * add test for list_videos_in_folder * Add deprecation utils: decorator for deprecated functions * move `list_videos_in_folder` to `collect_video_paths` in auxfun_videos.py * export `deeplabcut.collect_video_paths(..)` from auxfun_videos.py * update `collect_video_paths`: add exclude patterns * deprecate auxfun `get_list_of_videos` in favor of `collect_video_paths` * add pytest deprecation marker `test_get_list_of_videos` * Mark `get_video_list` as deprecated (keep for now for backward compatibility) * fix test_collect_video_paths: rename keyword -> extensions * Adjust `extensions` parameter: flexibly coerce str / list / tuple -> set of extensions. * `collect_video_paths`: sort videos if shuffle=False * update docstring non-recursive directory scanning. * update collect_video_paths: DEFAULT_EXCLUDE_PATTERNS * update _coerce_extensions: only "" and None normalize to None * fix instance check in _coerce_video_extensions * fix pytest: assert alphabetic ordering if shuffle=False * fix empty string case in _coerce_extensions * Add structured deprecation info and warnings (#3326) * Add structured deprecation info and warnings Introduce a DLCDeprecationWarning and a DeprecationInfo pydantic model to standardize deprecation metadata (kind, target, replacement, since, removed_in, renamed params) with parsing and validation of versions. Revamp deprecated and renamed_parameter decorators to build messages from DeprecationInfo, emit DLCDeprecationWarning, attach metadata to wrapped callables (__deprecated_info__, __deprecated_params__), use ParamSpec/TypeVar typing for wrappers, and enforce error when both old and new kwargs are passed. Switch to packaging.version for version parsing. * Use DLCDeprecationWarning and add metadata tests Replace generic DeprecationWarning checks with DLCDeprecationWarning and import packaging.version.Version. Add tests verifying deprecated decorators attach metadata (including since/removed_in parsed as Version), validate invalid version inputs, and ensure removed_in > since. Also add tests for renamed_parameter behavior (conflicting old+new raises, metadata attachment, and invalid since handling) and small docstring/name preservation assertions. * Add packaging as core dep * guarantee unchanged behavior for deprecated `get_list_of_videos` and `list_videos_in_folder` * add warning if still unsupported extensions encountered * Consequently adjust `videotype` signatures of collect_video_path callers * refactor collect_video_paths: add warnings, raise for empty sequence. * update tests for collect_video_paths --------- Co-authored-by: Cyril Achard <cyril.achard@epfl.ch> Co-authored-by: Mackenzie Mathis <mathis@rowland.harvard.edu>
J
Jaap de Ruyter van Steveninck committed
1ad8887712082780ca8ab1b57078d3171db83cf7
Parent: ed7438e
Committed by GitHub <noreply@github.com>
on 5/15/2026, 12:03:14 PM