Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
252 commits
Select commit Hold shift + click to select a range
893b28a
Rearrange UI and improve camera controls
arturoptophys Oct 21, 2025
0b0ac33
modifyed gentl_backend
arturoptophys Oct 21, 2025
b13a417
Merge branch 'artur/test_update' into codex/update-gui-to-enhance-cam…
arturoptophys Oct 21, 2025
8110085
Improve camera control flow and recording alignment
arturoptophys Oct 21, 2025
8e728e7
Merge pull request #2 from arturoptophys/codex/update-gui-to-enhance-…
arturoptophys Oct 21, 2025
efda9d3
Improve camera stop flow and parameter propagation
arturoptophys Oct 21, 2025
13bff62
Merge branch 'codex/update-gui-to-enhance-camera-functionality-xq83kx…
arturoptophys Oct 21, 2025
f39c4c4
fixed video recordings (roughly)
arturoptophys Oct 22, 2025
7e7e3b6
updates
arturoptophys Oct 23, 2025
6402566
Added processors
arturoptophys Oct 23, 2025
c81e897
update processors
arturoptophys Oct 23, 2025
c7ee2f1
fixing sizes
arturoptophys Oct 23, 2025
7823829
modified the processor to be controllable
arturoptophys Oct 23, 2025
184e87b
Add GenTL device count retrieval, bounding box settings, and processo…
arturoptophys Oct 24, 2025
f1ab8b0
formatting and precommit workflow
arturoptophys Oct 24, 2025
39be1b2
documentations
arturoptophys Oct 24, 2025
ddcbc41
update dlc_processor, fix filtering
arturoptophys Oct 28, 2025
e2ff610
setting frame resolution
arturoptophys Oct 29, 2025
44de723
updated to look for model files
arturoptophys Nov 4, 2025
a5e70a6
dropped tensorflow support via GUI
arturoptophys Nov 5, 2025
229a839
more profiling of the processes
arturoptophys Nov 6, 2025
448bdc5
Add visualization settings and update camera backend for improved pos…
arturoptophys Nov 18, 2025
246452f
small bug fixes
arturoptophys Dec 5, 2025
103399c
black formatting
arturoptophys Dec 5, 2025
bcd89cc
some docs
arturoptophys Dec 5, 2025
7b70c24
updated docs
arturoptophys Dec 5, 2025
94ccc7b
Update dlclivegui/gui.py
MMathisLab Dec 5, 2025
c5659d7
Rename DLC Processor to DeepLabCut Processor
MMathisLab Dec 5, 2025
89cc84a
Moved path2models as well as optional device and further DLCProcessor…
arturoptophys Dec 9, 2025
edf6b80
remove path from docstring
arturoptophys Dec 9, 2025
37ca392
fix exposure settings in gentl backend
arturoptophys Dec 9, 2025
05ff126
Add logging for camera configuration and error handling in backends
arturoptophys Dec 18, 2025
5634059
Set default device to 'auto' in DLCProcessorSettings and include sing…
arturoptophys Dec 18, 2025
1b8622c
Add multi-camera controller for DLC Live GUI
arturoptophys Dec 22, 2025
5c7ee50
Refactor multi-camera handling to use camera IDs instead of indices; …
arturoptophys Dec 22, 2025
f332291
Enhance multi-camera support with tiled view rendering and display op…
arturoptophys Dec 22, 2025
009d0d5
Refactor multi-camera frame handling to improve performance; emit fra…
arturoptophys Dec 22, 2025
557403f
switched to pyside as gui backend
arturoptophys Dec 23, 2025
be91086
Add camera availability check and handle initialization failures in m…
arturoptophys Dec 23, 2025
6957468
Add camera preview functionality with start/stop toggle and real-time…
arturoptophys Dec 23, 2025
51fed8a
support multi-animal poses with distinct markers
arturoptophys Dec 23, 2025
b083a35
Update .gitignore
C-Achard Jan 23, 2026
88c883e
Update opencv_backend.py
C-Achard Jan 23, 2026
351e576
Switch to Ruff for linting and formatting
C-Achard Jan 28, 2026
1f139ab
Upgrade camera detection speed and UI
C-Achard Jan 28, 2026
988eb6d
Refactor camera loader initialization and cleanup comments
C-Achard Jan 28, 2026
4fe8abc
Enhance OpenCV camera backend for cross-platform support
C-Achard Jan 28, 2026
8d02ac6
Refactor camera loading and fix preview initialization logic
C-Achard Jan 28, 2026
6defc2e
fixed resizing of camera view, also prevent user from changing config…
arturoptophys Jan 26, 2026
ba1e3d8
fix timestamping with multiple cameras
arturoptophys Jan 28, 2026
38fbf4b
Add dark and system theme switching to GUI
C-Achard Jan 28, 2026
cc9a440
Add qdarkstyle and new optional dependencies
C-Achard Jan 28, 2026
c3624c3
Add inference camera selection to GUI
C-Achard Jan 28, 2026
4eaec2b
Improve camera stats display and FPS tracking
C-Achard Jan 28, 2026
7e1fe88
Refactor stats layout to use QGridLayout
C-Achard Jan 28, 2026
5fb96f2
Add splash screen and logo assets to GUI
C-Achard Jan 28, 2026
df8c9d8
Improve camera disconnect/error handling in multi-camera recording
C-Achard Jan 29, 2026
67a0b18
Add persistent model path and improve camera selection logic
C-Achard Jan 29, 2026
fcaba09
Improve camera config dialog and backend handling
C-Achard Jan 29, 2026
8bb68e0
Improve camera config dialog and OpenCV backend handling
C-Achard Jan 29, 2026
56fd47d
Refactor GUI structure and modularize utilities
C-Achard Jan 29, 2026
60cf5f5
Fix script entry point and clean up splash logic
C-Achard Jan 30, 2026
df3b52b
Refactor camera backend system and add Pydantic config models
C-Achard Jan 30, 2026
d3eec5b
Add unit and functional tests for cameras and DLC processor
C-Achard Jan 30, 2026
f6968fb
Add support for flexible camera settings and tests
C-Achard Jan 30, 2026
b0f82ea
Add tests for rotation, crop, and init failure in MultiCameraController
C-Achard Jan 30, 2026
7edc152
Skip task_done for sentinel; add GUI e2e tests
C-Achard Jan 30, 2026
f649d35
Use Pydantic models and lazy-load camera backends
C-Achard Jan 30, 2026
f6b529d
Switch to Pydantic config models
C-Achard Jan 30, 2026
25712f2
Handle dynamic crop conversion and UI form sync
C-Achard Jan 30, 2026
40bfd66
Refactor DLCLiveProcessor, add camera tests
C-Achard Jan 30, 2026
084bec4
Improve model path persistence and tiling geometry
C-Achard Feb 3, 2026
8a0e861
Clear and update camera list on scan
C-Achard Feb 3, 2026
0c07460
Enhance processor discovery and socket cleanup
C-Achard Feb 3, 2026
297dd90
Add processor discovery/socket tests; bump timeout
C-Achard Feb 3, 2026
756d381
Remove cameras/config_adapters.py
C-Achard Feb 3, 2026
f3dafcb
Add splash screen support and tests
C-Achard Feb 3, 2026
5ab1582
Update test_dlc_processor.py
C-Achard Feb 3, 2026
37c3e8f
Remove Qt AA_UseHighDpiPixmaps setting
C-Achard Feb 3, 2026
e5662bd
Disable splash on missing image and update tests
C-Achard Feb 3, 2026
0ce8ba8
[WIP] Recording file path UX overhaul
C-Achard Feb 4, 2026
aa841a1
Persist timestamp setting and refactor recording start
C-Achard Feb 4, 2026
655d264
Add GUI recording-path tests and test fixtures
C-Achard Feb 4, 2026
01a2a26
Remove fallback pixmap assertions in splash test
C-Achard Feb 4, 2026
5e90cb1
Add tests for recording manager and recorder
C-Achard Feb 4, 2026
d593971
Remove legacy setup.py
C-Achard Feb 4, 2026
f0005f1
Sunset old config.py
C-Achard Feb 4, 2026
c42cb73
Rename config_models to config and update types
C-Achard Feb 4, 2026
8bbe225
Add 'Open recording folder' action and button
C-Achard Feb 4, 2026
b72b052
Enable recording with overlays and add tests
C-Achard Feb 4, 2026
db3698c
Improve recording UI layout and remove bbox_color
C-Achard Feb 4, 2026
d050d98
Add CI, tox and coverage config
C-Achard Feb 4, 2026
c3d23e3
Add camera backend tests and fixtures
C-Achard Feb 4, 2026
10381ea
Add unit tests for utils/display and utils/stats
C-Achard Feb 4, 2026
35df954
Rename settings store and add session/timestamp prefs
C-Achard Feb 4, 2026
34f0f89
Centralize settings with QSettings store
C-Achard Feb 4, 2026
791b021
Clarify comment about QMessageBox crash wording
C-Achard Feb 5, 2026
d5b2577
Save original DLC poses to HDF5
C-Achard Feb 5, 2026
34ccfd2
Add click-to-copy recording path preview
C-Achard Feb 5, 2026
6ce8c07
Add ElidingPathLabel and integrate in UI
C-Achard Feb 5, 2026
b2705e7
Add logging and improved backend import diagnostics
C-Achard Feb 5, 2026
c43eefd
OpenCV backend refactor; Add OpenCV discovery and backend loader
C-Achard Feb 5, 2026
849f97b
Add OpenCV options model and factory integration
C-Achard Feb 5, 2026
755cf4b
Improve backend loading and OpenCV rebind
C-Achard Feb 6, 2026
15c7ea9
Add bbox color picker and BBoxColors enum
C-Achard Feb 6, 2026
6992b74
Camera: rich discovery and identity rebinding
C-Achard Feb 6, 2026
9af2e1f
Rename elidinglabel -> eliding_label; update imports/tests
C-Achard Feb 6, 2026
a953d84
Use importlib.resources for packaged assets
C-Achard Feb 9, 2026
82c08d7
Unnest discover_devices
C-Achard Feb 9, 2026
e9d1bc1
Require deeplabcut-live >=2.0.0
C-Achard Feb 9, 2026
28e4e9e
Compute end-to-end total_process_time
C-Achard Feb 9, 2026
47522a7
Add typing fixes, import cleanup, and staticmethod
C-Achard Feb 9, 2026
29d2012
Use defaults for non-positive camera values
C-Achard Feb 9, 2026
6c2a799
Queue frames with timestamps; record on write
C-Achard Feb 9, 2026
d2c588b
Update README, docs and mark GUI tests
C-Achard Feb 9, 2026
98bcac5
WIP Socket DLC processor: optional server & fixes
C-Achard Feb 9, 2026
93c7c2f
Track and join socket threads on shutdown
C-Achard Feb 9, 2026
2cf3e8e
Make processor plugins opt-in, secure defaults
C-Achard Feb 9, 2026
8787a53
Add resolution policy and UI backend capabilities
C-Achard Feb 9, 2026
3ea06cc
Aravis backend: resolution & settings namespace
C-Achard Feb 9, 2026
71ef8d5
Add width/height UI hooks and adjust OpenCV tests
C-Achard Feb 9, 2026
e421029
WIP Basler backend: resolution, FPS and capabilities
C-Achard Feb 9, 2026
a5ca077
WIP Add gentl options namespace and actuals tracking
C-Achard Feb 9, 2026
8e0df03
Initialize camera width and height to 0
C-Achard Feb 9, 2026
70a2016
Mark exposure and gain as unsupported
C-Achard Feb 9, 2026
19117e7
WIP Add camera probe, compact UI and scrolling
C-Achard Feb 9, 2026
f7931df
WIP Adjust two-field row layout and scroll margins
C-Achard Feb 9, 2026
b57f02b
Treat 0 as Auto for camera settings
C-Achard Feb 10, 2026
7f5de83
Add exposure/gain tracking and auto handling
C-Achard Feb 10, 2026
35cfe9d
Style two-field rows and value widgets
C-Achard Feb 10, 2026
1f5707e
Extract _make_two_field_row to layouts util
C-Achard Feb 10, 2026
faf0ba9
Replace QSpinBox with ScrubSpinBox
C-Achard Feb 10, 2026
6e8d653
Fix UI spacing and reset detected FPS label
C-Achard Feb 10, 2026
25fe779
Update CameraProbeWorker.run()
deruyter92 Feb 10, 2026
05c66cb
Revert "Update CameraProbeWorker.run()"
C-Achard Feb 10, 2026
3b9064f
Enhance Aravis backend device discovery & rebind
C-Achard Feb 11, 2026
ab3cfc6
Add fake camera SDKs and contract tests
C-Achard Feb 11, 2026
582afd4
Enhance fake GenTL/Aravis test fixtures
C-Achard Feb 11, 2026
43d2e76
Update main_window.py
C-Achard Feb 11, 2026
e1e5a03
GenTL backend: device_id, discovery, and rebind
C-Achard Feb 12, 2026
d60562a
Add fake GenTL fixtures and gentl backend tests
C-Achard Feb 12, 2026
8efc257
Basler backend: device discovery & fixes
C-Achard Feb 12, 2026
1ea3c3b
Refactor preview restart logic, add logging
C-Achard Feb 12, 2026
c17e1f2
Remove optional transforms from Basler backend
C-Achard Feb 12, 2026
af3564f
Refine crop validation and camera UI commit flow
C-Achard Feb 12, 2026
55e5c52
Show dirty state for Apply Settings button
C-Achard Feb 12, 2026
4f77655
Basler: better exposure/gain and stream reset
C-Achard Feb 12, 2026
ff797b2
Suppress selection side-effects and block signals
C-Achard Feb 12, 2026
4404f78
Robust GUI test teardown; block QMessageBox
C-Achard Feb 12, 2026
abed9d1
Cancel probe worker and copy QImage
C-Achard Feb 12, 2026
6db3f74
Improve preview handling and refactor tests
C-Achard Feb 12, 2026
be27cc4
Make camera dialog tests deterministic
C-Achard Feb 12, 2026
f94484f
Upgrade Aravis backend features and testing (#42)
C-Achard Feb 13, 2026
df89e7e
Improving testing coverage and pre-commit checks before release (#43)
C-Achard Feb 13, 2026
0701bae
update pyproject.toml: add pytest-timeout
deruyter92 Feb 13, 2026
48faa41
Refactor camera config dialog and reduce code duplication (#46)
C-Achard Feb 13, 2026
262d558
Wait for scan completion in max cameras test
C-Achard Feb 16, 2026
38005ab
Add color/colormap UI and refactor layouts
C-Achard Feb 16, 2026
4cac077
Refactor color combos & add sizing behavior
C-Achard Feb 16, 2026
12f3c4b
Handle SIGINT and use compact combo widgets
C-Achard Feb 16, 2026
81b0f4e
Log keyboard interrupt on quit
C-Achard Feb 16, 2026
e9b5d52
Make controls dockable and refine UI layout
C-Achard Feb 16, 2026
60da747
Make controls dock closable and transparent title
C-Achard Feb 16, 2026
c29e8ca
Disable dock close; add Show controls action
C-Achard Feb 16, 2026
e480b28
Merge pull request #47 from DeepLabCut/cy/ux-tweaks
C-Achard Feb 16, 2026
fe62907
Merge pull request #45 from DeepLabCut/cy/upgrade-basler-backend
C-Achard Feb 16, 2026
03af146
Merge branch 'cy/pre-release-fixes-2.0' into cy/upgrade-gentl-backend
C-Achard Feb 16, 2026
d53b97b
Run pyproject pre-commit hook
C-Achard Feb 16, 2026
0b2eeed
Run pyproject pre-commit hook
C-Achard Feb 16, 2026
cbfbcc7
Revert "Merge branch 'cy/pre-release-fixes-2.0' into cy/upgrade-gentl…
C-Achard Feb 16, 2026
6d8414e
Merge branch 'cy/pre-release-fixes-2.0' into cy/upgrade-gentl-backend
C-Achard Feb 16, 2026
5a78d68
Run ruff on all files
C-Achard Feb 16, 2026
48741fb
Merge pull request #44 from DeepLabCut/cy/upgrade-gentl-backend
C-Achard Feb 16, 2026
0b26c85
Pin deeplabcut-live to 1.1.0 in pyproject
C-Achard Feb 16, 2026
05497e8
Add PyPI release workflow and rename CI file
C-Achard Feb 16, 2026
1cc7801
CI: build, validate & release Python package
C-Achard Feb 16, 2026
ae9550c
Set version in pyproject.toml to 2.0.0rc0
C-Achard Feb 16, 2026
21a7e28
Update project metadata in pyproject.toml
C-Achard Feb 16, 2026
3ca5d4c
CI: note lockfile and install wheel with deps
C-Achard Feb 16, 2026
002e06b
Add ASCII art API, CLI flag, and fixes
C-Achard Feb 16, 2026
3611774
Use develop mode in tox testenv
C-Achard Feb 16, 2026
502e16e
Add ascii_art tests and update coverage omit
C-Achard Feb 16, 2026
d79eec4
Revert "Use develop mode in tox testenv"
C-Achard Feb 17, 2026
de9de7f
Bump actions and harden CLI smoke test
C-Achard Feb 17, 2026
7f5b75b
Move version to package and mark pyproject dynamic
C-Achard Feb 17, 2026
6d21bd2
Handle ASCII art errors & use logging
C-Achard Feb 17, 2026
756836b
Use fixtures to control SHOW_SPLASH in tests
C-Achard Feb 17, 2026
6893b69
Vectorize mapping and add color cache for ASCII
C-Achard Feb 17, 2026
37116b1
Reintroduce previous README
C-Achard Feb 17, 2026
df40496
Revise README: modern GUI, install, and usage
C-Achard Feb 17, 2026
6d7a3e6
Add setuptools dynamic version & refine tests
C-Achard Feb 17, 2026
7230f69
Optimize color ASCII rendering and fix module name
C-Achard Feb 17, 2026
58bb304
Refactor GenTL CTI discovery and loading
C-Achard Feb 17, 2026
19b286b
Update README.md
C-Achard Feb 17, 2026
d21cd3e
Address review comments
C-Achard Feb 19, 2026
70284db
gentl: reset harvester and CTI failure tests
C-Achard Feb 19, 2026
4c5f8e1
Bump GitHub Actions and refine help banner
C-Achard Feb 19, 2026
0a72842
Show banner only for help in TTY
C-Achard Feb 19, 2026
cf51c1f
Move ascii_art tests to new file and require cv2
C-Achard Feb 19, 2026
09a8364
Update python-package.yml
C-Achard Feb 19, 2026
0c86c7d
Improve README installation instructions
C-Achard Feb 19, 2026
a42d496
Apply suggestions from code review
C-Achard Feb 19, 2026
cc5c3a2
Merge pull request #50 from DeepLabCut/cy/pyside6-readme-update
C-Achard Feb 19, 2026
322db87
Refine pre-commit config: stages and ruff rules
C-Achard Feb 20, 2026
2cccafc
Run pre-commit on PR changed files only
C-Achard Feb 20, 2026
490cd28
Merge pull request #53 from DeepLabCut/cy/lint-config
C-Achard Feb 20, 2026
3823b53
Include 'master' branch in CI triggers
C-Achard Feb 22, 2026
caef5a8
Refine pre-commit config: stages and ruff rules
C-Achard Feb 20, 2026
892da6a
Run pre-commit on PR changed files only
C-Achard Feb 20, 2026
5dd22ba
Merge pull request #53 from DeepLabCut/cy/lint-config
C-Achard Feb 20, 2026
3dfb1de
Include 'master' branch in CI triggers
C-Achard Feb 22, 2026
e066d9b
Bump actions versions and refine CI triggers
C-Achard Feb 22, 2026
fa49240
Trigger CI
C-Achard Feb 22, 2026
2db33c3
Bump actions versions and refine CI triggers
C-Achard Feb 22, 2026
03dcb8e
Trigger CI 2: Electric Boogaloo
C-Achard Feb 22, 2026
8ec0de1
Merge remote-tracking branch 'origin/cy/pre-release-fixes-2.0' into c…
C-Achard Feb 23, 2026
2784bd5
Remove module-level debug logging overrides
C-Achard Feb 20, 2026
9fd192e
Reduce log verbosity and remove auto-load message
C-Achard Feb 20, 2026
0daebba
Infer model backend from selected model path
C-Achard Feb 20, 2026
cfd67c7
Add temporary Engine enum and use in dlc_processor
C-Achard Feb 20, 2026
b6fd336
Use Engine enum and improve model detection
C-Achard Feb 20, 2026
58f6110
Use Engine enum and validate model path
C-Achard Feb 23, 2026
f495649
Update GUI tests and adjust tox config
C-Achard Feb 23, 2026
f2c5fb6
Remove GUI and multi-camera exports
C-Achard Feb 23, 2026
d8da888
Update tox.ini
C-Achard Feb 23, 2026
94a4d04
Add Qt/OpenGL deps to CI and restrict Codecov
C-Achard Feb 23, 2026
eb255db
Refactor camera scan state and loaders
C-Achard Feb 23, 2026
48b274c
CI, packaging: coverage PRs, export main, tox deps
C-Achard Feb 23, 2026
31e09d8
Normalize model_type and fix model paths
C-Achard Feb 23, 2026
e517aed
Enhance ModelPathStore path normalization tests
C-Achard Feb 23, 2026
c7b11c9
Add concurrency to testing CI workflow
C-Achard Feb 23, 2026
4865edb
Add Engine helpers for model path detection
C-Achard Feb 23, 2026
1f73c89
Ignore stale scan worker signals
C-Achard Feb 23, 2026
0b47bc4
Update testing-ci.yml
C-Achard Feb 23, 2026
1cf1945
Update engine.py
C-Achard Feb 23, 2026
6952b68
Update __init__.py
C-Achard Feb 23, 2026
559c775
Import Engine from dlclivegui.temp in tests
C-Achard Feb 23, 2026
025a18e
Pass file path for non-.pb model checks
C-Achard Feb 24, 2026
735b9a0
Add ModelType Literal and apply to model_type
C-Achard Feb 24, 2026
af06d09
Move package version to pyproject.toml
C-Achard Feb 24, 2026
873ad07
Add cti_files_source marker and fallback logic
C-Achard Feb 25, 2026
2510076
Improve CTI discovery safety and diagnostics
C-Achard Feb 25, 2026
f8c0999
Centralize env/~ expansion and add dedupe key
C-Achard Feb 25, 2026
0d0ed39
Fix genTL log message spacing and tidy test
C-Achard Feb 25, 2026
1a795b9
Merge pull request #51 from DeepLabCut/cy/upgrade-gentl-discovery
C-Achard Feb 25, 2026
e94ffb9
Merge pull request #54 from DeepLabCut/cy/pre-release-cleanup
C-Achard Feb 25, 2026
b6f3345
Merge pull request #48 from DeepLabCut/cy/update-install
C-Achard Feb 25, 2026
082b5d6
Use CODECOV_TOKEN and make upload non-fatal
C-Achard Feb 25, 2026
2a86606
Run PR workflow for master branch
C-Achard Feb 25, 2026
fd605f8
Install Qt/OpenGL runtime deps in CI
C-Achard Feb 25, 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: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# .coveragerc
[run]
branch = True
source = dlclivegui
# omit =
61 changes: 61 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: pre-commit (PR only on changed files)

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
detect_changes:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.changed_files.outputs.changed }}

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

- name: Detect changed files
id: changed_files
run: |
git fetch origin ${{ github.base_ref }}
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)

