Skip to content

Commit

Permalink
default to testing with Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Oct 11, 2023
1 parent 7a7d1ca commit 5aaac2e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 30 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ jobs:
step: [lintreadme, shellcheck, pydocstyle]

env:
py-semver: "3.11"
TOXENV: ${{ format('py311-{0}', matrix.step) }}
py-semver: "3.12"
TOXENV: ${{ format('py312-{0}', matrix.step) }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
name: No leftovers
runs-on: ubuntu-22.04
env:
py-semver: "3.11"
py-semver: "3.12"
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
cache: pip

- name: "Test CWL ${{ matrix.cwl-version }} conformance"
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
cache: pip
cache-dependency-path: |
requirements.txt
Expand Down Expand Up @@ -256,15 +256,15 @@ jobs:
name: Test on macos-latest
runs-on: macos-latest
env:
TOXENV: py311-unit
TOXENV: py312-unit
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
cache: pip
cache-dependency-path: |
requirements.txt
Expand Down
8 changes: 4 additions & 4 deletions cwltool.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-alpine3.17 as builder
FROM python:3.12-alpine3.17 as builder

RUN apk add --no-cache git gcc python3-dev libxml2-dev libxslt-dev libc-dev linux-headers

Expand All @@ -8,20 +8,20 @@ RUN CWLTOOL_USE_MYPYC=1 MYPYPATH=mypy-stubs pip wheel --no-binary schema-salad \
--wheel-dir=/wheels .[deps] # --verbose
RUN rm /wheels/schema_salad*
RUN pip install "black~=22.0"
# galaxy-util 22.1.2 depends on packaging<22, but black 23.x needs packaging>22
# galaxy-util 22.1.x depends on packaging<22, but black 23.x needs packaging>22
RUN SCHEMA_SALAD_USE_MYPYC=1 MYPYPATH=mypy-stubs pip wheel --no-binary schema-salad \
$(grep schema.salad requirements.txt) "black~=22.0" --wheel-dir=/wheels # --verbose
RUN pip install --force-reinstall --no-index --no-warn-script-location \
--root=/pythonroot/ /wheels/*.whl
# --force-reinstall to install our new mypyc compiled schema-salad package

FROM python:3.11-alpine3.17 as module
FROM python:3.12-alpine3.17 as module
LABEL maintainer [email protected]

RUN apk add --no-cache docker nodejs 'graphviz<8' libxml2 libxslt
COPY --from=builder /pythonroot/ /

FROM python:3.11-alpine3.17
FROM python:3.12-alpine3.17
LABEL maintainer [email protected]

RUN apk add --no-cache docker nodejs 'graphviz<8' libxml2 libxslt
Expand Down
4 changes: 2 additions & 2 deletions release-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ run_tests() {
"${test_prefix}"bin/py.test "--ignore=${mod_loc}/schemas/" \
--pyargs -x ${module} -n auto --dist=loadfile
}
pipver=20.3.4 # minimum required version of pip for Python 3.10
setuptoolsver=52.0.0
pipver=23.1 # minimum required version of pip for Python 3.12
setuptoolsver=67.6.1 # required for Python 3.12
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

rm -Rf testenv? || /bin/true
Expand Down
33 changes: 16 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ envlist =
py3{8,9,10,11,12}-unit
py3{8,9,10,11,12}-bandit
py3{8,9,10,11,12}-mypy
py311-lintreadme
py311-shellcheck
py311-pydocstyle
py312-lintreadme
py312-shellcheck
py312-pydocstyle

skip_missing_interpreters = True

Expand All @@ -31,9 +31,9 @@ description =
py3{8,9,10,11,12}-lint: Lint the Python code
py3{8,9,10,11,12}-bandit: Search for common security issues
py3{8,9,10,11,12}-mypy: Check for type safety
py311-pydocstyle: docstring style checker
py311-shellcheck: syntax check for shell scripts
py311-lintreadme: Lint the README.rst→.md conversion
py312-pydocstyle: docstring style checker
py312-shellcheck: syntax check for shell scripts
py312-lintreadme: Lint the README.rst→.md conversion

passenv =
CI
Expand All @@ -50,28 +50,27 @@ deps =
py3{8,9,10,11,12}-bandit: bandit
py3{8,9,10,11,12}-bandit: importlib_metadata != 4.8.0
py3{8,9,10,11,12}-mypy: -rmypy-requirements.txt
py311-pydocstyle: pydocstyle
py311-pydocstyle: diff-cover
py311-lintreadme: twine
py311-lintreadme: build
py311-lintreadme: readme_renderer[rst]
py312-pydocstyle: pydocstyle
py312-pydocstyle: diff-cover
py312-lintreadme: twine
py312-lintreadme: build
py312-lintreadme: readme_renderer[rst]

setenv =
py3{8,9,10,11,12}-unit: LC_ALL = C.UTF-8

commands_pre =
py3{8,9,10,11,12}-unit: python -m pip install -U pip setuptools wheel
py311-lintreadme: python -m build --outdir {distdir}
py312-lintreadme: python -m build --outdir {distdir}

commands =
py3{8,9,10,11,12}-unit: make coverage-report coverage.xml PYTEST_EXTRA={posargs}
py3{8,9,10,11,12}-bandit: bandit -r cwltool
py3{8,9,10,11,12}-lint: make flake8 format-check codespell-check
py3{8,9,10,11,12}-mypy: make mypy PYTEST_EXTRA={posargs}
py3{8,9,10,11}-mypy: make mypyc PYTEST_EXTRA={posargs}
py311-shellcheck: make shellcheck
py311-pydocstyle: make diff_pydocstyle_report
py311-lintreadme: twine check {distdir}/*
py3{8,9,10,11,12}-mypy: make mypy mypyc PYTEST_EXTRA={posargs}
py312-shellcheck: make shellcheck
py312-pydocstyle: make diff_pydocstyle_report
py312-lintreadme: twine check {distdir}/*

skip_install =
py3{8,9,10,11,12}-{bandit,lint,mypy,shellcheck,pydocstyle,lintreadme}: true
Expand Down

0 comments on commit 5aaac2e

Please sign in to comment.