Skip to content

Attempt to get CI working again #240

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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
42 changes: 20 additions & 22 deletions .github/workflows/test_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
branches:
- main
tags:
- 'v*'
- '!*dev*'
- '!*pre*'
- '!*post*'
- "v*"
- "!*dev*"
- "!*pre*"
- "!*post*"
pull_request:
# Allow manual runs through the web UI
workflow_dispatch:
Expand All @@ -27,37 +27,35 @@ jobs:
- 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
- linux: py311-test-mpl37
- macos: py311-test-mpl37
- windows: py311-test-mpl37
# Test newest configurations
- linux: py312-test-mpl38
- macos: py312-test-mpl38
- windows: py312-test-mpl38
#
# TODO: mpl310 gives different hashes on different operating systems
# when that's fixed, these should be bumped to mpl310
#
- linux: py313-test-mpl39
- macos: py313-test-mpl39
- windows: py313-test-mpl39
# Test intermediate NEP 29 configurations on Linux
- linux: py39-test-mpl38
- linux: py310-test-mpl37
- linux: py310-test-mpl38
- linux: py310-test-mpl35
- linux: py311-test-mpl36
- linux: py311-test-mpl37
- linux: py311-test-mpl39
- linux: py312-test-mpl39
# Test different versions of pytest
- linux: py312-test-mpldev-pytestdev
- linux: py39-test-mpl33-pytest62
- linux: py38-test-mpl31-pytest54
coverage: 'codecov'
- linux: py39-test-mpl39-pytest62
- linux: py39-test-mpl37-pytest54
coverage: "codecov"

publish:
if: github.event_name != 'pull_request'
needs: [test]
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 }}
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ build:
tools:
python: "3.11"

sphinx:
configuration: docs/conf.py

python:
install:
- method: pip
Expand Down
2 changes: 1 addition & 1 deletion docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Installation Guide
##################

This plugin is compatible with Python 3.6 and later, and
This plugin is compatible with Python 3.9 and later, and
requires `pytest <http://pytest.org>`__ and
`matplotlib <http://www.matplotlib.org>`__ to be installed.

Expand Down
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ long_description_content_type = text/x-rst
zip_safe = True
packages = find:
include_package_data = True
python_requires = >=3.6
python_requires = >=3.9
install_requires =
pytest
matplotlib
matplotlib>=3.7
importlib_resources;python_version<'3.8'
packaging
Jinja2
Expand All @@ -41,9 +41,9 @@ test =
pytest-cov
docs =
sphinx
mpl_sphinx_theme>=3.6.0.dev0
mpl_sphinx_theme>=3.9.0
sphinx_design
matplotlib==3.6
matplotlib==3.9.*

[tool:pytest]
testpaths = tests
Expand Down
7 changes: 0 additions & 7 deletions tests/baseline/hashes/mpl20_ft261.json

This file was deleted.

9 changes: 0 additions & 9 deletions tests/baseline/hashes/mpl21_ft261.json

This file was deleted.

9 changes: 0 additions & 9 deletions tests/baseline/hashes/mpl22_ft261.json

This file was deleted.

9 changes: 0 additions & 9 deletions tests/baseline/hashes/mpl30_ft261.json

This file was deleted.

10 changes: 10 additions & 0 deletions tests/baseline/hashes/mpl310_ft261.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"test_pytest_mpl.test_hash_succeeds": "e73d228183ddfdced366191399cdecef9685d1248b852162f179750fc7b8b904",
"test.test_modified": "2d3f2990aa6bc127d154c39ec4480a56e95e6245de31280c049b760ac1d120f0",
"test.test_new": "2d3f2990aa6bc127d154c39ec4480a56e95e6245de31280c049b760ac1d120f0",
"test.test_unmodified": "2d3f2990aa6bc127d154c39ec4480a56e95e6245de31280c049b760ac1d120f0",
"test_formats.test_format_eps": "f730e67270aeeb2a0bedee168d7c421b952cbf486ea371987cc4cea503a7d7ff",
"test_formats.test_format_pdf": "492152532625c1c4ea404854b75923c5dae0c253873b3715edba29d93b326d07",
"test_formats.test_format_png": "e73d228183ddfdced366191399cdecef9685d1248b852162f179750fc7b8b904",
"test_formats.test_format_svg": "37695c451ddc7b92ee18025e51ef54cc0e58840298945050d40d692580a14539"
}
9 changes: 0 additions & 9 deletions tests/baseline/hashes/mpl31_ft261.json

This file was deleted.

9 changes: 0 additions & 9 deletions tests/baseline/hashes/mpl32_ft261.json

This file was deleted.

10 changes: 0 additions & 10 deletions tests/baseline/hashes/mpl33_ft261.json

This file was deleted.

10 changes: 0 additions & 10 deletions tests/baseline/hashes/mpl34_ft261.json

This file was deleted.

10 changes: 0 additions & 10 deletions tests/baseline/hashes/mpl35_ft261.json

