Skip to content

Commit 48b274c

Browse files
committed
CI, packaging: coverage PRs, export main, tox deps
Allow Codecov uploads for pushes and pull requests targeting main by loosening the workflow condition. Export the package's main entry (from .main import main) in dlclivegui.__init__ so the CLI/function is exposed. Add tox and tox-gh-actions to the test extras in pyproject.toml. Tidy tox.ini by adding a comment that linting is handled by pre-commit/format workflow and removing an optional tox-gh-actions helper section.
1 parent eb255db commit 48b274c

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/testing-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
echo '```' >> "$GITHUB_STEP_SUMMARY"
6666
6767
- name: Upload coverage to Codecov
68-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
68+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.base_ref == 'main')
6969
uses: codecov/codecov-action@v5
7070
with:
7171
files: ./coverage.xml

dlclivegui/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
MultiCameraSettings,
88
RecordingSettings,
99
)
10+
from .main import main
1011

1112
__all__ = [
1213
"ApplicationSettings",

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ test = [
6060
"pytest-cov>=4",
6161
"pytest-mock>=3.10",
6262
"pytest-qt>=4.2",
63+
"tox",
64+
"tox-gh-actions",
6365
]
6466
tf = [
6567
"deeplabcut-live[tf]==1.1",

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ passenv =
3232
WAYLAND_DISPLAY
3333
XDG_RUNTIME_DIR
3434

35+
; Linting already covered by pre-commit hooks and format.yml workflow
3536
; [testenv:lint]
3637
; description = Ruff linting/format checks (matches pyproject.toml config)
3738
; skip_install = true
@@ -41,8 +42,6 @@ passenv =
4142
; ruff check .
4243
; ruff format --check .
4344

44-
# Optional helper if you use tox-gh-actions to map GitHub's python-version to tox envs.
45-
# Requires: pip install tox-gh-actions
4645
[gh-actions]
4746
python =
4847
3.10: py310

0 commit comments

Comments
 (0)