Visitar URL original
Documentation: format docstrings for dev docs by C-Achard · Pull Request #3353 · DeepLabCut/DeepLabCut · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
867de4c
Add mdformat hook and update docs scan/exclude
C-Achard Jun 1, 2026
0937706
Use NumPy docstring style and widen line length
C-Achard Jun 1, 2026
1a8d3cf
Format all docstrings
C-Achard Jun 1, 2026
c99aa9d
Format all docs
C-Achard Jun 1, 2026
6125126
Add dev-docs to mdformat
C-Achard Jun 1, 2026
4f32679
Disable mdformat pre-commit hook (broken)
C-Achard Jun 1, 2026
84466b0
Revert "Format all docs"
C-Achard Jun 1, 2026
794619b
use google-style docstrings + remove numpydoc
deruyter92 Jun 2, 2026
640deb2
apply ruff safe fixes all docstrings
deruyter92 Jun 2, 2026
2078850
docs: convert docstrings to Google style (batch A1)
deruyter92 Jun 3, 2026
d59328d
docs: convert docstrings to Google style (batch A2)
deruyter92 Jun 3, 2026
00425f4
docs: convert docstrings to Google style (batch A3)
deruyter92 Jun 3, 2026
0998f8e
docs: convert docstrings to Google style (batch A4)
deruyter92 Jun 3, 2026
944a561
docs: convert docstrings to Google style (batch A5)
deruyter92 Jun 3, 2026
1e33ab0
docs: convert docstrings to Google style (batch B1)
deruyter92 Jun 3, 2026
aede4c4
docs: convert docstrings to Google style (batch B2)
deruyter92 Jun 3, 2026
fd68cb0
docs: convert docstrings to Google style (batch B3)
deruyter92 Jun 3, 2026
741eb42
docs: convert docstrings to Google style (batch B4)
deruyter92 Jun 3, 2026
c046c73
docs: convert docstrings to Google style (batch B5)
deruyter92 Jun 3, 2026
1a50d1c
docs: convert docstrings to Google style (batch B6)
deruyter92 Jun 3, 2026
75046ae
docs: fix existing malformed Google style docstrings (batch C)
deruyter92 Jun 3, 2026
e589365
docs: fix existing outdated Google style docstrings (batch D)
deruyter92 Jun 3, 2026
2580c8b
doc: google docstyle fixes (audit)
deruyter92 Jun 3, 2026
c6d0a46
docs: fix examples in docstrings
deruyter92 Jun 4, 2026
dd04239
Docs: fix cli Args (was Options)
deruyter92 Jun 4, 2026
47a7485
docs: fix docstring exceptions (Raises) prose -> structured
deruyter92 Jun 4, 2026
30a2e36
docs: fix missing function descriptions in docstrings
deruyter92 Jun 4, 2026
4cbef89
docs: fix DLCLoader to_coco docstring
deruyter92 Jun 4, 2026
c949ffc
docs: manually fix incorrect args in docstrings (using griffe)
deruyter92 Jun 4, 2026
0c74661
apply suggestion: adjust comment in modelzoo.py
deruyter92 Jun 5, 2026
4fe31c5
Normalize parameter names in docstrings
C-Achard Jun 9, 2026
3b7e671
Convert doctest examples to plain code
C-Achard Jun 10, 2026
de886e7
Rename videotype to video_extensions and fix docs
C-Achard Jun 10, 2026
583170a
Update analyze_skeleton.py
C-Achard Jun 10, 2026
4eba8c3
Merge remote-tracking branch 'origin/arash/dev_docs' into cy/dev-docs…
C-Achard Jun 10, 2026
7ea3890
Fix pre-commit failures
C-Achard Jun 10, 2026
10f9644
Update uv.lock
C-Achard Jun 10, 2026
2e69e69
auto-detect URLs
deruyter92 Jun 11, 2026
a3871b6
Fix docstrings (examples) in core and create_project
deruyter92 Jun 11, 2026
9887acd
fix docstrings (mostly examples)
deruyter92 Jun 11, 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
Rename videotype to video_extensions and fix docs
Update docstrings and examples to use a clearer parameter name and correct example keys. Replaced occurrences of "videotype" with "video_extensions" across several modules (compat.py, create_project/new.py, modelzoo/video_inference.py, pose_estimation_tensorflow/predict_videos.py, pose_estimation_tensorflow/modelzoo/api/superanimal_inference.py, pose_tracking_pytorch/apis.py), and added a detailed description for the new video_extensions parameter in create_project/new.py. Also corrected example/parameter names in compat.py (displayiters -> display_iters and Shuffles -> shuffles) to match expected naming.
  • Loading branch information
