Skip to content

Commit 71ffdd5

Browse files
committed
add lockfile
1 parent b395f06 commit 71ffdd5

File tree

3 files changed

+410
-173
lines changed

3 files changed

+410
-173
lines changed

.github/workflows/test_and_deploy.yml

Lines changed: 67 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,52 +14,100 @@ on:
1414
- cron: "0 0 * * *" # run once a day
1515

1616
jobs:
17+
1718
test:
18-
name: Test
19-
uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v2
20-
with:
21-
os: ${{ matrix.os }}
22-
python-version: ${{ matrix.python-version }}
23-
qt: ${{ matrix.qt }}
24-
pip-install-pre-release: ${{ github.event_name == 'schedule' }}
25-
coverage-upload: artifact
19+
name: ${{ matrix.os }} (${{ matrix.python-version }}) ${{ matrix.add-group || '' }} ${{ matrix.resolution || ''}}
20+
runs-on: ${{ matrix.os }}
21+
env:
22+
UV_PRERELEASE: ${{ github.event_name == 'schedule' && 'allow' || 'if-necessary-or-explicit' }}
23+
UV_NO_SYNC: 1
2624
strategy:
2725
fail-fast: false
2826
matrix:
2927
python-version: ["3.10", "3.11"]
3028
os: [ubuntu-latest, macos-latest, windows-latest]
31-
qt: [pyqt6, pyside6]
29+
add-group: [pyqt6, pyside6]
3230
include:
31+
- os: windows-latest
32+
python-version: "3.13"
33+
resolution: "lowest-direct"
34+
add-group: pyside6
3335
- python-version: "3.9"
3436
os: ubuntu-latest
35-
qt: pyqt5
37+
add-group: pyqt5
3638
- python-version: "3.9"
3739
os: ubuntu-latest
38-
qt: pyside2
40+
add-group: pyside2
3941
- python-version: "3.9"
4042
os: macos-13
41-
qt: pyside2
43+
add-group: pyside2
4244
- python-version: "3.9"
4345
os: macos-13
44-
qt: pyqt5
46+
add-group: pyqt5
4547
- python-version: "3.9"
4648
os: windows-latest
47-
qt: pyqt5
49+
add-group: pyqt5
4850
- python-version: "3.10"
4951
os: ubuntu-latest
50-
qt: pyside2
52+
add-group: pyside2
5153
- python-version: "3.12"
5254
os: ubuntu-latest
53-
qt: pyqt6
55+
add-group: pyqt6
5456
- python-version: "3.12"
5557
os: ubuntu-latest
56-
qt: pyside6
58+
add-group: pyside6
5759
- python-version: "3.13"
5860
os: ubuntu-latest
59-
qt: pyside6
61+
add-group: pyside6
6062
- python-version: "3.13"
6163
os: windows-latest
62-
qt: pyqt6
64+
add-group: pyqt6
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: 🐍 Set up Python ${{ matrix.python-version }}
69+
uses: astral-sh/setup-uv@v6
70+
with:
71+
python-version: ${{ matrix.python-version }}
72+
enable-cache: true
73+
74+
- uses: pyvista/setup-headless-display-action@v4
75+
with:
76+
qt: true
77+
78+
- name: Install Dependencies
79+
run: uv sync --no-dev --group test --group ${{ matrix.add-group || 'test' }} --resolution ${{ matrix.resolution || 'highest'}}
80+
81+
- name: 🧪 Run Tests
82+
run: uv run coverage run -p -m pytest -v
83+
84+
# If something goes wrong with --pre tests, we can open an issue in the repo
85+
- name: 📝 Report --pre Failures
86+
if: failure() && github.event_name == 'schedule'
87+
uses: JasonEtco/create-an-issue@v2
88+
env:
89+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
PLATFORM: ${{ matrix.os }}
91+
PYTHON: ${{ matrix.python-version }}
92+
RUN_ID: ${{ github.run_id }}
93+
TITLE: "[test-bot] pip install --pre is failing"
94+
with:
95+
filename: .github/TEST_FAIL_TEMPLATE.md
96+
update_existing: true
97+
98+
- name: Upload coverage
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: covreport-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.add-group }}-${{ matrix.resolution }}
102+
path: ./.coverage*
103+
include-hidden-files: true
104+
105+
upload_coverage:
106+
if: always()
107+
needs: [test]
108+
uses: pyapp-kit/workflows/.github/workflows/upload-coverage.yml@v2
109+
secrets:
110+
codecov_token: ${{ secrets.CODECOV_TOKEN }}
63111

64112
test-min-reqs:
65113
name: Test min reqs

pyproject.toml

Lines changed: 43 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
requires = ["hatchling", "hatch-vcs"]
33
build-backend = "hatchling.build"
44

5+
[tool.hatch.version]
6+
source = "vcs"
7+
58
# https://peps.python.org/pep-0621/
69
[project]
710
name = "magicgui"
@@ -36,8 +39,8 @@ dynamic = ["version"]
3639
dependencies = [
3740
"docstring_parser>=0.7",
3841
"psygnal>=0.8.0",
39-
"qtpy>=1.7.0",
40-
"superqt[iconify]>=0.6.1",
42+
"qtpy>=2.4.0",
43+
"superqt[iconify]>=0.7.2",
4144
"typing_extensions>=4.6",
4245
]
4346

@@ -50,56 +53,61 @@ pyside2 = ["pyside2>=5.15"]
5053
pyside6 = ["pyside6>=6.4.0"]
5154
tqdm = ["tqdm>=4.30.0"]
5255
jupyter = ["ipywidgets>=8.0.0"]
53-
image = ["pillow>=4.0"]
56+
image = ["pillow>=10.4"]
5457
quantity = ["pint>=0.13.0"]
5558

