SIGN IN SIGN UP

Harden path-handling after pathlib migration (#3421)

* pathlib mkdir hardening + remaining str concat fixes

* hardening of  path-normalization in `guarantee_multiindex_rows`

The old code checks only the first row (df.index[0]) to decide whether to split on / or \, then applies that one separator to the entire DataFrame.

The new approach normalizes all backslashes to forward slashes first, then splits. So mixed-separator DataFrames (e.g. cross platform merges) work correctly.

* remove str-required `robust_path_split` (redundant with pathlib Path)

* deprecate `str`-based `grab_files_in_folder` and migrate callers to pathlib `Path`

- Deprecate `grab_files_in_folder` (replaced by `collect_video_paths`)
- Replace all internal callers with `collect_video_paths`
- Migrate `check_if_not_analyzed`, `save_data`, `_convert_h5_files_to`,
  and `find_analyzed_data` from `str`-based path ops to pathlib (.stem,
  .with_suffix, .with_name, .removeprefix)
- Remove redundant `Path()` wraps and `str()` conversions at call sites

* fix test_auxiliary functions wrong type: tmpdir.LocalPath -> str or Path

* fix numpy to list conversion in .mat image list.

* Ensure TF branch normalizes to str ( excluded from pathlib migration)

* auxfun_multianimal migrate to Path in Load and Save MA data

* fix pad with spaces in normalize numpy file paths
J
Jaap de Ruyter van Steveninck committed
f6b0effa15c32885bae24f997d8ed859e8f12bdd
Parent: ab9e270
Committed by GitHub <noreply@github.com> on 7/21/2026, 3:54:40 PM