Skip to content

Commit

Permalink
Merge branch 'develop' into docs/plugin_create
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki authored Apr 22, 2024
2 parents c3280b4 + f014ed4 commit d011273
Show file tree
Hide file tree
Showing 137 changed files with 5,380 additions and 1,669 deletions.
6 changes: 3 additions & 3 deletions .azure-pipelines/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ parameters:
type: string

steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.9'}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.11'}}
- template: pip_cache.yaml
parameters:
key: test | requirements/constraints_py3.9.txt | "$(Agent.OS)" | "$(PY)"
key: test | requirements/constraints_py3.11.txt | "$(Agent.OS)" | "$(PY)"
path: ${{ parameters.cache_dir }}
- task: DownloadPipelineArtifact@2
inputs:
Expand All @@ -16,7 +16,7 @@ steps:
pip install -U pip wheel setuptools virtualenv
pip install -r requirements/requirements_dev.txt
displayName: "Install deps"
- script: tox -e py39-PyQt5-azure
- script: tox -e py311-PyQt5-azure
displayName: "Run Tox"
env:
CODECOV_TOKEN: $(codecov_token_secret)
Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ updates:
interval: "weekly"

target-branch: "develop"
groups:
github-actions:
patterns:
- "actions/*"
35 changes: 17 additions & 18 deletions .github/workflows/base_test_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Base Test Workflow

on:
workflow_call:
inputs:
Expand Down Expand Up @@ -32,6 +34,10 @@ on:
required: false
type: number
default: 60
pydantic:
required: false
type: string
default: ""


jobs:
Expand All @@ -40,12 +46,12 @@ jobs:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python ${{ inputs.python_version }}
with:
python-version: ${{ inputs.python_version }}
cache: 'pip'
cache-dependency-path: 'setup.cfg'
cache-dependency-path: 'pyproject.toml'

# - name: Install ubuntu libraries
# if: runner.os == 'Linux'
Expand All @@ -69,7 +75,7 @@ jobs:
- name: Download test data
if: ${{ inputs.test_data }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test_data
path: test_data
Expand All @@ -80,34 +86,27 @@ jobs:
pip list
- name: Test with tox
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
timeout-minutes: ${{ inputs.timeout }}
with:
run: python -m tox ${{ inputs.tox_args }}
env:
PYVISTA_OFF_SCREEN: True # required for opengl on windows
NAPARI: ${{ inputs.napari }}
BACKEND: ${{ inputs.qt_backend }}
PIP_CONSTRAINT: requirements/constraints_py${{ inputs.python_version }}.txt
PIP_CONSTRAINT: requirements/constraints_py${{ inputs.python_version }}${{ inputs.pydantic }}.txt

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: upload pytest timing reports as json
name: timing-report-${{ inputs.os }}-py-${{ inputs.python_version }}-${{ inputs.napari }}-${{ inputs.qt_backend }}-${{ inputs.coverage }}
path: |
./report-*.json
retention-days: 7

- uses: actions/upload-artifact@v3
- name: Upload coverage data
uses: actions/upload-artifact@v4
if: ${{ inputs.coverage }}
with:
name: coverage_report ${{ inputs.tox_args }}
name: cov-reports-${{ inputs.os }}-py-${{ inputs.python_version }}-${{ inputs.napari }}-${{ inputs.qt_backend }}
path: |
./htmlcov
retention-days: 7

- uses: codecov/codecov-action@v3
if: ${{ inputs.coverage }}
with:
file: ./coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
./.coverage.*
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -58,7 +58,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -72,4 +72,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
# Fetch project source with GitHub Actions Checkout.
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Run the "semgrep ci" command on the command line of the docker image.
- run: semgrep ci
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test_napari_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- shell: bash
run: bash build_utils/download_data.sh
- name: Upload test data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test_data
path: test_data
Expand All @@ -29,13 +29,13 @@ jobs:
fail-fast: false
matrix:
platform: [ ubuntu-22.04 ]
python: ['3.8', '3.9' , '3.10']
napari_version: [repo]
python: ['3.8', '3.9' , '3.10', '3.11']
napari_version: ['repo']
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand All @@ -54,14 +54,14 @@ jobs:
pip install setuptools tox tox-gh-actions
- name: Download test data
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test_data
path: test_data

- name: Test with tox
# run tests using pip install --pre
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
timeout-minutes: 60
with:
run: tox
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_napari_widgets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
python_version: "3.10"
os: ${{ matrix.os }}
napari: "napari417"
napari: "napari419"
qt_backend: ${{ matrix.qt_backend }}
timeout: 10

Expand All @@ -36,10 +36,10 @@ jobs:
strategy:
fail-fast: false
matrix:
napari: ["napari414", "napari415", "napari416"]
napari: ["napari417", "napari418"]
qt_backend: ["PyQt5"]
include:
- napari: "napari414"
- napari: "napari417"
qt_backend: "PySide2"
if: github.event_name == 'push'
uses: ./.github/workflows/base_test_workflow.yml
Expand Down
27 changes: 16 additions & 11 deletions .github/workflows/test_prereleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ on:
branches:
- master
- develop
- bugfix/fix_pre_tests
schedule:
- cron: '0 */12 * * *' # every 12 hours
pull_request:
paths:
- '.github/workflows/test_prereleases.yml'
- 'pyproject.toml'
- 'requirements/pre_test_problematic_version.txt'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -23,7 +27,7 @@ jobs:
- shell: bash
run: bash build_utils/download_data.sh
- name: Upload test data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test_data
path: test_data
Expand All @@ -43,11 +47,11 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: 'setup.cfg'
cache-dependency-path: 'pyproject.toml'

- name: Install Windows OpenGL
if: runner.os == 'Windows'
Expand All @@ -59,7 +63,7 @@ jobs:
- uses: tlambert03/setup-qt-libs@v1

- name: Download test data
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test_data
path: test_data
Expand All @@ -71,7 +75,7 @@ jobs:
- name: Test with tox linux
# run tests using pip install --pre
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
timeout-minutes: 60
with:
run: python -m tox -v --pre
Expand All @@ -80,6 +84,7 @@ jobs:
PYVISTA_OFF_SCREEN: True # required for opengl on windows
NAPARI: latest
BACKEND: PyQt5
PIP_CONSTRAINT: requirements/pre_test_problematic_version.txt

# If something goes wrong, we can open an issue in the repo
- name: Report Failures
Expand All @@ -100,7 +105,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python 3.9
with:
python-version: 3.9
Expand All @@ -111,23 +116,23 @@ jobs:
pip install pip-tools
- name: Compile and install PyInstaller requirements
run: |
pip-compile --upgrade -o requirements.txt setup.cfg --extra pyinstaller --pre
pip-compile --upgrade -o requirements.txt pyproject.toml requirements/pre_test_problematic_version.txt --extra pyinstaller --pre
pip-sync
pip install .
- name: upload requirements
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: requirements
path: requirements.txt
- name: Run PyInstaller
run: python build_utils/create_and_pack_executable.py
- name: Upload bundle
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bundle
path: dist2/
- name: Test bundle
uses: aganders3/headless-gui@v1
uses: aganders3/headless-gui@v2
timeout-minutes: 60
with:
run: dist/PartSeg/PartSeg _test
Expand Down
Loading

0 comments on commit d011273

Please sign in to comment.