Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions: Upgrade to Python v3.11 production release #1777

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/workflows/merge-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,46 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11-dev']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
include:
- os: ubuntu-latest
python-version: '3.10'
send-coverage: true
pytest-args: --cov=pydicom --cov-append

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 2

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

- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install -U pip
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"

- name: pip cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: py${{ matrix.python-version }}-${{ matrix.os }}-pip

- name: Cache pydicom test data
id: cache-testdata
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.HOME }}/.pydicom
key: pydicom-testdata

- name: Initial test environment setup
run: |
python -m pip install -e .
python -m pip install -U wheel pytest pytest-cov
python -m pip install --editable .
python -m pip install --upgrade wheel pytest pytest-cov

# Core library tests
- name: Test core library
Expand All @@ -66,19 +66,19 @@ jobs:
# Pixel data tests
- name: Install and test with numpy
run: |
python -m pip install -U numpy
python -m pip install --upgrade numpy
pytest ${{ matrix.pytest-args }}

- name: Install and test Pillow
run: |
python -m pip install -U pillow
python -m pip install --upgrade pillow
pytest ${{ matrix.pytest-args }} pydicom/tests/test_pillow_pixel_data.py
python -m pip uninstall -y pillow

- name: Install and test jpeg_ls
if: ${{ matrix.python-version != '3.11-dev' }}
if: ${{ matrix.python-version != '3.12-dev' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this in preparation for 3.12 builds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, one more alpha release before the beta cycle starts…

https://peps.python.org/pep-0693/#schedule

run: |
python -m pip install -U cython
python -m pip install --upgrade cython
python -m pip install git+https://github.com/Who8MyLunch/CharPyLS
pytest ${{ matrix.pytest-args }} pydicom/tests/test_jpeg_ls_pixel_data.py pydicom/tests/test_JPEG_LS_transfer_syntax.py
python -m pip uninstall -y CharPyLS
Expand All @@ -92,7 +92,7 @@ jobs:
python -m pip uninstall -y python-gdcm

- name: Install and test pylibjpeg
if: ${{ matrix.python-version != '3.11-dev' }}
if: ${{ matrix.python-version != '3.12-dev' }}
run: |
python -m pip install pylibjpeg
python -m pip uninstall -y pylibjpeg-openjpeg pylibjpeg-rle
Expand All @@ -101,12 +101,12 @@ jobs:
pytest ${{ matrix.pytest-args }} pydicom/tests/test_pylibjpeg.py

- name: Test all pixel handling
if: ${{ matrix.python-version != '3.11-dev' }}
if: ${{ matrix.python-version != '3.12-dev' }}
run: |
python -m pip install pillow python-gdcm
python -m pip install git+https://github.com/Who8MyLunch/CharPyLS
pytest ${{ matrix.pytest-args }}

- name: Send coverage results
if: ${{ success() && matrix.send-coverage }}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
10 changes: 5 additions & 5 deletions .github/workflows/merge-typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11-dev' ]
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- name: Install typing dependencies
run: |
python -m pip install -U pip
python -m pip install --upgrade pip
python -m pip install mypy==0.971
python -m pip install -U types-requests types-pkg_resources types-setuptools
python -m pip install --upgrade types-requests types-pkg_resources types-setuptools
- name: Run typing check with mypy
run: |
mypy
54 changes: 27 additions & 27 deletions .github/workflows/pr-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ jobs:
os: [ubuntu-latest]
python-version: [pypy-3.7]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Initial test environment setup
run: |
python -m pip install -e .
python -m pip install -U wheel pytest
python -m pip install --editable .
python -m pip install --upgrade wheel pytest
- name: Test with no external libraries
run: |
pytest
- name: Install and test with numpy
run: |
python -m pip install -U numpy
python -m pip install --upgrade numpy
pytest

test-core-only:
Expand All @@ -36,44 +36,44 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11-dev']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
include:
- os: 'ubuntu-latest'
pytest-args: --cov=pydicom --cov-append
send-coverage: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 2

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

- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install -U pip
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"

- name: pip cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: py${{ matrix.python-version }}-${{ matrix.os }}-pip

- name: Cache pydicom test data
id: cache-testdata
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.HOME }}/.pydicom
key: pydicom-testdata

- name: Initial test environment setup
run: |
python -m pip install -e .
python -m pip install --editable .
python -m pip install wheel pytest pytest-cov

- name: Test core library
Expand All @@ -82,7 +82,7 @@ jobs:

- name: Send coverage results
if: ${{ success() && matrix.send-coverage }}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3

test-core-extras:
runs-on: ${{ matrix.os }}
Expand All @@ -97,37 +97,37 @@ jobs:
pytest-args: --cov=pydicom --cov-append

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 2

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

- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install -U pip
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"

- name: pip cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: py${{ matrix.python-version }}-${{ matrix.os }}-pip

- name: Cache pydicom test data
id: cache-testdata
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.HOME }}/.pydicom
key: pydicom-testdata

- name: Initial test environment setup
run: |
python -m pip install -e .
python -m pip install --editable .
python -m pip install wheel pytest pytest-cov

# Core library tests
Expand All @@ -143,44 +143,44 @@ jobs:
# Pixel data decoding and encoding
- name: Install and test with numpy
run: |
python -m pip install -U numpy
python -m pip install --upgrade numpy
pytest ${{ matrix.pytest-args }}

- name: Install and test Pillow
run: |
python -m pip install -U pillow
python -m pip install --upgrade pillow
pytest ${{ matrix.pytest-args }} pydicom/tests/test_pillow_pixel_data.py
python -m pip uninstall -y pillow

- name: Install and test jpeg_ls
run: |
python -m pip install -U cython
python -m pip install --upgrade cython
python -m pip install git+https://github.com/Who8MyLunch/CharPyLS
pytest ${{ matrix.pytest-args }} pydicom/tests/test_JPEG_LS_transfer_syntax.py pydicom/tests/test_jpeg_ls_pixel_data.py
python -m pip uninstall -y CharPyLS

- name: Install and test GDCM
run: |
python -m pip install -U python-gdcm
python -m pip install --upgrade python-gdcm
python -c 'import gdcm; print(gdcm.GDCM_VERSION)'
pytest ${{ matrix.pytest-args }} pydicom/tests/test_gdcm_pixel_data.py
pytest ${{ matrix.pytest-args }} pydicom/tests/test_encoders_gdcm.py
python -m pip uninstall -y python-gdcm

- name: Install and test pylibjpeg
run: |
python -m pip install -U pylibjpeg
python -m pip install --upgrade pylibjpeg
python -m pip uninstall -y pylibjpeg-openjpeg pylibjpeg-rle
pytest ${{ matrix.pytest-args }} pydicom/tests/test_pylibjpeg.py
python -m pip install -U pylibjpeg-openjpeg pylibjpeg-libjpeg pylibjpeg-rle
python -m pip install --upgrade pylibjpeg-openjpeg pylibjpeg-libjpeg pylibjpeg-rle
pytest ${{ matrix.pytest-args }} pydicom/tests/test_pylibjpeg.py

- name: Test all pixel handling
run: |
python -m pip install -U pillow python-gdcm
python -m pip install --upgrade pillow python-gdcm
python -m pip install git+https://github.com/Who8MyLunch/CharPyLS
pytest ${{ matrix.pytest-args }}

- name: Send coverage results
if: ${{ success() && matrix.send-coverage }}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3