Visitar URL original
Migrate to `pathlib.Path` instead of `str` (first phase) by deruyter92 · Pull Request #3350 · DeepLabCut/DeepLabCut · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
3b8c44a
fix path resolution on network drives. Replace Path(..).resolve() wi…
deruyter92 May 29, 2026
fddcbaa
Add safe_resolve helper for path resolution
deruyter92 May 29, 2026
2403b72
replace str with pathlib.Path
deruyter92 May 29, 2026
65f8dfb
fix redundant resolution of resolved path in memory_replay.py
deruyter92 May 29, 2026
6bbe26d
fix open -> os.stat
deruyter92 May 29, 2026
3f93a76
replace os.stat -> open for files, listdir for dirs.
deruyter92 May 29, 2026
87cd6aa
fix TestReadConfigProjectPath
deruyter92 May 29, 2026
8be1c26
Update deeplabcut/utils/auxiliaryfunctions.py
deruyter92 May 29, 2026
f2bb35d
additional replacements: str ->Path
deruyter92 Jun 3, 2026
810406a
Update function signatures str -> str | Path
deruyter92 Jun 4, 2026
c7835bc
Add ruff linting rule PTH
deruyter92 Jun 4, 2026
5419546
Open dataset file directly using Path.open
C-Achard Jun 15, 2026
156c25f
Use context manager when writing pose_cfg.yaml
C-Achard Jun 15, 2026
d854aa5
Pass string path to cv2.VideoCapture
C-Achard Jun 15, 2026
a99f18b
Use explicit loop to unlink frame files
C-Achard Jun 15, 2026
e896398
Fix CircleCI failure
C-Achard Jun 15, 2026
132b882
fix Matplotlib Path import shadowing ->MPLPath
deruyter92 Jun 25, 2026
ee77f84
use pathlib consistently in `metrics`
deruyter92 Jun 25, 2026
0f2d32e
use safe_resolve in export
deruyter92 Jun 25, 2026
421bdc8
remove redundant defensive block for windows paths on python 3.6
deruyter92 Jun 25, 2026
f80c780
remove unused `get_immediate_subdirectories`
deruyter92 Jun 25, 2026
61165bc
use Path in plot_edge_affinity_distributions
deruyter92 Jun 25, 2026
693e945
remove PTH enforcement in linting
deruyter92 Jun 25, 2026
8f3008b
use safe_resolve instead of resolve in `training` and `auxiliaryfunct…
deruyter92 Jun 25, 2026
107a29a
Update GUI assets import (#3370)
C-Achard Jun 25, 2026
5ec1023
Merge remote-tracking branch 'upstream/main' into jaap/safe_resolve_p…
deruyter92 Jun 26, 2026
f422dcc
Merge branch 'main' into jaap/safe_resolve_paths
C-Achard Jun 29, 2026
9d2732b
Adjust config path tests for Path objects
C-Achard Jun 29, 2026
b33ae3e
Merge main in #3350
C-Achard Jun 29, 2026
ad1ae3e
Merge branch 'jaap/safe_resolve_paths' into jaap/pathlib_path_policy
C-Achard Jun 29, 2026
3ab3bd9
Fix os import in safe_resolve
C-Achard Jun 29, 2026
bb23a34
address remaining `.resolve()` cases: prefer `.absolute()`, or otherw…
deruyter92 Jul 6, 2026
831cb1d
update `safe_resolve`: add logging, use os.stat (more efficient)
deruyter92 Jul 6, 2026
77bf7f0
update test safe_resolve: allow fallback and test open/closing instead
deruyter92 Jul 6, 2026
ca63582
Merge remote-tracking branch 'upstream/main' into jaap/safe_resolve_p…
deruyter92 Jul 6, 2026
205b550
fix remaining Path.resolve()
deruyter92 Jul 7, 2026
f1e9d97
Merge remote-tracking branch 'upstream/jaap/safe_resolve_paths'
deruyter92 Jul 7, 2026
c51a25a
fix reintroduced pathlib `resolve()` occurences (see #3349)
deruyter92 Jul 7, 2026
a3b9f12
use pathlib Path in GUI codebase
deruyter92 Jul 7, 2026
09b578c
use pathlib Path in memory replay
deruyter92 Jul 7, 2026
58bc2a4
GUI rename field `config` to `config_path`
deruyter92 Jul 7, 2026
af613f3
GUI use os.fspath for str conversions where required
deruyter92 Jul 7, 2026
1586e2a
use pathlib Path in create_project
deruyter92 Jul 7, 2026
c49d392
use pathlib Path across pose_estimation_pytorch internally
deruyter92 Jul 7, 2026
6a85abb
use centralized yaml dumper (which normalizes Path -> str)
deruyter92 Jul 9, 2026
33c7b58
fix materialize.py downstream old str.split -> Path
deruyter92 Jul 9, 2026
efebf8d
fix testsscripts str usage
deruyter92 Jul 9, 2026
971f381
fix old str usage in trainingsetmanipulation
deruyter92 Jul 9, 2026
292b251
allow str type at TF boundary
deruyter92 Jul 9, 2026
1330eab
allow str formatting in tensorflow code
deruyter92 Jul 9, 2026
84b5c83
fix config update in train_from_coco.py
deruyter92 Jul 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
allow str formatting in tensorflow code
  • Loading branch information
deruyter92 committed Jul 9, 2026
commit 1330eabc79bc21fa04882a610572160ea58857da
2 changes: 1 addition & 1 deletion deeplabcut/pose_estimation_tensorflow/visualizemaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def extract_save_all_maps(
)
attempt_to_make_folder(dest_folder)
filepath = "{imname}_{map}_{label}_{shuffle}_{frac}_{snap}.png"
dest_path = Path(dest_folder) / filepath
dest_path = str(Path(dest_folder) / filepath)
for snap, maps in values.items():
for imagenr in tqdm(maps):
(
Expand Down