-
Notifications
You must be signed in to change notification settings - Fork 26
Update dlclive requirement & add deploy workflow #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 28 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
0b26c85
Pin deeplabcut-live to 1.1.0 in pyproject
C-Achard 05497e8
Add PyPI release workflow and rename CI file
C-Achard 1cc7801
CI: build, validate & release Python package
C-Achard ae9550c
Set version in pyproject.toml to 2.0.0rc0
C-Achard 21a7e28
Update project metadata in pyproject.toml
C-Achard 3ca5d4c
CI: note lockfile and install wheel with deps
C-Achard 002e06b
Add ASCII art API, CLI flag, and fixes
C-Achard 3611774
Use develop mode in tox testenv
C-Achard 502e16e
Add ascii_art tests and update coverage omit
C-Achard d79eec4
Revert "Use develop mode in tox testenv"
C-Achard de9de7f
Bump actions and harden CLI smoke test
C-Achard 7f5b75b
Move version to package and mark pyproject dynamic
C-Achard 6d21bd2
Handle ASCII art errors & use logging
C-Achard 756836b
Use fixtures to control SHOW_SPLASH in tests
C-Achard 6893b69
Vectorize mapping and add color cache for ASCII
C-Achard 6d7a3e6
Add setuptools dynamic version & refine tests
C-Achard 7230f69
Optimize color ASCII rendering and fix module name
C-Achard 58bb304
Refactor GenTL CTI discovery and loading
C-Achard d21cd3e
Address review comments
C-Achard 70284db
gentl: reset harvester and CTI failure tests
C-Achard 4c5f8e1
Bump GitHub Actions and refine help banner
C-Achard 0a72842
Show banner only for help in TTY
C-Achard cf51c1f
Move ascii_art tests to new file and require cv2
C-Achard 09a8364
Update python-package.yml
C-Achard a42d496
Apply suggestions from code review
C-Achard caef5a8
Refine pre-commit config: stages and ruff rules
C-Achard 892da6a
Run pre-commit on PR changed files only
C-Achard 5dd22ba
Merge pull request #53 from DeepLabCut/cy/lint-config
C-Achard 3dfb1de
Include 'master' branch in CI triggers
C-Achard e066d9b
Bump actions versions and refine CI triggers
C-Achard fa49240
Trigger CI
C-Achard 03dcb8e
Trigger CI 2: Electric Boogaloo
C-Achard 8ec0de1
Merge remote-tracking branch 'origin/cy/pre-release-fixes-2.0' into c…
C-Achard 2784bd5
Remove module-level debug logging overrides
C-Achard 9fd192e
Reduce log verbosity and remove auto-load message
C-Achard 0daebba
Infer model backend from selected model path
C-Achard cfd67c7
Add temporary Engine enum and use in dlc_processor
C-Achard b6fd336
Use Engine enum and improve model detection
C-Achard 58f6110
Use Engine enum and validate model path
C-Achard f495649
Update GUI tests and adjust tox config
C-Achard f2c5fb6
Remove GUI and multi-camera exports
C-Achard d8da888
Update tox.ini
C-Achard 94a4d04
Add Qt/OpenGL deps to CI and restrict Codecov
C-Achard eb255db
Refactor camera scan state and loaders
C-Achard 48b274c
CI, packaging: coverage PRs, export main, tox deps
C-Achard 31e09d8
Normalize model_type and fix model paths
C-Achard e517aed
Enhance ModelPathStore path normalization tests
C-Achard c7b11c9
Add concurrency to testing CI workflow
C-Achard 4865edb
Add Engine helpers for model path detection
C-Achard 1f73c89
Ignore stale scan worker signals
C-Achard 0b47bc4
Update testing-ci.yml
C-Achard 1cf1945
Update engine.py
C-Achard 6952b68
Update __init__.py
C-Achard 559c775
Import Engine from dlclivegui.temp in tests
C-Achard 025a18e
Pass file path for non-.pb model checks
C-Achard 735b9a0
Add ModelType Literal and apply to model_type
C-Achard af06d09
Move package version to pyproject.toml
C-Achard 873ad07
Add cti_files_source marker and fallback logic
C-Achard 2510076
Improve CTI discovery safety and diagnostics
C-Achard f8c0999
Centralize env/~ expansion and add dedupe key
C-Achard 0d0ed39
Fix genTL log message spacing and tidy test
C-Achard 1a795b9
Merge pull request #51 from DeepLabCut/cy/upgrade-gentl-discovery
C-Achard e94ffb9
Merge pull request #54 from DeepLabCut/cy/pre-release-cleanup
C-Achard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,61 @@ | ||
| name: pre-commit-format | ||
| name: pre-commit (PR only on changed files) | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| pre_commit_checks: | ||
| detect_changes: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| changed: ${{ steps.changed_files.outputs.changed }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - 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 }} | ||
|
|
||
| - uses: actions/setup-python@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.10' | ||
| python-version: "3.12" | ||
|
|
||
| - name: Install pre-commit | ||
| run: pip install pre-commit | ||
|
|
||
| - run: pip install pre-commit | ||
| - run: pre-commit run --all-files | ||
| - 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| name: Build, validate & Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: [ 'v*.*.*' ] | ||
| pull_request: | ||
| branches: [ main, public ] | ||
| 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 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +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 | ||
| - id: name-tests-test | ||
| args: [--pytest-test-first] | ||
| stages: [pre-commit] | ||
| - id: trailing-whitespace | ||
| - id: check-merge-conflict | ||
| 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: | ||
| # Run the formatter. | ||
| # -------------------------- | ||
| # LOCAL AUTOFIX (developers) | ||
| # -------------------------- | ||
| - id: ruff-check | ||
| name: ruff-check (fix) | ||
| args: [--fix, --unsafe-fixes] | ||
| stages: [pre-commit] | ||
|
|
||
| - id: ruff-format | ||
| # Run the linter. | ||
| name: ruff-format (write) | ||
| stages: [pre-commit] | ||
|
|
||
| # -------------------------- | ||
| # CI CHECK-ONLY (no writes) | ||
| # -------------------------- | ||
| - id: ruff-check | ||
| args: [--fix,--unsafe-fixes] | ||
| name: ruff-check (ci) | ||
| args: [--output-format=github] | ||
| stages: [manual] | ||
|
|
||
| - id: ruff-format | ||
| name: ruff-format (ci) | ||
| args: [--check, --diff] | ||
| stages: [manual] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,3 +24,4 @@ | |
| "CameraConfigDialog", | ||
| "main", | ||
| ] | ||
| __version__ = "2.0.0rc0" # PLACEHOLDER | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__version__is marked as# PLACEHOLDER. If release automation (orimportlib.metadata.version) is expected to reflect the published version, this placeholder should be replaced with the real versioning strategy (or removed in favor of a single authoritative source).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving open as reminder