5659
[dependency-groups]
60+
third-party-support = [
61+
"annotated-types>=0.7.0",
62+
"attrs>=25.3.0",
63+
"ipykernel>=6.29.5",
64+
"matplotlib>=3.9.4",
65+
"numpy>=1.26.4",
66+
"pandas>=2.2.3; python_version >= '3.11'",
67+
"pandas>=2.1",
68+
"pydantic>=1.10.18",
69+
"toolz>=1.0.0",
70+
]
5771
test = [
58-
"pytest",
59-
"pytest-qt",
60-
"pytest-cov",
61-
"pytest-mypy-plugins>=3",
62-
"numpy",
63-
"pandas",
64-
"tqdm>=4.30.0",
65-
"pillow>=4.0",
66-
"pint>=0.13.0",
67-
"matplotlib",
68-
"toolz",
69-
"ipywidgets",
70-
"ipykernel",
71-
"pydantic",
72-
"attrs",
73-
"annotated_types",
72+
"magicgui[tqdm,jupyter,image,quantity]",
73+
{ include-group = "third-party-support" },
74+
"pytest>=8.4.0",
75+
"pytest-cov >=6.1",
76+
"pytest-mypy-plugins>=3.1",
7477
]
78+
test-qt = [{ include-group = "test" }, "pytest-qt >=4.3.0"]
79+
pyqt5 = ["magicgui[pyqt5]", { include-group = "test-qt" }]
80+
pyqt6 = ["magicgui[pyqt6]", { include-group = "test-qt" }]
81+
pyside2 = ["magicgui[pyside2]", { include-group = "test-qt" }]
82+
pyside6 = ["magicgui[pyside6]", { include-group = "test-qt" }]
7583
dev = [
7684
{ include-group = "test" },
77-
"ruff",
78-
"ipython",
79-
"mypy",
80-
"pdbpp; sys_platform != 'win32'",
81-
"pre-commit-uv",
82-
"pyqt6",
83-
"rich",
85+
"ruff>=0.8.3",
86+
"ipython>=8.18.0",
87+
"mypy>=1.13.0",
88+
"pdbpp>=0.11.6; sys_platform != 'win32'",
89+
"pre-commit-uv>=4",
90+
"pyqt6>=6.8.0",
91+
"rich>=13.9.4",
8492
]
8593
docs = [
86-
"mkdocs",
94+
"mkdocs >=1.5.3",
8795
"mkdocs-material ~=9.5",
8896
"mkdocstrings ==0.26.1",
8997
"mkdocstrings-python ==1.11.1",
9098
"griffe ==1.2.0",
9199
"mkdocs-gen-files ==0.5.0",
92100
"mkdocs-literate-nav ==0.6.1",
93-
"mkdocs-spellcheck[all]",
101+
"mkdocs-spellcheck[all] >=1.1.1",
94102
"mkdocs-gallery ==0.10.3",
95103
"qtgallery ==0.0.2",
96104
# extras for all the widgets
97105
"napari ==0.5.3",
98-
"pyqt6",
99-
"pint",
100-
"matplotlib",
106+
"pyqt6 >=6.8.0",
107+
"pint >=0.13.0",
108+
"matplotlib >=3.9.4",
101109
"ipywidgets >=8.0.0",
102-
"ipykernel",
110+
"ipykernel>=6.29.5",
103111
]
104112

105113
[tool.uv.sources]
@@ -113,34 +121,6 @@ changelog = "https://github.com/pyapp-kit/magicgui/blob/main/CHANGELOG.md"
113121
issues = "https://github.com/pyapp-kit/magicgui/issues"
114122
documentation = "https://pyapp-kit.github.io/magicgui/"
115123

116-
[tool.hatch.version]
117-
source = "vcs"
118-
119-
[tool.hatch.envs.test]
120-
features = ["test"]
121-
[tool.hatch.envs.test.scripts]
122-
run = "pytest -v --color=yes --cov-config=pyproject.toml --cov --cov-report=xml --cov-report=term-missing"
123-
[[tool.hatch.envs.test.matrix]]
124-
backend = ["pyqt5", "pyside2", "pyqt6", "pyside6"]
125-
[tool.hatch.envs.test.overrides]
126-
# matrix.deps.features = [
127-
# { value = "min-req", if = ["min-req"] },
128-
# ]
129-
matrix.backend.features = [
130-
{ value = "pyqt5", if = [
131-
"pyqt5",
132-
] },
133-
{ value = "pyside2", if = [
134-
"pyside2",
135-
] },
136-
{ value = "pyqt6", if = [
137-
"pyqt6",
138-
] },
139-
{ value = "pyside6", if = [
140-
"pyside6",
141-
] },
142-
]
143-
144124

145125
# https://docs.astral.sh/ruff
146126
[tool.ruff]
@@ -193,6 +173,9 @@ filterwarnings = [
193173
"ignore::DeprecationWarning:tqdm",
194174
"ignore::DeprecationWarning:docstring_parser",
195175
"ignore:distutils Version classes are deprecated:DeprecationWarning",
176+
"ignore:Jupyter is migrating:DeprecationWarning",
177+
"ignore:The `ipykernel.comm.Comm` class has been deprecated",
178+
"ignore:.*read_binary is deprecated:"
196179
]
197180

198181
# https://mypy.readthedocs.io/en/stable/config_file.html

0 commit comments

Comments
 (0)