Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
423 commits
Select commit Hold shift + click to select a range
5853088
Apply suggestions from code review
C-Achard Mar 26, 2026
be0f48b
Update cropping.py
C-Achard Mar 26, 2026
41e9951
Merge branch 'cy/refactor-cropping-widgets' of https://github.com/Dee…
C-Achard Mar 26, 2026
c062b8a
Fix DLC crop Y-extent handling and add tests
C-Achard Mar 27, 2026
c100f7f
Add overwrite checks for extracted-frame labels
C-Achard Mar 27, 2026
fba762e
Add test for frame extraction overwriting labels
C-Achard Mar 27, 2026
14d841f
Improve cropping tests: dims and Points
C-Achard Mar 27, 2026
3c373fb
Guard against non-dict video_sets and update imports
C-Achard Mar 27, 2026
9964e93
Centralize and install points keybindings
C-Achard Mar 26, 2026
8a884df
Refactor shortcuts: keybinds and shortcuts dialog
C-Achard Mar 26, 2026
b0d4889
Add shortcuts dialog with context-aware rows
C-Achard Mar 26, 2026
b32621b
Suppress generic row reason when redundant
C-Achard Mar 26, 2026
86db0a6
Refine shortcuts dialog layout and tooltip behavior
C-Achard Mar 26, 2026
de6ade0
Add structured shortcut specs and binding context
C-Achard Mar 26, 2026
f5d3e2b
Apply suggestions from code review
C-Achard Mar 26, 2026
eaada0c
Improve Shortcuts dialog lifecycle and safety
C-Achard Mar 26, 2026
291c123
Expand Shortcuts dialog unit tests
C-Achard Mar 26, 2026
4805dfd
Bind global-points keys from SHORTCUTS
C-Achard Mar 26, 2026
9a5e8b3
Add keybind tests and fix shortcuts dialog
C-Achard Mar 26, 2026
e992cc6
Update dialogs.py
C-Achard Mar 26, 2026
98800d2
Handle missing viewer in Shortcuts shortcut check
C-Achard Mar 27, 2026
02c413e
Rename test_paths.py to test_project_paths.py
C-Achard Mar 27, 2026
e1ffdcf
Add DLC project path resolution and relpath utils
C-Achard Mar 27, 2026
1be1522
Add tests for project path helpers
C-Achard Mar 27, 2026
c8fd6fc
Support save-time DLC project path overrides
C-Achard Mar 27, 2026
00ae617
Add test for config save path normalization
C-Achard Mar 27, 2026
89d0437
Associate project-less labeled folders with DLC project
C-Achard Mar 27, 2026
8962595
Test projectless folder save & path coercion
C-Achard Mar 27, 2026
128ffce
Refactor dialog imports to module namespace
C-Achard Mar 27, 2026
987e65b
Add projectless-folder candidate logic and tests
C-Achard Mar 27, 2026
8bde885
Add projectless folder association and path coercion
C-Achard Mar 27, 2026
8870df6
Clarify dataset naming and dialog messages
C-Achard Mar 27, 2026
63814fa
Use infer_dlc_project to resolve config path
C-Achard Mar 27, 2026
1d97f31
Add tests for infer_dlc_project_from_config
C-Achard Mar 27, 2026
24f5233
Reject non-simple relative dataset paths
C-Achard Mar 27, 2026
7925ce8
Handle tuple return from project config dialog
C-Achard Mar 27, 2026
81255b7
Use structured result for project config prompt
C-Achard Mar 27, 2026
43596b4
Test: Prompt result & superkeypoints tests
C-Achard Mar 27, 2026
73e37e2
Clear io when applying project paths override
C-Achard Mar 27, 2026
b008957
Handle Windows absolute paths on POSIX
C-Achard Mar 27, 2026
7160e50
Update src/napari_deeplabcut/_widgets.py
C-Achard Mar 27, 2026
2d9517e
Handle rejected dialog in project save prompt
C-Achard Mar 27, 2026
c55fb4d
Merge branch 'cy/save-headless-h5' of https://github.com/DeepLabCut/n…
C-Achard Mar 27, 2026
14afc23
Add TrailsController and folder-scoped persistence
C-Achard Mar 27, 2026
7a46d13
Refactor trails into TrailsController
C-Achard Mar 27, 2026
1de91f3
Refactor tests to use trails layer helper
C-Achard Mar 27, 2026
920e521
Block signals when unchecking trail checkbox
C-Achard Mar 27, 2026
fe9425c
Move provenance helpers to core/provenance
C-Achard Mar 27, 2026
3755c1e
Update src/napari_deeplabcut/ui/cropping.py
C-Achard Mar 27, 2026
b49c1f7
Update cropping.py
C-Achard Mar 27, 2026
f8328cd
Skip layer data calc when debug disabled
C-Achard Mar 30, 2026
6d9cd91
Refactor DLC crop autorefresh handling
C-Achard Mar 30, 2026
452a100
Avoid redundant legend updates when hidden
C-Achard Mar 30, 2026
1c497ad
Avoid redundant keypoint setter and visibility guard
C-Achard Mar 30, 2026
bc50f88
Move _is_effectively_visible to ColorSchemePanel
C-Achard Mar 30, 2026
19d354c
Use scandir + fnmatch to expand image paths
C-Achard Mar 30, 2026
a6b3db0
Centralize supported file extensions
C-Achard Mar 30, 2026
9e7ab11
Check widget hidden state and parent visibility
C-Achard Mar 30, 2026
2657802
Add force_show helper and use in tests
C-Achard Mar 30, 2026
e7c5282
Rename attach_source_and_io to layer_kwargs API
C-Achard Mar 30, 2026
ddce418
Fix copy-paste: Add Points paste compat and tests
C-Achard Mar 30, 2026
c0e733f
Switch tests to use viewer fixture
C-Achard Mar 30, 2026
ce8bb37
Refactor Points layer compat helpers and paste
C-Achard Mar 30, 2026
4e80fae
Wait for controls wiring in e2e tests
C-Achard Mar 30, 2026
293a4cb
Use existing KeypointControls in e2e tests
C-Achard Mar 30, 2026
d422931
Add keypoint controls fixtures for tests
C-Achard Mar 31, 2026
3267540
Use keypoint_controls fixture in tests
C-Achard Mar 31, 2026
e9dff74
Rename overwrite checkbox label
C-Achard Mar 31, 2026
c08e6c5
Style and layout updates for Tutorial dialog
C-Achard Mar 31, 2026
93cdfe3
Hide viewer crop from video panel info
C-Achard Mar 31, 2026
2591dbd
Rename optional-dependency 'testing' to 'dev'
C-Achard Mar 31, 2026
a923c0b
Rewrite README: update install, usage, workflows
C-Achard Mar 31, 2026
5c076a6
Merge pull request #177 from DeepLabCut/cy/refactor-cropping-widgets
C-Achard Apr 1, 2026
60a9e7d
Align old and new DataFrames before merge
C-Achard Apr 1, 2026
a77cabd
WIP Add layer status panel and point-size config sync
C-Achard Apr 1, 2026
a59466e
Make help buttons instance attributes
C-Achard Apr 1, 2026
4b8811d
Robust config path resolution and UI tweaks
C-Achard Apr 1, 2026
0f27dbb
Add tests for config path resolution
C-Achard Apr 1, 2026
62e1a08
Use pipe in tutorial count and update tests
C-Achard Apr 1, 2026
a5523b5
Clarify tooltips in layer stats panel
C-Achard Apr 1, 2026
32a299c
Improve point-size UI and progress tooltips
C-Achard Apr 1, 2026
e5a0c66
Validate and handle DLC Points layers
C-Achard Apr 1, 2026
7c47d86
Add LayerStatusPanel UI unit tests
C-Achard Apr 1, 2026
0d80773
Unify points size controls and tooltips
C-Achard Apr 1, 2026
93228e1
Refactor point-size UI and improve tooltips
C-Achard Apr 1, 2026
b65148a
Dim size slider when disabled
C-Achard Apr 1, 2026
cdf008f
Add tests for config_sync helpers
C-Achard Apr 1, 2026
e2aa768
Update src/napari_deeplabcut/ui/dialogs.py
C-Achard Apr 1, 2026
8a23fcd
Merge branch 'cy/refactor-ux-tweaks' of https://github.com/DeepLabCut…
C-Achard Apr 1, 2026
0a7da70
Sync point-size to config immediately
C-Achard Apr 1, 2026
a464328
Preview point size while dragging slider
C-Achard Apr 1, 2026
519ace6
Remove flaky count assertions in tutorial tests
C-Achard Apr 1, 2026
8336b61
Merge pull request #178 from DeepLabCut/cy/centralize-keybinds
C-Achard Apr 1, 2026
faf66be
Merge pull request #179 from DeepLabCut/cy/save-headless-h5
C-Achard Apr 1, 2026
1b6f23d
Merge pull request #180 from DeepLabCut/cy/refactor-2026-cleanup2
C-Achard Apr 1, 2026
e34e1c0
Use 'dev' extras in tox.ini
C-Achard Apr 1, 2026
ba291e1
Update README.md
C-Achard Apr 1, 2026
9b2e877
Fix README quote block
C-Achard Apr 1, 2026
a24e58f
Improve config discovery and scorer resolution
C-Achard Apr 2, 2026
b80a25f
Add save-flow tests and fix import
C-Achard Apr 2, 2026
72a3a31
Add tests for project config/scorer dialogs
C-Achard Apr 2, 2026
cf8e6dd
Handle non-mapping config when syncing point size
C-Achard Apr 2, 2026
ffbe7df
Emit point_size_changed on commit
C-Achard Apr 2, 2026
56947fc
Observe Points and sync trajectory plot
C-Achard Mar 19, 2026
53746d6
Add PointsInteractionObserver and traj UI tests
C-Achard Mar 19, 2026
616eb75
Apply napari theme to matplotlib canvas and toolbar
C-Achard Mar 19, 2026
1be979d
Improve trajectory plot widget sizing and layout
C-Achard Mar 19, 2026
864f698
Make trajectory plot robust to incomplete Points
C-Achard Apr 6, 2026
0829f64
Rename KeypointMatplotlibCanvas to TrajectoryMatplotlibCanvas
C-Achard Apr 7, 2026
ccbd912
Update test_points_layers.py
C-Achard Apr 7, 2026
1e4423f
Update _widgets.py
C-Achard Apr 7, 2026
0980fcd
Use qtbot.add_widget and wait in tests
C-Achard Apr 7, 2026
105839f
Update src/napari_deeplabcut/ui/plots/trajectory.py
C-Achard Apr 7, 2026
f3751e4
Improve widget teardown, event docs, and size
C-Achard Apr 7, 2026
55dad3b
Improve points-layer UI tweaks and update tests
C-Achard Apr 7, 2026
64e8865
Mark except blocks as no-cover in color patch
C-Achard Apr 7, 2026
c6d3729
Update test_widgets.py
C-Achard Apr 7, 2026
78e4f59
Make points/plot handling more robust
C-Achard Apr 7, 2026
68e9639
Add unit tests for cropping UI module
C-Achard Apr 7, 2026
2beef5a
Support individual-based coloring in trajectory plot
C-Achard Apr 7, 2026
9c6f62c
Support multi-animal color cycles in trajectory plot
C-Achard Apr 7, 2026
20d9aa2
Update tests for bodypart mode and line keys
C-Achard Apr 7, 2026
ce26ca2
Prefer active DLC Points layer for plotting
C-Achard Apr 7, 2026
c6d230b
Use preferred_paths in frame inference
C-Achard Apr 7, 2026
f5a830f
Enhance label progress reporting and UI
C-Achard Apr 7, 2026
2b8394f
Add info button and clarify progress wording
C-Achard Apr 7, 2026
a7616c9
Clarify install and config handling in README
C-Achard Apr 9, 2026
0f62f80
Update tests workflow badge in README
C-Achard Apr 9, 2026
a8043ec
Update _widgets dev notes
C-Achard Apr 10, 2026
d700140
Fix formatting and newline in layer_stats text
C-Achard Apr 10, 2026
a6436a3
Merge pull request #181 from DeepLabCut/cy/reafactor-2026-readme
C-Achard Apr 13, 2026
9ed73dd
Merge branch 'cy/refactor-ux-tweaks' into cy/feature-refactor-2026
C-Achard Apr 13, 2026
e437f51
Add debug recorder and environment utilities
C-Achard Apr 14, 2026
81ff6f5
Add build_debug_report helper
C-Achard Apr 14, 2026
493a480
Add DebugTextWindow UI for diagnostics
C-Achard Apr 14, 2026
77db302
Add debug window and move properties to top
C-Achard Apr 14, 2026
2f34a10
Specify napari-dlc in menus; fix debug window
C-Achard Apr 14, 2026
841852b
Add debug logging to KeypointControls
C-Achard Apr 14, 2026
537faec
Allow smaller log buffer and return POSIX paths
C-Achard Apr 14, 2026
8e50bfa
Add tests for debug window and debug utils
C-Achard Apr 14, 2026
6a9128f
Refactor UI actions and form helper methods
C-Achard Apr 14, 2026
0cb40c2
WIP Add LayerLifecycleManager and registry
C-Achard Apr 14, 2026
ad37c33
Replace layer info icon
C-Achard Apr 20, 2026
ec4b061
Add TODO to move models.py to core/
C-Achard Apr 20, 2026
6250e76
Prevent duplicate KeypointControls opening
C-Achard Apr 20, 2026
3cc3df7
Migrate KeypointControls to LayerLifecycleManager
C-Achard Apr 22, 2026
a972898
Switch tests to layer manager API
C-Achard Apr 22, 2026
3c50826
Add tests for layer lifecycle manager and registry
C-Achard Apr 22, 2026
48d7232
Refactor runtime registry and lifecycle manager
C-Achard Apr 22, 2026
90a58c7
Update and expand layer manager/registry tests
C-Achard Apr 22, 2026
c566a96
Deprecate legacy layer lifecycle methods
C-Achard Apr 22, 2026
fd2b0ce
Mark layer setup methods deprecated
C-Achard Apr 22, 2026
1d371b1
Fix deprecated() args calls
C-Achard Apr 22, 2026
c0db41c
Move layer lifecycle wiring into manager
C-Achard Apr 22, 2026
0cec61d
Use public keypoints API; add layer resolver tests
C-Achard Apr 22, 2026
bcf33c0
Update lifecycle manager API and tests
C-Achard Apr 22, 2026
6109409
Move image/project context to lifecycle manager
C-Achard Apr 22, 2026
7944c9f
Propagate DLC session metadata to layers
C-Achard Apr 22, 2026
bc07126
Merge config placeholder points; robust image lookup
C-Achard Apr 22, 2026
c77c73b
Add debug recorder and environment utilities
C-Achard Apr 14, 2026
1f20060
Add build_debug_report helper
C-Achard Apr 14, 2026
69b0879
Add DebugTextWindow UI for diagnostics
C-Achard Apr 14, 2026
980eda1
Add debug window and move properties to top
C-Achard Apr 14, 2026
ce00bc1
Specify napari-dlc in menus; fix debug window
C-Achard Apr 14, 2026
6e5587d
Add debug logging to KeypointControls
C-Achard Apr 14, 2026
c23381b
Allow smaller log buffer and return POSIX paths
C-Achard Apr 14, 2026
a886812
Add tests for debug window and debug utils
C-Achard Apr 14, 2026
a294164
Reject conflicting DLC sessions and notify UI
C-Achard Apr 22, 2026
5855377
Avoid redundant layer refreshes
C-Achard Apr 22, 2026
dc70770
Add scoped timing logs and improve debug output
C-Achard Apr 22, 2026
a67fb0e
Merge branch 'cy/refactor-fix-traj-plot-y-axis-rebased' into cy/layer…
C-Achard Apr 22, 2026
41372e7
Toggle log timing display in in-memory recorder
C-Achard Apr 22, 2026
a9c8138
Fix test timing and clean up debug log
C-Achard Apr 22, 2026
719ab62
Use manager flush instead of qtbot.wait in test
C-Achard Apr 22, 2026
e243200
Fix typos
C-Achard Apr 22, 2026
7f313dc
Add spawn utilities for layer lifecycle manager
C-Achard Apr 23, 2026
84a29c7
Add PointsLayerSetupRequest and re-export helpers
C-Achard Apr 23, 2026
4805a0c
Add ViewerSingletonWidget and widget factory
C-Achard Apr 23, 2026
ff99e9c
Refactor lifecycle: delegate points/image logic to manager
C-Achard Apr 23, 2026
f165ba3
Centralize header/multianimal logic
C-Achard Apr 23, 2026
a2c6682
Refactor lifecycle manager tests to use signals
C-Achard Apr 23, 2026
0ce1418
Remove deprecated code and simplify validation checks
C-Achard Apr 23, 2026
1be08a6
Add points save workflow and UI dialogs
C-Achard Apr 23, 2026
5bd2aff
Delegate points saving to save workflow
C-Achard Apr 23, 2026
f10d687
Patch overwrite confirmation import, clean tests
C-Achard Apr 23, 2026
d576e56
Show project path tooltip in layer status
C-Achard Apr 23, 2026
14ef24f
Clarify tooltip
C-Achard Apr 23, 2026
e7f5566
Block direct-video label saves; add fallbacks
C-Achard Apr 24, 2026
ab3f0fb
Update save.py
C-Achard Apr 24, 2026
1cd5658
Add qtbot fixture and clarify save log
C-Achard Apr 24, 2026
a156acd
Use dummy viewer in store fixture
C-Achard Apr 24, 2026
a6e79a0
Add tests for save workflow and singleton
C-Achard Apr 24, 2026
6e4a070
Don't skip header refresh for same layer
C-Achard Apr 27, 2026
a686875
Switch HDF5 dataset key to df_with_missing
C-Achard Apr 27, 2026
3eddde5
Use DLC_CANONICAL_H5_KEY for HDF reads
C-Achard Apr 27, 2026
d254849
Use 'df_with_missing' HDF key in tests
C-Achard Apr 27, 2026
a0006e0
Restore DataFrame to authoritative DLC header
C-Achard Apr 27, 2026
d53b0ea
Add e2e tests for SA save/merge behavior
C-Achard Apr 27, 2026
77499b6
Use DLC_CANONICAL_H5_KEY for HDF5 reads
C-Achard Apr 27, 2026
034a3cb
Respect multianimal config when writing DLC
C-Achard Apr 27, 2026
edb9621
Preserve column names when replacing scorer
C-Achard Apr 27, 2026
29c9973
Clear stale selection; only advance on change
C-Achard Apr 27, 2026
7b4d113
Sync dropdown visibility to active layer
C-Achard Apr 27, 2026
76a0593
Merge pull request #183 from DeepLabCut/cy/refactor-fix-traj-plot-y-a…
C-Achard Apr 27, 2026
7858b74
Change tox ini to dev extra reqs
C-Achard Apr 27, 2026
104e4ee
Handle empty DataFrame in guarantee_multiindex_rows
C-Achard Apr 27, 2026
ad46db0
Manage widget timers and replace singleShot
C-Achard Apr 27, 2026
facc73a
Manage widget timers and replace singleShot
C-Achard Apr 27, 2026
19e55d4
Update _widgets.py
C-Achard Apr 27, 2026
5ab3942
Improve logging, param name, and header
C-Achard Apr 28, 2026
05ac22d
Use history or home for save default; fix debug
C-Achard Apr 28, 2026
5e54773
Add tests for infer_dlc_project_from_labeled_folder
C-Achard Apr 28, 2026
519e545
Docstring and comments fixes
C-Achard Apr 28, 2026
68e0694
Fix debug record dropped entries
C-Achard Apr 28, 2026
9b54359
Fixed widget factory semantics (if not docked)
C-Achard Apr 28, 2026
e6ef08f
Merge branch 'cy/feature-refactor-2026' into cy/layer-lifecycle
C-Achard Apr 28, 2026
90ede34
DLCHeaderModel: fix silently swallowing malformed header:
deruyter92 Apr 29, 2026
0c9f478
Deprecate encode_categories and add relocation TODOs
C-Achard Apr 29, 2026
8c067a4
Add debug logs and clarify SA header handling
C-Achard Apr 29, 2026
8aa06cc
Preserve Points layer.metadata mapping
C-Achard Apr 29, 2026
ff647c4
Update debug.py
C-Achard Apr 29, 2026
2884999
Merge pull request #186 from DeepLabCut/cy/layer-lifecycle
C-Achard Apr 29, 2026
2b0b191
Deprecate unreachable SuperAnimal workflows
C-Achard Apr 29, 2026
d90329c
Add OwnedTimersMixin and use in singleton widget
C-Achard Apr 29, 2026
1c78902
Move local QTimer-based utilities from widget
C-Achard Apr 29, 2026
eccc3fb
DLCHeaderModel: replace n_levels with `is_single_animal` property
deruyter92 Apr 29, 2026
bd86ba5
Use OwnedTimersMixin for LayerLifecycle timers
C-Achard Apr 29, 2026
7b42f36
Annotate TODOs with progress/status updates
C-Achard Apr 29, 2026
f034770
core/io `write_hdf()`: fail if target_scored and header scorer are None
deruyter92 Apr 29, 2026
4297f30
Fix pytest QTimer fixtures
C-Achard Apr 29, 2026
617f576
core/io `_read_hdf_any_key()`: update error message
deruyter92 Apr 29, 2026
9c40213
Use owned single-shot timers and guard temp timers
C-Achard Apr 29, 2026
e6bf0e5
Create test_qt_timers.py
C-Achard Apr 29, 2026
5626791
Make OwnedTimersMixin timer handling robust
C-Achard Apr 29, 2026
45c2d71
Merge pull request #192 from DeepLabCut/cy/refactor-qtimer-handling
C-Achard Apr 29, 2026
d9b7d17
Refactor color-scheme tests to resolver API
C-Achard Apr 29, 2026
3274759
Merge branch 'cy/feature-refactor-2026' of https://github.com/DeepLab…
C-Achard Apr 29, 2026
e4700ce
Make header nlevel exception clearer
C-Achard Apr 30, 2026
0405b0a
Merge pull request #193 from DeepLabCut/jaap/minor_refactors
C-Achard Apr 30, 2026
91cc3e0
Improve IO: YAML errors, logging, and glob use
C-Achard Apr 30, 2026
b03aa88
Bump classifiers: Beta status and audience
C-Achard Apr 28, 2026
2106be7
Include asset PNGs in package data
C-Achard Apr 30, 2026
db60c64
Delete mkdocs.yml
C-Achard Apr 30, 2026
29d545c
Update CI workflow actions and deploy logic
C-Achard Apr 30, 2026
548bd18
CI version bump
C-Achard Apr 30, 2026
690c5f4
Update .github/workflows/test_and_deploy.yml
C-Achard Apr 30, 2026
1496b25
Update pyproject.toml
C-Achard Apr 30, 2026
bf96c4a
Add stages and split ruff hooks
C-Achard Apr 30, 2026
c7d430b
Merge pull request #191 from DeepLabCut/cy/v0.3.0.0-version-bump
C-Achard Apr 30, 2026
19f8b0a
Merge branch 'main' into cy/feature-refactor-2026
C-Achard Apr 30, 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
6 changes: 3 additions & 3 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout full history
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -40,13 +40,13 @@ jobs:

