Skip to content

Commit

Permalink
Merge branch 'develop' into add_read_skew
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki authored Oct 21, 2024
2 parents f3e8a54 + 505808a commit 7fdfeef
Show file tree
Hide file tree
Showing 115 changed files with 967 additions and 1,957 deletions.
12 changes: 6 additions & 6 deletions .azure-pipelines/pyinstaller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ parameters:
type: string

steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.11', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.12', architecture: x64}}
- template: pip_cache.yaml
parameters:
key: pyinstaller | requirements/constraints_py3.9.txt | "$(Agent.OS)" | "$(PY)"
key: pyinstaller | requirements/constraints_py3.12.txt | "$(Agent.OS)" | "$(PY)"
path: ${{ parameters.cache_dir }}
- bash: |
python -m pip install -U pip wheel setuptools
displayName: install libs
- bash: python -m pip install .[pyinstaller] -c requirements/constraints_py3.11.txt
- bash: python -m pip install .[pyinstaller] -c requirements/constraints_py3.12.txt
displayName: install partseg
- bash: |
python build_utils/create_and_pack_executable.py --no-simple-zip
displayName: build
- task: PublishBuildArtifacts@1
- task: PublishPipelineArtifact@1
inputs:
pathToPublish: dist2
artifactName: execs
targetPath: dist2
publishLocation: pipeline
- script: ${{ parameters.test_path }}
displayName: TestBuild
53 changes: 48 additions & 5 deletions .github/workflows/base_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ on:
os:
required: false
type: string
default: "ubuntu-20.04"
default: "ubuntu-24.04"
tox_args:
required: false
type: string
default: ""
pytest_args:
required: false
type: string
default: ""
napari:
required: false
type: string
Expand All @@ -38,6 +42,10 @@ on:
required: false
type: string
default: ""
artifact_suffix:
required: false
type: string
default: ""


jobs:
Expand Down Expand Up @@ -85,21 +93,56 @@ jobs:
python -m pip install -r requirements/requirements_dev.txt tox-gh-actions>=2.12.0 tox-min-req tox-uv
pip list
- name: Test with tox
- name: Test with tox PartSegImage
if: ${{ inputs.napari == 'latest' }}
run: python -m tox ${{ inputs.tox_args }} -- package/tests/test_PartSegImage ${{ inputs.pytest_args }}
env:
PYVISTA_OFF_SCREEN: True # required for opengl on windows
NAPARI: ${{ inputs.napari }}
BACKEND: ${{ inputs.qt_backend }}
PIP_CONSTRAINT: ${{ inputs.napari == 'latest' && format('requirements/constraints_py{0}{1}.txt', inputs.python_version, inputs.pydantic ) || '' }}
UV_CONSTRAINT: ${{ inputs.napari == 'latest' && format('requirements/constraints_py{0}{1}.txt', inputs.python_version, inputs.pydantic ) || '' }}

- name: Test with tox PartSegCore
if: ${{ inputs.napari == 'latest' }}
run: python -m tox ${{ inputs.tox_args }} -- package/tests/test_PartSegCore ${{ inputs.pytest_args }}
env:
PYVISTA_OFF_SCREEN: True # required for opengl on windows
NAPARI: ${{ inputs.napari }}
BACKEND: ${{ inputs.qt_backend }}
PIP_CONSTRAINT: ${{ inputs.napari == 'latest' && format('requirements/constraints_py{0}{1}.txt', inputs.python_version, inputs.pydantic ) || '' }}
UV_CONSTRAINT: ${{ inputs.napari == 'latest' && format('requirements/constraints_py{0}{1}.txt', inputs.python_version, inputs.pydantic ) || '' }}

- name: Test with tox PartSeg
if: ${{ inputs.napari == 'latest' }}
uses: aganders3/headless-gui@v2
timeout-minutes: ${{ inputs.timeout }}
with:
run: python -m tox ${{ inputs.tox_args }}
run: python -m tox ${{ inputs.tox_args }} -- package/tests/test_PartSeg ${{ inputs.pytest_args }}
env:
PYVISTA_OFF_SCREEN: True # required for opengl on windows
NAPARI: ${{ inputs.napari }}
BACKEND: ${{ inputs.qt_backend }}
PIP_CONSTRAINT: ${{ inputs.napari == 'latest' && format('requirements/constraints_py{0}{1}.txt', inputs.python_version, inputs.pydantic ) || '' }}
UV_CONSTRAINT: ${{ inputs.napari == 'latest' && format('requirements/constraints_py{0}{1}.txt', inputs.python_version, inputs.pydantic ) || '' }}