This file was deleted.

2 changes: 1 addition & 1 deletion tests/baseline/hashes/mpl37_ft261.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"test_formats.test_format_eps": "f7a03867e26b8ae32ed6f22972dfdc571a974df80881dc24bb8f840681f2ac5f",
"test_formats.test_format_pdf": "492152532625c1c4ea404854b75923c5dae0c253873b3715edba29d93b326d07",
"test_formats.test_format_png": "e73d228183ddfdced366191399cdecef9685d1248b852162f179750fc7b8b904",
"test_formats.test_format_svg": "cb648df098fa1dd1ba0ed81e6498d31a152a43c47882e2503d093f83306ff403"
"test_formats.test_format_svg": "bfe2704c1b1ce78edd70a0ad0b74519344e348ba830faafaecc7612b4950a9f6"
}
2 changes: 1 addition & 1 deletion tests/baseline/hashes/mpl38_ft261.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"test_formats.test_format_eps": "f730e67270aeeb2a0bedee168d7c421b952cbf486ea371987cc4cea503a7d7ff",
"test_formats.test_format_pdf": "492152532625c1c4ea404854b75923c5dae0c253873b3715edba29d93b326d07",
"test_formats.test_format_png": "e73d228183ddfdced366191399cdecef9685d1248b852162f179750fc7b8b904",
"test_formats.test_format_svg": "6309fd2c3f328ca3c5614c58c118780c94035eb3690fc4b95d1923699b28ff8e"
"test_formats.test_format_svg": "9cae2f09df8e0a442be577e4138ed0f15cdde485929a5b85d8544b97590047ac"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"test.test_modified": "025d344bc9667222abc27f2d746618bce9da8ae44fa9afa1220ac83f230b4e4e",
"test.test_new": "025d344bc9667222abc27f2d746618bce9da8ae44fa9afa1220ac83f230b4e4e",
"test.test_unmodified": "025d344bc9667222abc27f2d746618bce9da8ae44fa9afa1220ac83f230b4e4e",
"test_formats.test_format_eps": "f7a03867e26b8ae32ed6f22972dfdc571a974df80881dc24bb8f840681f2ac5f",
"test_formats.test_format_eps": "f730e67270aeeb2a0bedee168d7c421b952cbf486ea371987cc4cea503a7d7ff",
"test_formats.test_format_pdf": "492152532625c1c4ea404854b75923c5dae0c253873b3715edba29d93b326d07",
"test_formats.test_format_png": "e73d228183ddfdced366191399cdecef9685d1248b852162f179750fc7b8b904",
"test_formats.test_format_svg": "4d1390489561a93e5413071632cfdab79ca1efbebf55337af2ab462cf1d4b9db"
"test_formats.test_format_svg": "f2471aa700015ced1d4d17cfef58956c0cde50402435f3f996abfc962b55ce8d"
}
9 changes: 0 additions & 9 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ def pytester_path(pytester):


def skip_if_format_unsupported(file_format, using_hashes=False):
if file_format == 'svg' and MPL_VERSION < Version('3.3'):
pytest.skip('SVG comparison is only supported in Matplotlib 3.3 and above')

if using_hashes:

if file_format == 'pdf' and MPL_VERSION < Version('2.1'):
pytest.skip('PDF hashes are only deterministic in Matplotlib 2.1 and above')
elif file_format == 'eps' and MPL_VERSION < Version('2.1'):
pytest.skip('EPS hashes are only deterministic in Matplotlib 2.1 and above')

if using_hashes and not sys.platform.startswith('linux'):
pytest.skip('Hashes for vector graphics are only provided in the hash library for Linux')
Expand Down
1 change: 0 additions & 1 deletion tests/test_deterministic.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def test_mpl():
("true", "", False, False),
],
)
@pytest.mark.skipif(MPL_VERSION < Version("3.3.0"), reason="Test unsupported: Default metadata is different in MPL<3.3")
def test_config(pytester, file_format, ini, cli, kwarg, success_expected):
skip_if_format_unsupported(file_format, using_hashes=True)

Expand Down
16 changes: 3 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{39,310,311,312}-test-mpl{33,34,35,36,37,38}
py{39,310,311,312}-test-mpl{37,38,39,310}
py312-test-mpldev-pytestdev
codestyle
requires =
Expand All @@ -19,20 +19,10 @@ 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.*
mpl30: matplotlib==3.0.*
mpl31: matplotlib==3.1.*
mpl32: matplotlib==3.2.*
mpl33: matplotlib==3.3.*
mpl34: matplotlib==3.4.*
mpl35: matplotlib==3.5.*
mpl36: matplotlib==3.6.*
mpl37: matplotlib==3.7.*
mpl38: matplotlib==3.8.*
mpl39: matplotlib==3.9.*
mpl310: matplotlib==3.10.*
mpldev: matplotlib>=0.0.dev0
pytest54: pytest==5.4.*
pytest60: pytest==6.0.*
Expand Down
Loading