From ce61e8965b4379f6f8e38cfc93ae382799e6e47f Mon Sep 17 00:00:00 2001 From: Conor MacBride Date: Wed, 6 Nov 2024 00:54:57 +0000 Subject: [PATCH] update environments to test --- .github/workflows/test_and_publish.yml | 40 +++++++++++--------------- setup.cfg | 1 - tests/subtests/subtest/pytest.ini | 2 +- tests/test_pytest_mpl.py | 2 +- tox.ini | 10 +++++-- 5 files changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/workflows/test_and_publish.yml b/.github/workflows/test_and_publish.yml index e2519a7..f90a05c 100644 --- a/.github/workflows/test_and_publish.yml +++ b/.github/workflows/test_and_publish.yml @@ -26,29 +26,25 @@ jobs: - ghostscript - inkscape envs: | - # Test oldest NEP 29 configurations - - linux: py39-test-mpl33 - - macos: py39-test-mpl33 - - windows: py39-test-mpl33 - # Test oldest non-NEP 29 configurations - - linux: py36-test-mpl20 - runs-on: ubuntu-20.04 - - macos: py36-test-mpl20 - - windows: py36-test-mpl20 - # Test newest configurations - - linux: py312-test-mpl38 - - macos: py312-test-mpl38 - - windows: py312-test-mpl38 - # Test intermediate NEP 29 configurations on Linux - - linux: py39-test-mpl38 - - linux: py310-test-mpl38 - - linux: py310-test-mpl35 - - linux: py311-test-mpl36 + # Test oldest SPEC 0 configurations - linux: py311-test-mpl37 - # Test different versions of pytest - - linux: py312-test-mpldev-pytestdev + - macos: py311-test-mpl37 + - windows: py311-test-mpl37 + # Test newest configurations + - linux: py313-test-mpl39 + - macos: py313-test-mpl39 + - windows: py313-test-mpl39 + # Test intermediate SPEC 0 configurations on Linux + - linux: py312-test-mpl37 + - linux: py311-test-mpl38 + - linux: py313-test-mpl38 + - linux: py312-test-mpl39 + # Test non-SPEC 0 configurations + - linux: py313-test-mpldev-pytestdev + - linux: py311-test-mpl37-pytest74 - linux: py39-test-mpl33-pytest62 - - linux: py38-test-mpl31-pytest54 + - linux: py37-test-mpl22-pytest54 + runs-on: ubuntu-22.04 coverage: 'codecov' publish: @@ -57,7 +53,5 @@ jobs: uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: test_command: pytest $GITHUB_WORKSPACE/tests; pytest --mpl $GITHUB_WORKSPACE/tests - # Remove python-version when python-dateutil >2.8.2 - python-version: "3.11" secrets: pypi_token: ${{ secrets.pypi_password }} diff --git a/setup.cfg b/setup.cfg index a874af3..4db263b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,7 +43,6 @@ docs = sphinx mpl_sphinx_theme>=3.6.0.dev0 sphinx_design - matplotlib==3.6 [tool:pytest] testpaths = tests diff --git a/tests/subtests/subtest/pytest.ini b/tests/subtests/subtest/pytest.ini index 6d956b1..cf0cae2 100644 --- a/tests/subtests/subtest/pytest.ini +++ b/tests/subtests/subtest/pytest.ini @@ -6,4 +6,4 @@ filterwarnings = error ignore:distutils Version classes are deprecated ignore:the imp module is deprecated in favour of importlib - ignore:Auto-close\(\)ing of figures upon backend switching is deprecated:matplotlib._api.deprecation.MatplotlibDeprecationWarning + ignore:Auto-close\(\)ing of figures upon backend switching is deprecated diff --git a/tests/test_pytest_mpl.py b/tests/test_pytest_mpl.py index 221feae..75f93f6 100644 --- a/tests/test_pytest_mpl.py +++ b/tests/test_pytest_mpl.py @@ -702,7 +702,7 @@ def test_format_{file_format}(): assert len(hash_data[f"test_formats.test_format_{file_format}"]) == 64 if not passes: hash_data[f"test_formats.test_format_{file_format}"] = ( - "d1ff" + hash_data[f"test_formats.test_format_{file_format}"][4:] + "d1ff" + hash_data[f"test_formats.test_format_{file_format}"][4:] ) tmp_hash_library.write_text(json.dumps(hash_data)) diff --git a/tox.ini b/tox.ini index 450f49d..4f863f0 100644 --- a/tox.ini +++ b/tox.ini @@ -19,20 +19,22 @@ setenv = changedir = .tmp/{envname} description = run tests deps = - py312: git+https://github.com/dateutil/dateutil.git#egg=python-dateutil mpl20: matplotlib==2.0.* - mpl20: nose mpl21: matplotlib==2.1.* mpl22: matplotlib==2.2.* + mpl22: numpy<2 mpl30: matplotlib==3.0.* mpl31: matplotlib==3.1.* + mpl31: numpy<2 mpl32: matplotlib==3.2.* mpl33: matplotlib==3.3.* + mpl33: numpy<2 mpl34: matplotlib==3.4.* mpl35: matplotlib==3.5.* mpl36: matplotlib==3.6.* mpl37: matplotlib==3.7.* mpl38: matplotlib==3.8.* + mpl39: matplotlib==3.9.* mpldev: matplotlib>=0.0.dev0 pytest54: pytest==5.4.* pytest60: pytest==6.0.* @@ -43,6 +45,10 @@ deps = pytest72: pytest==7.2.* pytest73: pytest==7.3.* pytest74: pytest==7.4.* + pytest80: pytest==8.0.* + pytest81: pytest==8.1.* + pytest82: pytest==8.2.* + pytest83: pytest==8.3.* pytestdev: git+https://github.com/pytest-dev/pytest.git#egg=pytest extras = test