- name: Test with tox all
if: ${{ inputs.napari != 'latest' }}
uses: aganders3/headless-gui@v2
timeout-minutes: ${{ inputs.timeout }}
with:
run: python -m tox ${{ inputs.tox_args }} -- ${{ inputs.pytest_args }}
env:
PYVISTA_OFF_SCREEN: True # required for opengl on windows
NAPARI: ${{ inputs.napari }}
BACKEND: ${{ inputs.qt_backend }}
PIP_CONSTRAINT: ${{ inputs.napari == 'latest' && format('requirements/constraints_py{0}{1}.txt', inputs.python_version, inputs.pydantic ) || '' }}
UV_CONSTRAINT: ${{ inputs.napari == 'latest' && format('requirements/constraints_py{0}{1}.txt', inputs.python_version, inputs.pydantic ) || '' }}


- uses: actions/upload-artifact@v4
with:
name: timing-report-${{ inputs.os }}-py-${{ inputs.python_version }}-${{ inputs.napari }}-${{ inputs.qt_backend }}-${{ inputs.coverage }}
name: timing-report-${{ inputs.os }}-py-${{ inputs.python_version }}-${{ inputs.napari }}-${{ inputs.qt_backend }}-${{ inputs.coverage }}${{ inputs.artifact_suffix }}
path: |
./report-*.json
retention-days: 7
Expand All @@ -108,7 +151,7 @@ jobs:
uses: actions/upload-artifact@v4.4.0
if: ${{ inputs.coverage }}
with:
name: cov-reports-${{ inputs.os }}-py-${{ inputs.python_version }}-${{ inputs.napari }}-${{ inputs.qt_backend }}
name: cov-reports-${{ inputs.os }}-py-${{ inputs.python_version }}-${{ inputs.napari }}-${{ inputs.qt_backend }}${{ inputs.artifact_suffix }}
include-hidden-files: 'true'
path: |
./.coverage.*
6 changes: 3 additions & 3 deletions .github/workflows/make_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
- uses: tlambert03/setup-qt-libs@v1
- name: Install Windows OpenGL
if: runner.os == 'Windows'
Expand All @@ -44,12 +44,12 @@ jobs:
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1}
shell: powershell
- name: Install PartSeg
run: python -m pip install --editable ".[pyinstaller]" --constraint requirements/constraints_py3.10.txt
run: python -m pip install --editable ".[pyinstaller]" --constraint requirements/constraints_py3.12.txt

- name: compile numpy on macos-14
if: ${{ matrix.os == 'macos-14' }}
run: |
python -m pip install --no-binary numpy numpy --force-reinstall --constraint requirements/constraints_py3.10.txt
python -m pip install --no-binary numpy numpy --force-reinstall --constraint requirements/constraints_py3.12.txt
- name: Build PartSeg bundle
run: python build_utils/create_and_pack_executable.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_napari_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
download_data:
name: Download test data
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- shell: bash
Expand All @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-22.04 ]
platform: [ ubuntu-24.04 ]
python: ['3.9' , '3.10', '3.11', '3.12']
napari_version: ['repo']
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_napari_widgets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
fail-fast: false
matrix:
qt_backend: ["PyQt5", "PySide2"]
os: ["ubuntu-22.04"]
os: ["ubuntu-24.04"]
uses: ./.github/workflows/base_test_workflow.yml
with:
python_version: "3.10"
os: ${{ matrix.os }}
napari: "napari5"
napari: "napari54"
qt_backend: ${{ matrix.qt_backend }}
timeout: 10