steps:
- name: Checkout PR branch
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"

Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ on:
push:
branches:
- main
- npe2
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- main
- npe2
workflow_dispatch:
inputs:
force_deploy:
Expand All @@ -33,10 +31,10 @@ jobs:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -69,7 +67,7 @@ jobs:
PLATFORM: ${{ matrix.platform }}

- name: Coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v6

deploy:
# this will run when you have tagged a commit, starting with "v*"
Expand All @@ -78,24 +76,28 @@ jobs:
needs: [test]
runs-on: ubuntu-latest
if: |
always() &&
inputs.force_deploy ||
(contains(github.ref, 'tags') && contains(needs.test.result, 'success'))
always() && (
(github.event_name == 'workflow_dispatch' && inputs.force_deploy) ||
(startsWith(github.ref, 'refs/tags/v') && needs.test.result == 'success')
)
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools setuptools_scm wheel twine build
- name: Build and publish
- name: Build package
run: python -m build .
- name: Check metadata
run: twine check --strict dist/*
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build .
twine upload dist/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ venv/

# written by setuptools_scm
**/_version.py

# Package managers
uv.lock
67 changes: 47 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,65 @@
default_stages: [pre-commit]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# These are safe to run in both local & CI (they don't require "fix vs check" split)
- id: check-added-large-files
stages: [pre-commit, manual]
args: ['--maxkb=1024']
- id: check-yaml
stages: [pre-commit, manual]
- id: check-toml
- id: end-of-file-fixer
stages: [pre-commit, manual]
- id: check-merge-conflict
stages: [pre-commit, manual]
- id: name-tests-test
args: ['--pytest-test-first']
stages: [pre-commit, manual]
args: ["--pytest-test-first"]

