Skip to content

Commit

Permalink
Merge pull request #39 from astrofrog/update-infrastructure
Browse files Browse the repository at this point in the history
Update CI infrastructure
  • Loading branch information
astrofrog committed Jul 4, 2023
2 parents 2a5551f + 5d8381b commit a890fa4
Show file tree
Hide file tree
Showing 48 changed files with 59 additions and 48 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
pull_request:

jobs:

tests:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
coverage: codecov
runs-on: |
linux: ubuntu-latest
envs: |
# Code style
- linux: codestyle
# Linux builds - test on all supported Matplotlib versions
- linux: py38-test-mpl33
- linux: py39-test-mpl34
- linux: py39-test-mpl35
- linux: py310-test-mpl36
- linux: py310-test-mpl37
- linux: py311-test-mpldev
# MacOS X and Windows builds - alternative Matplotlib versions
- windows: py38-test-mpl33
- macos: py39-test-mpl34
- windows: py39-test-mpl35
- macos: py310-test-mpl36
- windows: py310-test-mpl37
- windows: py311-test-mpldev
# Image tests
- linux: py311-test-mpl38-image
publish:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
with:
test_extras: test
test_command: pytest --pyargs mpl_scatter_density
secrets:
pypi_token: ${{ secrets.pypi_token }}
38 changes: 0 additions & 38 deletions azure-pipelines.yml

This file was deleted.

4 changes: 2 additions & 2 deletions mpl_scatter_density/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

baseline_root = 'baseline'

if MPL_VERSION >= LooseVersion('2'): # pragma: nocover
baseline_subdir = '2.0.x'
if MPL_VERSION >= LooseVersion('3'): # pragma: nocover
baseline_subdir = '3.0.x'
else: # pragma: nocover
raise ValueError('Matplotlib {0} is not supported'.format(matplotlib.__version__))

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 8 additions & 7 deletions mpl_scatter_density/tests/test_scatter_density_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from unittest.mock import MagicMock, Mock
import pytest
import numpy as np
from matplotlib import rc_context
import matplotlib.pyplot as plt

try:
Expand Down Expand Up @@ -218,13 +219,13 @@ def test_downres_ignore_unity(self, tmpdir):

def test_default_dpi(self, tmpdir):

self.fig.set_dpi(90)
a = ScatterDensityArtist(self.ax, self.x1, self.y1, dpi=None)
self.ax.add_artist(a)
# We can't just draw, we need to save, as not all backends actually
# draw when calling figure.canvas.draw()
self.ax.figure.savefig(tmpdir.join('test.png').strpath)
assert a.get_size() == (216, 216)
with rc_context({'savefig.dpi': 90}):
a = ScatterDensityArtist(self.ax, self.x1, self.y1, dpi=None)
self.ax.add_artist(a)
# We can't just draw, we need to save, as not all backends actually
# draw when calling figure.canvas.draw()
self.ax.figure.savefig(tmpdir.join('test.png').strpath)
assert a.get_size() == (216, 216)

def test_downres_ignore_other_tools(self, tmpdir):

Expand Down
6 changes: 5 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{36,37,38}-test{-mpl30,-mpl31,-mpl32,-mpl33,-mpldev}{,-image}
py{36,37,38,39,310,311}-test{,-image}
codestyle
requires =
setuptools >= 30.3.0
Expand All @@ -17,6 +17,10 @@ deps =
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.*
mpldev: git+https://github.com/matplotlib/matplotlib.git#egg=matplotlib
extras =
test
Expand Down

0 comments on commit a890fa4

Please sign in to comment.