-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update CI configuration to use more modern OS and python versi…
…ons (#1207) ## Summary by Sourcery Update CI configurations to use Ubuntu 24.04 and Python 3.12, ensuring compatibility with the latest environments and dependencies. Build: - Update Azure Pipelines and GitHub Actions to use Ubuntu 24.04 as the default operating system for CI jobs. CI: - Upgrade Python version to 3.12 across various CI workflows and update dependencies accordingly. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated testing workflows to utilize a newer operating system version (Ubuntu 24.04) and Python version (3.12) for enhanced testing capabilities. - Maintained existing job structures and configurations to ensure continuity in testing processes. - **New Features** - Enhanced compatibility with the latest dependencies and testing environments through updated configurations across various workflows, including broader Python version support (3.9, 3.10, 3.11, 3.12). - Introduced a new job for package checking in the testing workflow to ensure package integrity. - Added a new `SelectDirectoryDialog` class to improve file selection handling. - **Bug Fixes** - Improved dependency management in the environment configuration by removing outdated dependencies and refining the structure for better compatibility and functionality. - **Tests** - Enhanced clarity and specificity of tests for loading and saving dialogs, ensuring they accurately validate functionality with updated method signatures and additional test cases. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
16 changed files
with
193 additions
and
117 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -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 | ||
|
@@ -38,6 +42,10 @@ on: | |
required: false | ||
type: string | ||
default: "" | ||
artifact_suffix: | ||
required: false | ||
type: string | ||
default: "" | ||
|
||
|
||
jobs: | ||
|
@@ -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 | ||
|
@@ -108,7 +151,7 @@ jobs: | |
uses: actions/[email protected] | ||
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.* |
This file contains 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 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 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 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 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 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 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 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
Oops, something went wrong.