# These modify files. Run locally only (pre-commit stage).
- id: end-of-file-fixer
stages: [pre-commit]
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.4
hooks:
# Run the formatter.
- id: ruff-format
# Run the linter.
- id: ruff-check
args: [--fix,--unsafe-fixes]
stages: [pre-commit]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.16.2
rev: v2.21.1
hooks:
- id: pyproject-fmt
stages: [pre-commit] # modifies -> local only

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.25
hooks:
- id: validate-pyproject
- repo: https://github.com/tlambert03/napari-plugin-checks
rev: v0.3.0
stages: [pre-commit, manual]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
- id: napari-plugin-checks
# https://mypy.readthedocs.io/en/stable/introduction.html
# you may wish to add this as well!
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.910-1
# hooks:
# - id: mypy
# --------------------------
# LOCAL AUTOFIX (developers)
# --------------------------
- id: ruff-check
name: ruff-check (fix)
args: [--fix, --unsafe-fixes]
stages: [pre-commit]

- id: ruff-format
name: ruff-format (write)
stages: [pre-commit]

# --------------------------
# CI CHECK-ONLY (no writes)
# --------------------------
- id: ruff-check
name: ruff-check (ci)
args: [--output-format=github]
stages: [manual]

- id: ruff-format
name: ruff-format (ci)
args: [--check, --diff]
stages: [manual]
Loading
Loading