C-Achard committed Jun 10, 2026
commit de886e742e8ca3129d9ce7d47b6bb85bde776097
13 changes: 7 additions & 6 deletions deeplabcut/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def train_network(
batch_size=8,
epochs=100,
save_epochs=10,
displayiters=50,
display_iters=50,
)
"""
if engine is None:
Expand Down Expand Up @@ -382,22 +382,22 @@ def evaluate_network(
If you do not want to plot and evaluate with shuffle set to 1.

deeplabcut.evaluate_network(
'/analysis/project/reaching-task/config.yaml', Shuffles=[1],
'/analysis/project/reaching-task/config.yaml', shuffles=[1],
)

If you want to plot and evaluate with shuffle set to 0 and 1.

deeplabcut.evaluate_network(
'/analysis/project/reaching-task/config.yaml',
Shuffles=[0, 1],
shuffles=[0, 1],
plotting=True,
)

If you want to plot assemblies for a maDLC project:

deeplabcut.evaluate_network(
'/analysis/project/reaching-task/config.yaml',
Shuffles=[1],
shuffles=[1],
plotting="individual",
)

Expand All @@ -407,7 +407,7 @@ def evaluate_network(

deeplabcut.evaluate_network(
"/analysis/project/reaching-task/config.yaml",
Shuffles=[0, 1],
shuffles=[0, 1],
pcutoff={"left_ear": 0.8, "right_ear": 0.8},
)

Expand Down Expand Up @@ -595,7 +595,8 @@ def analyze_videos(
config (str): Full path of the config.yaml file.
videos (list[str]): A list of strings containing the full paths to videos for analysis or a path to
the directory, where all the videos with same extension are stored.
videotype (str | Sequence[str] | None, optional): Controls how ``videos`` are filtered, based on file extension.
video_extensions (str | Sequence[str] | None, optional): Controls
how ``videos`` are filtered, based on file extension.
File paths and directory contents are treated differently:
- ``None`` (default): file paths are accepted as-is; directories are
scanned for files with a recognized video extension.
Expand Down
10 changes: 9 additions & 1 deletion deeplabcut/create_project/new.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,21 @@ def create_new_project(
experimenter (string): The name of the experimenter.
videos (list[str]): A list of strings representing the full paths of the videos
to include in the project. If the strings represent a directory instead of
a file, all videos of ``videotype`` will be imported.
a file, all videos of ``video_extensions`` will be imported.
working_directory (string, optional): The directory where the project will be
created. The default is the ``current working directory``.
copy_videos (bool, optional): If True, the videos are copied to the ``videos``
Comment thread
C-Achard marked this conversation as resolved.
Resolved
directory. If False, symlinks of the videos will be created in the
``project/videos`` directory; in the event of a failure to create symbolic
links, videos will be moved instead. Defaults to False.
video_extensions (str | Sequence[str] | None, optional):
Controls how ``videos`` are filtered, based on file extension.
File paths and directory contents are treated differently:
- ``None`` (default): file paths are accepted as-is; directories are
scanned for files with a recognized video extension.
- ``str`` or ``Sequence[str]`` (e.g. ``"mp4"`` or ``["mp4", "avi"]``):
both file paths and directory contents are filtered by the given
extension(s). Defaults to None.
multianimal (bool, optional): For creating a multi-animal project (introduced
in DLC 2.2). Defaults to False.
individuals (list[str] | None, optional): Relevant only if multianimal is True.
Expand Down
3 changes: 2 additions & 1 deletion deeplabcut/modelzoo/video_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def video_inference_superanimal(
framework), the type of object detector to use for inference.
scale_list (list): A list of different resolutions for the spatial pyramid. Used
only for bottom up models.
videotype (str): Checks for the extension of the video in case the input to the
video_extensions (str | Sequence[str] | None, optional):
Checks for the extension of the video in case the input to the
video is a directory. Only videos with this extension are analyzed. The
default is ``.mp4``.
dest_folder (str): The path to the folder where the results should be saved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def _video_inference_superanimal(
Combined with ``project_name`` as ``project_name + "_" + model_name``.
scale_list (list, optional): Target heights for multi-scale test-time
augmentation. By default uses the original size.
videotype (string, optional): When ``videos`` is a directory, only videos with
video_extensions (string, optional): When ``videos`` is a directory, only videos with
this extension are analyzed. Defaults to ``.mp4``.
video_adapt (bool, optional): If True, apply video adaptation for less
jittering results. Defaults to False.
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/pose_estimation_tensorflow/predict_videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def analyze_videos(
config (str): Full path of the config.yaml file.
videos (list[str]): A list of strings containing the full paths to videos for analysis or a path to
the directory, where all the videos with same extension are stored.
videotype (str | Sequence[str] | None, optional): Controls how ``videos`` are
video_extensions (str | Sequence[str] | None, optional): Controls how ``videos`` are
filtered, based on file extension. File paths and directory contents are
treated differently:
- ``None`` (default): file paths are accepted as-is; directories are
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/pose_tracking_pytorch/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def transformer_reID(
config (string): Full path of the config.yaml file as a string.
videos (list): A list of strings containing the full paths to videos for analysis or a path to
the directory, where all the videos with same extension are stored.
videotype (str | Sequence[str] | None, optional): Controls how ``videos`` are
video_extensions (str | Sequence[str] | None, optional): Controls how ``videos`` are
filtered, based on file extension. File paths and directory contents are
treated differently:
- ``None`` (default): file paths are accepted as-is; directories are
Expand Down