{
echo "changed<<EOF"
echo "$CHANGED_FILES"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- name: Show changed files
run: |
echo "Changed files:"
echo "${{ steps.changed_files.outputs.changed }}"

precommit:
needs: detect_changes
runs-on: ubuntu-latest
if: ${{ needs.detect_changes.outputs.changed != '' }}

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

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

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit (CI check-only stage) on changed files
env:
CHANGED_FILES: ${{ needs.detect_changes.outputs.changed }}
run: |
mapfile -t files <<< "$CHANGED_FILES"
pre-commit run --hook-stage manual --files "${files[@]}" --show-diff-on-failure
112 changes: 112 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Build, validate & Release

on:
push:
tags: [ 'v*.*.*' ]
pull_request:
branches: [ main, master ]
types: [ labeled, opened, edited, synchronize, reopened ]

jobs:
test:
name: Test / smoke (matrix)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install Qt/OpenGL runtime deps (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install -y \
libegl1 \
libgl1 \
libopengl0 \
libxkbcommon-x11-0 \
libxcb-cursor0

- name: Install tools
run: |
python -m pip install --upgrade pip
python -m pip install build twine wheel "packaging>=24.2"

- name: Build distributions (sdist + wheel)
run: python -m build

- name: Inspect dist
run: |
ls -lah dist/
echo "sdist contents (first ~200 entries):"
tar -tf dist/*.tar.gz | sed -n '1,200p'

- name: Twine metadata & README check
run: python -m twine check dist/*

- name: Install from wheel & smoke test
run: |
python -m pip install dist/*.whl
python - <<'PY'
import importlib
pkg_name = "dlclivegui"
m = importlib.import_module(pkg_name)
print("Imported:", m.__name__, "version:", getattr(m, "__version__", "n/a"))
PY

if ! command -v dlclivegui >/dev/null 2>&1; then
echo "CLI entry point 'dlclivegui' not found in PATH; skipping CLI smoke test."
else
if command -v dlclivegui >/dev/null 2>&1; then
echo "Running 'dlclivegui --help' smoke test..."
if ! dlclivegui --help >/dev/null 2>&1; then
echo "::error::'dlclivegui --help' failed; this indicates a problem with the installed CLI package."
exit 1
fi

build:
name: Build release artifacts (single)
runs-on: ubuntu-latest
needs: test
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Build distributions (sdist + wheel)
run: |
python -m pip install --upgrade pip
python -m pip install build twine wheel "packaging>=24.2"
python -m build
python -m twine check dist/*

- name: Upload dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*
if-no-files-found: error

publish:
name: Publish to PyPI (OIDC)
runs-on: ubuntu-latest
needs: build
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment: pypi
permissions:
id-token: write
steps:
- name: Download dist artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
77 changes: 77 additions & 0 deletions .github/workflows/testing-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI

on:
pull_request:
types: [opened, synchronize, reopened]

concurrency:
group: ci-${{ github.workflow }}-pr-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
unit:
name: Unit + Smoke (no hardware) • ${{ matrix.os }} • py${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.10', '3.11', '3.12']

steps:
- name: Checkout
uses: actions/checkout@v6

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

- name: Cache tox environments
uses: actions/cache@v4
with:
path: .tox
key: tox-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('pyproject.toml', 'tox.ini') }}
restore-keys: |
tox-${{ runner.os }}-py${{ matrix.python }}-


- name: Install tox
run: |
python -m pip install -U pip wheel
python -m pip install -U tox tox-gh-actions

- name: Install Qt/OpenGL runtime deps (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y \
libegl1 \
libgl1 \
libopengl0 \
libxkbcommon-x11-0 \
libxcb-cursor0

- name: Run tests (exclude hardware) with coverage via tox
run: |
tox -q

- name: Append Coverage Summary to Job
if: always()
shell: bash
run: |
python -m pip install -U coverage
echo "## Coverage Summary" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo '```text' >> "$GITHUB_STEP_SUMMARY"
python -m coverage report -m >> "$GITHUB_STEP_SUMMARY" || true
echo '```' >> "$GITHUB_STEP_SUMMARY"

- name: Upload coverage to Codecov # NOTE : may need to disable this if token is not setup
if: github.event_name == 'pull_request' && (github.base_ref == 'main' || github.base_ref == 'master')
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: false
11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#####################
### DLC Live Specific
#####################

*config*
**test*

###################
### python standard
###################
Expand Down Expand Up @@ -116,3 +109,7 @@ venv.bak/

# ide files
.vscode

!dlclivegui/config.py
# uv package files
uv.lock
61 changes: 61 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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]
- id: check-yaml
stages: [pre-commit, manual]
- id: check-toml
stages: [pre-commit, manual]
- id: check-merge-conflict
stages: [pre-commit, manual]

# These modify files. Run locally only (pre-commit stage).
- id: end-of-file-fixer
stages: [pre-commit]
- id: trailing-whitespace
stages: [pre-commit]

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

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

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
hooks:
# --------------------------
# 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