Skip to content

Commit 4c7a7a8

Browse files
authored
Merge branch 'main' into bump_asv
2 parents b5fd65e + 09f0e89 commit 4c7a7a8

File tree

456 files changed

+16580
-12230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

456 files changed

+16580
-12230
lines changed

.circleci/config.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ jobs:
3232
name: Install napari-dev
3333
command: |
3434
. venv/bin/activate
35-
python -m pip install -e "napari/[pyside,dev]"
35+
python -m pip install -e "napari/[pyqt5,docs]"
36+
3637
environment:
3738
PIP_CONSTRAINT: napari/resources/constraints/constraints_py3.10_docs.txt
3839
- run:
3940
name: Build docs
4041
command: |
4142
. venv/bin/activate
4243
cd docs
43-
xvfb-run --auto-servernum make docs
44+
xvfb-run --auto-servernum make html
4445
environment:
4546
PIP_CONSTRAINT: ../napari/resources/constraints/constraints_py3.10_docs.txt
4647
- store_artifacts:

.github/CODEOWNERS

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33

44
# submodules
55
napari/_vispy/ @brisvag @melonora
6-
napari/_qt/ @Czaki @lucyleeow @DragaDoncila @psobolewskiPhD
6+
napari/_qt/ @Czaki @DragaDoncila @psobolewskiPhD
77
napari/_app_model/ @lucyleeow @DragaDoncila
88
napari/benchmarks/ @Czaki @jni
99
napari/plugins/ @Czaki @DragaDoncila @lucyleeow
1010
napari/qt/ @Czaki @jni
1111
napari/settings/ @Czaki @jni
1212

1313
# specific layers
14-
napari/layers/image/ @Czaki @brisvag @andy-sweet @kephale
14+
napari/layers/image/ @Czaki @brisvag @kephale
1515
napari/layers/labels/ @jni @Czaki @brisvag
16-
napari/layers/points/ @brisvag @kevinyamauchi @andy-sweet @DragaDoncila @kephale
16+
napari/layers/points/ @brisvag @kevinyamauchi @DragaDoncila @kephale
1717
napari/layers/shapes/ @kevinyamauchi @DragaDoncila @melonora
1818
napari/layers/surface/ @brisvag @kevinyamauchi @Czaki
19-
napari/layers/tracks/ @jni @andy-sweet
20-
napari/layers/vectors/ @brisvag @kevinyamauchi @andy-sweet
19+
napari/layers/tracks/ @jni
20+
napari/layers/vectors/ @brisvag @kevinyamauchi
2121

2222
# docs
2323
examples/ @melissawm @psobolewskiPhD @lucyleeow

