Skip to content

Commit 035e3bd

Browse files
authored
Plugin refactor [docs]: Add v0.3.0.0 release notes and images (#195) (#199)
* Plugin refactor [docs]: Add v0.3.0.0 release notes and images (#195) * Add v0.3.0.0 release notes and images Add release notes for v0.3.0.0 (docs/release_notes/v0_3_0_0.md) describing a near-complete plugin rewrite, safety and debugging improvements, UI and workflow changes, data loading/saving fixes, and other quality-of-life and code-quality updates. Include accompanying images used by the notes (status_panel, color_scheme_skip, traj_plot, tutorial, shortcuts, debug, new_menu, and others) under docs/release_notes/imgs/v_0_3_0_0/. * Update v0.3.0 release notes Add notes about a minimal deprecation system and new debug contexts for performance monitoring and automated log generation. Also add a link to issue #184 for refactor discussion, adjust final wording, and apply minor formatting/whitespace fixes in the drag-&-drop and closing paragraphs. * mdformat * Add stages and split ruff hooks Introduce default_stages and explicitly assign stages to hooks, marking safe checks as pre-commit/manual and file-modifying hooks as pre-commit-only. Add check-merge-conflict, set name-tests-test args, and ensure end-of-file-fixer/trailing-whitespace run only in pre-commit. Bump pyproject-fmt to v2.21.1 and update ruff pre-commit to v0.15.12, replacing the previous ruff entries with a clear split: local autofix/format hooks (pre-commit) and CI check-only variants (manual) with appropriate args. Remove the napari-plugin-checks entry and reorganize hooks for clearer local vs CI behavior. * Add table * Update v0_3_0_0.md * Update v0.3.0.0 release notes Revise docs/release_notes/v0_3_0_0.md to clarify plugin behavior and improve wording. Reword the intro to highlight safety improvements around data loading/saving and improved UX; change note types to emphasize important workflow changes. Clarify the progress estimate as a relative metric, update wording for trails and trajectory plot behavior, and refine the explanation of automatic config.yaml lookup for drag-&-drop loading. Fix a typo ("sratch" -> "scratch") and expand the data-loading recovery note to indicate fewer remapping issues and fewer incorrect loads. Small phrasing tweaks throughout for clarity and consistency. * Dedent admonitions * Clarify config.yaml handling in release notes Update v0_3_0_0 release notes to emphasize that users should not always add the config.yaml when loading labeled data (the plugin will search parent folders). Add a note explaining when dragging/dropping the config.yaml is still required — to start annotating from scratch or to refresh body parts after modifying config.yaml — and that resuming annotation or loading existing annotations does not require it. * Update links * Update v0_3_0_0.md
1 parent f43ceeb commit 035e3bd

9 files changed

Lines changed: 177 additions & 0 deletions

File tree

124 KB
Loading
13.4 KB
Loading
17.4 KB
Loading
6.64 KB
Loading
18.4 KB
Loading
5.12 KB
Loading
362 KB
Loading
19.4 KB
Loading

docs/release_notes/v0_3_0_0.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# napari-deeplabcut v0.3.0.0
2+
3+
This release brings a nearly-complete rewrite of the plugin, keeping a familiar UI and workflow but adding many new **safety improvements** around data loading/saving, **improved user experience** including more informative dialogs and issue reporting tools, and many **quality-of-life improvements**.
4+
5+
> [!IMPORTANT]
6+
> As much of the basic workflow has been modified and updated, experienced users may have to adapt to the newest changes in the plugin, as we simplified data loading and saving. Expect a slight adjustment period as you get used to the new workflow, but we hope you will appreciate the streamlining and new features!
7+
8+
## New features
9+
10+
### UI additions
11+
12+
<p align="center">
13+
<img
14+
src="https://raw.githubusercontent.com/DeepLabCut/napari-deeplabcut/main/docs/release_notes_/imgs/v_0_3_0_0/status_panel.png"
15+
alt="New status panel"
16+
width="200"
17+
>
18+
<br>
19+
<em>New status panel with folder, progress estimate, and point size slider</em>
20+
</p>
21+
22+
- **New tooltip showing currently opened folder**
23+
- **New "progress estimate" widget**, showing the estimated % frames labeled in the current folder.
24+
25+
> [!NOTE]
26+
> The estimate should be considered a relative progress metric, rather than a requirement to reach 100% on every folder, as the estimate cannot account for non-visible keypoints.
27+
28+
- **Global point size slider**:
29+
- Updates the size of all keypoints in the viewer
30+
- Saved to config.yaml automatically, and loaded on startup
31+
- One can still use the native napari point size slider for individual points, but this will not be persisted.
32+
33+
<p align="center">
34+
<img
35+
src="https://raw.githubusercontent.com/DeepLabCut/napari-deeplabcut/main/docs/release_notes_/imgs/v_0_3_0_0/color_scheme_skip.gif"
36+
alt="Color scheme display improvements"
37+
width="300"
38+
>
39+
<br>
40+
<em>New color scheme display interactions</em>
41+
</p>
42+
43+
- **Color scheme display improvements**:
44+
45+
- Now only shows entries for keypoints on the current frame
46+
- Added a toggle to show all keypoints from config.yaml, even if they are not visible on the current frame
47+
- Clicking an entry now selects all matching keypoints in the frame
48+
- Clicking an entry in "Show all keypoints" mode will jump to the first frame where that keypoint is visible, and select all matching keypoints in that frame, if any.
49+
- Also works for multi-animal data:
50+
- Clicking an individual's entry will select all keypoints for that individual
51+
- Clicking on a bodypart entry will select all keypoints for that bodypart across all individuals
52+
53+
- **Fixed & improved trails**:
54+
55+
- Trails now work properly in multi-animal data, showing trails for all individuals of the proper color
56+
- Basic visualization settings for trails are persisted across sessions
57+
58+
<p align="center">
59+
<img
60+
src="https://raw.githubusercontent.com/DeepLabCut/napari-deeplabcut/main/docs/release_notes_/imgs/v_0_3_0_0/traj_plot.gif"
61+
alt="Trajectory plot improvements"
62+
width="300"
63+
>
64+
<br>
65+
<em>New trajectory plot interactions</em>
66+
</p>
67+
68+
- **Fixed and improved trajectory plot**:
69+
- Colors are now dynamically updated to match individuals/bodyparts in the viewer
70+
- Selecting points automatically filters the plot to the selected individuals/bodyparts
71+
- Fixed Y coordinates to match napari viewer coordinates (top-left origin)
72+
<p align="center">
73+
<img
74+
src="https://raw.githubusercontent.com/DeepLabCut/napari-deeplabcut/main/docs/release_notes_/imgs/v_0_3_0_0/tutorial.png"
75+
alt="Tutorial improvements"
76+
width="200"
77+
>
78+
<br>
79+
<em>New tutorial</em>
80+
</p>
81+
82+
<p align="center">
83+
<img
84+
src="https://raw.githubusercontent.com/DeepLabCut/napari-deeplabcut/main/docs/release_notes_/imgs/v_0_3_0_0/shortcuts.png"
85+
alt="Keyboard shortcuts improvements"
86+
width="300"
87+
>
88+
<br>
89+
<em>New keyboard shortcuts</em>
90+
</p>
91+
92+
- **Improved tutorial and keyboard shortcuts dialogs**
93+
- Keybinds are now dynamically shown if available, and document why they are enabled/disabled based on context
94+
- e.g. No Points layer -> Points navigation shortcuts are disabled
95+
- Updated tutorial visuals
96+
97+
<p align="center">
98+
<img
99+
src="https://raw.githubusercontent.com/DeepLabCut/napari-deeplabcut/main/docs/release_notes_/imgs/v_0_3_0_0/crop.png"
100+
alt="Video frame extraction and cropping menu"
101+
width="150"
102+
>
103+
<br>
104+
<em>New video frame extraction and cropping menu</em>
105+
</p>
106+
107+
- **Improved video frame extraction and cropping**
108+
- Loading a video opens the usual Video Controls panel, now with additional contextual information
109+
- Checking "Crop with rectangle" immediately creates a Shapes layer and selects the rectangle drawing tool
110+
- Safer method for selecting which rectangle to use for cropping when multiple are present, and better handling of edge cases
111+
- Shows the crop coordinates as they will appear in config.yaml
112+
113+
<p align="center">
114+
<img
115+
src="https://raw.githubusercontent.com/DeepLabCut/napari-deeplabcut/main/docs/release_notes_/imgs/v_0_3_0_0/debug.png"
116+
alt="Debug log menu"
117+
width="150"
118+
>
119+
<br>
120+
<em>New debug log generation utility</em>
121+
</p>
122+
123+
- **Debug log generation utility**
124+
- Opening a Keypoint Controls dialog now adds a ***Help > Generate napari-dlc log*** option
125+
- Generates a copy-pastable log of relevant information about the plugin and napari environment, as well as latest debug messages, to help with debugging and issue reporting
126+
127+
### Data loading/saving fixes and improvements
128+
129+
- **Drag & drop loading is fixed!**
130+
- Now auto-opens Keypoint Controls on folder load
131+
- When saving "project-less" annotations, the plugin may ask for a config.yaml if relevant, which will write annotations relative to the specified project. **Users should then move the resulting annotations folder back to the specified project.**
132+
133+
> [!IMPORTANT]
134+
> Users **should not always add the config.yaml to the viewer when loading labeled data folders**. The plugin now checks parent folders as per the canonical DLC project structure, and will automatically find and load the config.yaml if it is present in a parent folder.
135+
>
136+
> Note that in order to **start annotating from scratch** or to **refresh body parts after modifying the config.yaml**, one still must drag and drop the updated config.yaml into the viewer.
137+
> This is currently required to re-populate the metadata for the project. Other use cases, like resuming annotation or loading existing annotations, do not require dragging and dropping the config.yaml.
138+
139+
- **Copy-paste is fixed!**
140+
- **Any save that would overwrite data now shows a confirmation dialog**
141+
- Can be disabled with the "Warn on overwrite" option in the Keypoint Controls, if one is labeling from scratch and requires faster saves
142+
- Saving machine labels now clearly shows that the CollectedData file will be modified, and warns about overwriting existing data if there are conflicts with existing labels
143+
- Improved data loading checks and remapping of frames
144+
- Moving data between folders or machines should cause less issues with frame remapping, and the plugin should be able to recover from more types of data loading issues without crashing or incorrectly loading data.
145+
- Loading a video and adding the config.yaml for the placeholder Points layer, and attempting to save, now warns about the missing frame extraction step, and offers a procedure to follow the DLC workflow more closely.
146+
- Fixed several issues around config updates when refreshing by loading the config.yaml
147+
- Attempting to open several labeled data folders at once now warns about only supporting one folder at a time, attempts to load annotations, and skips images/video frames from the new project, rather than ending up in an inconsistent state.
148+
149+
## Bug fixes
150+
151+
- Several bugs, edge cases and unsafe data handling have been fixed, and the plugin should be much more stable and less likely to crash or lose data.
152+
- Reduced reliance on specific napari versions, and introduced a compatibility layer for any code that is closer to napari internals
153+
- Greatly reduced napari internals monkeypatching and API-specific code
154+
- Better handling of moved paths, missing config, broken or partial HDF5 files, and other common issues that may arise when moving data around or working with multiple machines
155+
156+
## Code quality improvements
157+
158+
- Nearly complete rewrite of the plugin codebase, with a focus on modularity, readability, and maintainability
159+
- Better separation of operations, vastly expanded testing, better documentation of plugin invariants and assumptions
160+
- Introduce pydantic models for various data structures, with validation and type checking to ensure data integrity and catch issues earlier
161+
- Better boundaries around UI updates, I/O operations and layer lifecycle management.
162+
- Introduced a minimal deprecation system
163+
- New debug contexts for monitoring performance and automated log generation
164+
165+
## Updated documentation
166+
167+
The newly updated documentation can be found [here](https://deeplabcut.github.io/DeepLabCut/docs/gui/napari_GUI.html).
168+
169+
## Future directions
170+
171+
The codebase remains in a transitory state, with many improvements but still several areas that could use more consolidated logic, centralization around validated data models, and better abstraction of I/O formats to account for future changes in DLC projects.
172+
173+
As always, we welcome contributions and suggestions for improvements, and will continue to work on improving the plugin in future releases!
174+
175+
Feel free to add to [#184](https://github.com/DeepLabCut/napari-deeplabcut/issues/184) if you have any refactor-specific thoughts or suggestions.
176+
177+
Expect a focus on fixes and improvements shortly after this major update, followed by more features and improvements, such a automated point tracking for faster and more robust labeling.

0 commit comments

Comments
 (0)