Skip to content

Commit

Permalink
Merge pull request #3956 from neutrinoceros/py311_CI
Browse files Browse the repository at this point in the history
TST: start testing on Python 3.11
  • Loading branch information
matthewturk authored Jul 13, 2022
2 parents 0d45a83 + b6c2c9f commit aeb4d05
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/bleeding-edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
# the '-dev' suffix allows to use alphas and betas if no final release is available yet
# this version should be upgraded as often as possible, typically once a year when numpy
# and Cython are known to be compatible
# for next update (to '3.11-dev', 2022), see https://github.com/numpy/numpy/pull/21308
python-version: '3.10-dev'
python-version: '3.11-dev'

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ install_requires =
numpy>=1.14.5
packaging>=20.9
pyparsing>0.0 # hard dependency to MPL. We require it (unconstrained) in case MPL drops it in the future
tomli>=1.2.3
tomli-w>=0.4.0
tqdm>=3.4.0
unyt>=2.8.0
tomli>=1.2.3;python_version < '3.11'
python_requires = >=3.7,<3.12
include_package_data = True
scripts = scripts/iyt
Expand Down Expand Up @@ -102,9 +102,9 @@ minimal =
matplotlib==2.2.3
more-itertools==8.4
numpy==1.14.5
tomli==1.2.3
tomli-w==0.4.0
unyt==2.8.0
tomli==1.2.3;python_version < '3.11'
test =
codecov~=2.0.15
coverage~=4.5.1
Expand Down
8 changes: 6 additions & 2 deletions yt/utilities/configure.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import os
import sys
import warnings
from typing import Callable, List

# TODO: import tomllib from the standard library instead in Python >= 3.11
import tomli as tomllib
import tomli_w
from more_itertools import always_iterable

from yt.utilities.configuration_tree import ConfigLeaf, ConfigNode

if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib

configuration_callbacks: List[Callable[["YTConfig"], None]] = []


Expand Down
1 change: 0 additions & 1 deletion yt/visualization/volume_rendering/tests/test_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ def test_composite_vr(self):
im = sc.render()
im = ImageArray(im.d)
im.write_png("composite.png")
return im
1 change: 0 additions & 1 deletion yt/visualization/volume_rendering/tests/test_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,3 @@ def test_points_vr(self):
sc.add_source(points_source)
im = sc.render()
im.write_png("points.png")
return im
2 changes: 0 additions & 2 deletions yt/visualization/volume_rendering/tests/test_save_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ def test_save_render(self):
# save a different format with/without sigma clips
sc.save(os.path.join(self.tmpdir, "no_clip.jpg"), render=False)
sc.save(os.path.join(self.tmpdir, "clip_2.jpg"), sigma_clip=2, render=False)

return sc
3 changes: 1 addition & 2 deletions yt/visualization/volume_rendering/tests/test_simple_vr.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ def tearDown(self):

def test_simple_vr(self):
ds = fake_random_ds(32)
im, sc = yt.volume_render(ds, fname="test.png", sigma_clip=4.0)
return im, sc
_im, _sc = yt.volume_render(ds, fname="test.png", sigma_clip=4.0)

0 comments on commit aeb4d05

Please sign in to comment.