.github/CONTRIBUTING.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contributing to GitHub workflows and actions
2+
3+
*Created: 2024-11-11; Updated:*
4+
5+
See the napari website for more detailed contributor information:
6+
- [deployment](https://napari.org/stable/developers/contributing/documentation/docs_deployment.html)
7+
- [contributing guide](https://napari.org/stable/developers/contributing/index.html)
8+
- [core developer guide](https://napari.org/stable/developers/coredev/core_dev_guide.html)
9+
10+
## Workflows and actions
11+
12+
There are over 20 GitHub workflows found in `.github/workflows`.
13+
The team creates a workflow to automate manual actions and steps.
14+
This results in improved accuracy and quality. Some key workflows:
15+
- `actionlint.yml` does static testing of GitHub action workflows
16+
- benchmarks
17+
- `reusable_run_tox_test.yml` uses our constraint files to install the
18+
compatible dependencies for each test environment which may differ
19+
by OS and qt versions. It is called from `test_pull_request.yml` and `test_comprehensive.yml`, not directly.
20+
- `upgrade_test_constraints.yml` automates upgrading dependencies for
21+
our test environments. It also has extensive commenting on what the
22+
upgrade process entails.
23+
24+
If adding a workflow, please take a moment to explain its purpose at the
25+
top of its file.
26+
27+
## Templates
28+
29+
Used to provide a consistent user experience when submitting an issue or PR.
30+
napari uses the following:
31+
- `PULL_REQUEST_TEMPLATE.md`
32+
- `ISSUE_TEMPLATE` directory containing:
33+
- `config.yml` to add the menu selector when "New Issue" button is pressed
34+
- `design_related.md`
35+
- `documentation.md`
36+
- `feature_request.md`
37+
- `bug_report.yml` config file to provide text areas for users to complete for bug reports.
38+
- `FUNDING.yml`: redirect GitHub to napari NumFOCUS account
39+
- Testing and bots
40+
- `missing_translations.md`: used if an action detects a missing language translation
41+
- `dependabot.yml`: opens a PR to notify maintainers of updates to dependencies
42+
- `labeler.yml` is a labels config file for labeler action
43+
- `BOT_REPO_UPDATE_FAIL_TEMPLATE.md` is an bot failure notification template
44+
- `TEST_FAIL_TEMPLATE.md` is a test failure notification template
45+
46+
## CODEOWNERS
47+
48+
This `CODEOWNERS` file identifies which individuals are notified if a
49+
particular file or directory is found in a PR. Core team members can
50+
update if desired.

.github/PULL_REQUEST_TEMPLATE.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ a screenshot or a screen capture: "An image is worth a thousand words!" -->
1616
- I have added tests that prove my fix is effective or that my feature works
1717
- If I included new strings, I have used `trans._("some string")` to make them localizable.
1818
(For more information see our [translations guide](https://napari.org/stable/developers/contributing/translations.html)).
19+
- If an API has been modified, I have added a `.. versionadded::` or `.. versionchanged::`
20+
directive to the appropriate docstring (For more information see
21+
[the Sphinx documentation](https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#describing-changes-between-versions)).
1922
-->

.github/labeler.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# See: .github/workflows/labeler.yml and https://github.com/marketplace/actions/labeler
1+
# This config file maps code base files to GitHub labels.
2+
# We use `.github/workflow/labeler.yml` action and use this file to apply labels to PRs.
3+
# Repo: https://github.com/actions/labeler
4+
# Marketplace Action docs: https://github.com/marketplace/actions/labeler
25
design:
36
- changed-files:
47
- any-glob-to-any-file: 'napari/_qt/qt_resources/**/*'

.github/workflows/actionlint.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Actionlint
2+
# https://github.com/rhysd/actionlint
23

34
on:
45
pull_request:

.github/workflows/benchmarks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
- uses: actions/setup-python@v5
6767
name: Install Python
6868
with:
69-
python-version: "3.11"
69+
python-version: "3.12"
7070
cache-dependency-path: pyproject.toml
7171

7272
- uses: tlambert03/setup-qt-libs@v1

.github/workflows/build_docs.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# As much as possible, this file should be kept in sync with
2-
# https://github.com/napari/docs/blob/main/.github/workflows/build_docs.yml
2+
# https://github.com/napari/docs/blob/main/.github/workflows/build_and_deploy_docs.yml
33
name: Build PR Docs
44

55
on:
@@ -38,15 +38,13 @@ jobs:
3838
python-version: "3.10"
3939
cache-dependency-path: |
4040
napari/pyproject.toml
41-
docs/requirements.txt
4241
4342
- uses: tlambert03/setup-qt-libs@v1
4443

4544
- name: Install Dependencies
4645
run: |
4746
python -m pip install --upgrade pip
48-
python -m pip install "napari/[all]"
49-
python -m pip install -r docs/requirements.txt
47+
python -m pip install "napari/[pyqt5, docs]"
5048
env:
5149
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
5250

@@ -62,7 +60,7 @@ jobs:
6260
GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }}
6361
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
6462
with:
65-
run: make -C docs docs
63+
run: make -C docs html
6664
# skipping setup stops the action from running the default (tiling) window manager
6765
# the window manager is not necessary for docs builds at this time and it was causing
6866
# problems with screenshots (https://github.com/napari/docs/issues/285)
@@ -73,4 +71,4 @@ jobs:
7371
uses: actions/upload-artifact@v4
7472
with:
7573
name: docs
76-
path: docs/docs/_build
74+
path: docs/docs/_build/html

.github/workflows/citation_cff_validate.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
uses: actions/checkout@v4
2121

2222
- name: Validate CITATION.cff
23-
uses: dieghernan/cff-validator@v3
23+
uses: dieghernan/cff-validator@v4

.github/workflows/edit_pr_description.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Set up Python
2626
uses: actions/setup-python@v5
2727
with:
28-
python-version: "3.11"
28+
python-version: "3.12"
2929
- name: Install dependencies
3030
run: |
3131
python -m pip install --upgrade pip

.github/workflows/make_release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install Python
3030
uses: actions/setup-python@v5
3131
with:
32-
python-version: 3.11
32+
python-version: 3.12
3333
cache-dependency-path: pyproject.toml
3434
- name: Install Dependencies
3535
run: |

.github/workflows/reusable_build_wheel.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
with:
1212
fetch-depth: 0
1313

14-
- name: Set up Python 3.11
14+
- name: Set up Python 3.12
1515
uses: actions/setup-python@v5
1616
with:
17-
python-version: 3.11
17+
python-version: 3.12
1818
cache: "pip"
1919
cache-dependency-path: pyproject.toml
2020

.github/workflows/reusable_coverage_upload.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
name: Upload coverage
22
on:
3-
workflow_call:
4-
secrets:
5-
codecov_token:
6-
required: true
7-
3+
workflow_call
84

95
jobs:
106
upload_coverage:
7+
permissions:
8+
id-token: write # Required for OIDC authentication
9+
contents: read # Required for code checkout
1110
name: Upload coverage
1211
runs-on: ubuntu-latest
1312
steps:
@@ -40,8 +39,7 @@ jobs:
4039
python -Im coverage report --format=markdown --skip-empty --skip-covered >> "$GITHUB_STEP_SUMMARY"
4140
4241
- name: Upload coverage data
43-
uses: codecov/codecov-action@v4
42+
uses: codecov/codecov-action@v5
4443
with:
4544
fail_ci_if_error: true
46-
token: ${{ secrets.codecov_token }}
47-
version: v0.6.0
45+
use_oidc: true

.github/workflows/reusable_pip_test.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ on:
55

66
jobs:
77
test_pip_install:
8-
name: ubuntu-latest 3.9 pip install
8+
name: ubuntu-latest 3.12 pip install
99
runs-on: ubuntu-latest
1010
timeout-minutes: 30
1111
steps:
1212
- uses: actions/checkout@v4
1313
with:
1414
path: napari-from-github
1515

16-
- name: Set up Python 3.9
16+
- name: Set up Python 3.12
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: 3.9
19+
python-version: 3.12
2020
cache: "pip"
2121
cache-dependency-path: napari-from-github/pyproject.toml
2222

@@ -40,7 +40,7 @@ jobs:
4040
shell:
4141
bash
4242
env:
43-
PIP_CONSTRAINT: napari-from-github/resources/constraints/constraints_py3.9.txt
43+
PIP_CONSTRAINT: napari-from-github/resources/constraints/constraints_py3.12.txt
4444

4545
- name: uninstall numba
4646
run: |
@@ -50,8 +50,8 @@ jobs:
5050
uses: aganders3/headless-gui@v2
5151
with:
5252
run: |
53-
python -m pytest --pyargs napari --color=yes --basetemp=.pytest_tmp
54-
python -m pytest --pyargs napari_builtins --color=yes --basetemp=.pytest_tmp
53+
python -m pytest --pyargs napari --color=yes --basetemp=.pytest_tmp --config-file=napari-from-github/pyproject.toml
54+
python -m pytest --pyargs napari_builtins --color=yes --basetemp=.pytest_tmp --config-file=napari-from-github/pyproject.toml
5555
5656
- name: Upload test artifacts
5757
if: failure()

.github/workflows/reusable_run_tox_test.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
PYVISTA_OFF_SCREEN: True
5050
MIN_REQ: ${{ inputs.min_req }}
5151
FORCE_COLOR: 1
52-
PIP_CONSTRAINT: ${{ github.workspace }}/resources/constraints/constraints_py${{ inputs.python_version }}${{ ((startsWith(inputs.platform, 'windows') && '_windows') || '') }}${{ inputs.min_req && '_min_req' }}${{ inputs.constraints_suffix }}.txt
53-
UV_CONSTRAINT: ${{ github.workspace }}/resources/constraints/constraints_py${{ inputs.python_version }}${{ ((startsWith(inputs.platform, 'windows') && '_windows') || '') }}${{ inputs.min_req && '_min_req' }}${{ inputs.constraints_suffix }}.txt
52+
PIP_CONSTRAINT: ${{ github.workspace }}/resources/constraints/constraints_py${{ inputs.python_version }}${{ inputs.min_req && '_min_req' }}${{ inputs.constraints_suffix }}.txt
53+
UV_CONSTRAINT: ${{ github.workspace }}/resources/constraints/constraints_py${{ inputs.python_version }}${{ inputs.min_req && '_min_req' }}${{ inputs.constraints_suffix }}.txt
5454
# Above we calculate path to constraints file based on python version and platform
5555
# Because there is no single PyQt5-Qt5 package version available for all platforms we was forced to use
5656
# different constraints files for Windows. An example with macOS arm64:
@@ -85,6 +85,11 @@ jobs:
8585
uses: ts-graphviz/setup-graphviz@v2
8686
continue-on-error: true
8787

88+
- name: Set Windows resolution
89+
if: runner.os == 'Windows'
90+
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
91+
shell: powershell
92+
8893
# strategy borrowed from vispy for installing opengl libs on windows
8994
- name: Install Windows OpenGL
9095
if: runner.os == 'Windows'
@@ -111,8 +116,8 @@ jobs:
111116
- name: create _version.py file
112117
# workaround for not using src layout
113118
run: |
114-
echo "__version__ = version = '0.5.0a2.dev364'" > napari/_version.py
115-
echo "__version_tuple__ = version_tuple = (0, 5, 0, 'dev364', '')" >> napari/_version.py
119+
echo "__version__ = version = '0.5.5a2.dev364'" > napari/_version.py
120+
echo "__version_tuple__ = version_tuple = (0, 5, 5, 'dev364', '')" >> napari/_version.py
116121
117122
# here we pass off control of environment creation and running of tests to tox
118123
# tox-gh-actions, installed above, helps to convert environment variables into
@@ -146,6 +151,7 @@ jobs:
146151
shell: bash
147152
run: |
148153
echo ${{ env.MAIN }}
154+
tox --version
149155
python -m tox run --installpkg ${{ env.WHEEL_PATH }} -- --basetemp=.pytest_tmp
150156
rm -r .tox
151157
env:

.github/workflows/test_comprehensive.yml

+18-14
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: actions/checkout@v4
30-
- name: "Set up Python 3.11"
30+
- name: "Set up Python 3.12"
3131
uses: actions/setup-python@v5
3232
with:
33-
python-version: "3.11"
33+
python-version: "3.12"
3434
- name: Install dependencies
3535
run: |
3636
pip install --upgrade pip
@@ -50,22 +50,22 @@ jobs:
5050
fail-fast: false
5151
matrix:
5252
platform: [ubuntu-latest, windows-latest]
53-
python: ["3.9", "3.10", "3.11", "3.12"]
53+
python: ["3.10", "3.11", "3.12", "3.13"]
5454
backend: [pyqt5, pyside2]
5555
include:
56-
- python: "3.10"
56+
- python: "3.11"
5757
platform: macos-latest
5858
backend: pyqt5
5959
# test with minimum specified requirements
60-
- python: "3.9"
61-
platform: ubuntu-20.04
60+
- python: "3.10"
61+
platform: ubuntu-22.04
6262
backend: pyqt5
6363
MIN_REQ: 1
6464
# test without any Qt backends
65-
- python: "3.9"
66-
platform: ubuntu-20.04
65+
- python: "3.10"
66+
platform: ubuntu-22.04
6767
backend: headless
68-
- python: "3.12"
68+
- python: "3.13"
6969
platform: ubuntu-latest
7070
backend: pyqt6
7171
tox_extras: "testing_extra"
@@ -75,9 +75,11 @@ jobs:
7575
tox_extras: "testing_extra"
7676
exclude:
7777
- python: "3.11"
78-
backend: pyside2
78+
- backend: pyside2
7979
- python: "3.12"
8080
backend: pyside2
81+
- python: "3.13"
82+
backend: pyside2
8183
- platform: windows-latest
8284
backend: pyside2
8385
with:
@@ -97,9 +99,9 @@ jobs:
9799
uses: ./.github/workflows/reusable_run_tox_test.yml
98100
needs: build_wheel
99101
with:
100-
toxenv: py39-linux-pyside2-examples-cov
102+
toxenv: py312-linux-pyqt6-examples-cov
101103
timeout: 60
102-
python_version: 3.9
104+
python_version: 3.12
103105
constraints_suffix: _examples
104106
coverage: cov
105107

@@ -108,9 +110,11 @@ jobs:
108110
needs:
109111
- test
110112
- test_examples
113+
permissions:
114+
id-token: write # Required for OIDC
115+
contents: read # Required for checkout
111116
uses: ./.github/workflows/reusable_coverage_upload.yml
112-
secrets:
113-
codecov_token: ${{ secrets.CODECOV_TOKEN }}
117+
secrets: inherit
114118

115119
synchronize_bot_repository:
116120
name: Synchronize bot repository

0 commit comments

Comments
 (0)