Expand All @@ -36,10 +36,10 @@ jobs:
strategy:
fail-fast: false
matrix:
napari: ["napari417", "napari418"]
napari: ["napari419", "napari54"]
qt_backend: ["PyQt5"]
include:
- napari: "napari417"
- napari: "napari54"
qt_backend: "PySide2"
if: github.event_name == 'push'
uses: ./.github/workflows/base_test_workflow.yml
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test_prereleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
download_data:
name: Download test data
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- shell: bash
Expand All @@ -41,7 +41,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [windows-2022, macos-14, ubuntu-22.04]
platform: [windows-2022, macos-14, ubuntu-24.04]
python: [3.12]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -108,9 +108,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python 3.11
name: Install Python 3.12
with:
python-version: 3.11
python-version: 3.12
- uses: tlambert03/setup-qt-libs@v1
- name: Install dependencies
run: |
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: "linux"
PYTHON: "3.11"
PYTHON: "3.12"
RUN_ID: ${{ github.run_id }}
TITLE: '[test-bot] pyinstaller bundle --pre is failing'
with:
Expand Down
53 changes: 31 additions & 22 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,27 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-20.04"]
python_version: ["3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-24.04"]
qt_backend: ["PyQt5"]
tox_args: [ "" ]
include:
- python_version: "3.9"
- python_version: "3.11"
os: "macos-13"
qt_backend: "PyQt5"
- python_version: "3.9"
os: "windows-2019"
- python_version: "3.12"
os: "macos-14"
qt_backend: "PyQt6"
- python_version: "3.11"
os: "windows-latest"
qt_backend: "PyQt5"
- python_version: "3.9"
- python_version: "3.10"
os: "ubuntu-20.04"
qt_backend: "PySide2"
- python_version: "3.9"
os: "ubuntu-22.04"
qt_backend: "PySide6"
- python_version: "3.10"
os: "ubuntu-24.04"
qt_backend: "PySide6"
- python_version: "3.12"
os: "ubuntu-22.04"
qt_backend: "PyQt6"
- python_version: "3.10"
Expand All @@ -90,20 +93,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-20.04", "macos-13", "windows-2019"]
python_version: ["3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
qt_backend: ["PySide2", "PyQt5"]
include:
- python_version: "3.11"
- python_version: "3.12"
qt_backend: "PyQt5"
os: "ubuntu-22.04"
- python_version: "3.9"
- python_version: "3.10"
os: "ubuntu-22.04"
qt_backend: "PySide6"
- python_version: "3.9"
- python_version: "3.11"
os: "ubuntu-22.04"
qt_backend: "PyQt6"
- python_version: "3.10"
- python_version: "3.11"
os: "ubuntu-22.04"
qt_backend: "PyQt5"
pydantic: "_pydantic_1"
Expand All @@ -112,20 +115,26 @@ jobs:
qt_backend: "PySide2"
- python_version: "3.12"
qt_backend: "PySide2"
- os: "macos-14"
qt_backend: "PySide2"
- os: "macos-14"
python_version: "3.9"
with:
test_data: True
python_version: ${{ matrix.python_version }}
os: ${{ matrix.os }}
qt_backend: ${{ matrix.qt_backend }}
pydantic: ${{ matrix.pydantic }}
artifact_suffix: "-main"
pytest_args: "-v"

test_coverage:
needs: download_data
uses: ./.github/workflows/base_test_workflow.yml
with:
test_data: True
python_version: "3.10"
tox_args: "-e py310-PyQt5-coverage"
python_version: "3.12"
tox_args: "-e py312-PyQt5-coverage"
coverage: true

test_minimal:
Expand All @@ -134,8 +143,8 @@ jobs:
uses: ./.github/workflows/base_test_workflow.yml
with:
test_data: True
python_version: "3.8"
tox_args: "-e py38-PyQt5-minimal"
python_version: "3.9"
tox_args: "-e py39-PyQt5-minimal"
coverage: true

coverage_prepare:
Expand Down Expand Up @@ -182,7 +191,7 @@ jobs:

test_conda:
name: Test PartSeg conda
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: download_data
steps:
- uses: actions/checkout@v4
Expand All @@ -193,7 +202,7 @@ jobs:
use-mamba: true
channels: conda-forge
channel-priority: strict
python-version: "3.11"
python-version: "3.12"

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

Expand Down Expand Up @@ -236,7 +245,7 @@ jobs:
- name: Test with tox
uses: aganders3/headless-gui@v2
with:
run: conda run -n test --no-capture-output tox -e py311-PySide2-conda
run: conda run -n test --no-capture-output tox -e py312-PySide2-conda
timeout-minutes: 60

check-package:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upgrade-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
cache: pip
cache-dependency-path: 'pyproject.toml'
- name: Upgrade Python dependencies
Expand All @@ -35,7 +35,7 @@ jobs:
pip install -U uv
flags=(--extra pyqt6 --extra pyside2 --extra pyside6 --extra test --extra pyinstaller_base)
for pyv in 3.8 3.9 3.10 3.11 3.12; do
for pyv in 3.9 3.10 3.11 3.12; do
uv pip compile --python-version ${pyv} --upgrade --output-file requirements/constraints_py${pyv}.txt pyproject.toml requirements/version_denylist.txt "${flags[@]}"
uv pip compile --python-version ${pyv} --upgrade --output-file requirements/constraints_py${pyv}_pydantic_1.txt pyproject.toml requirements/version_denylist.txt "${flags[@]}" --constraint requirements/pydantic_1.txt
done
Expand Down
Loading

0 comments on commit 7fdfeef

Please sign in to comment.