Skip to content

Commit 57935f3

Browse files
authored
Adding support for Python 3.10 (#247)
* Adding support for Python 3.10 * make batman tests optional * cleanup
1 parent 55124ff commit 57935f3

File tree

5 files changed

+11
-21
lines changed

5 files changed

+11
-21
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.9"]
21-
pymc-version: ["3.9", "3.10", "3.11", "dev"]
20+
python-version: ["3.9", "3.10"]
21+
pymc-version: ["3.11", "dev"]
2222
include:
23-
- python-version: "3.8"
24-
pymc-version: "3.11"
23+
- python-version: "3.10"
24+
pymc-version: "beta"
2525

2626
steps:
2727
- name: Checkout

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"pytest",
3737
"coverage[toml]",
3838
"pytest-env",
39-
"batman-package",
4039
],
4140
"docs": [
4241
"sphinx-book-theme",

tests/light_curves_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ def test_contact_bug():
170170

171171

172172
def test_small_star():
173+
pytest.importorskip("batman.transitmodel")
173174
from batman.transitmodel import TransitModel, TransitParams
174175

175176
u_star = [0.2, 0.1]

tests/orbits/keplerian_test.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,9 @@
1515
)
1616
from exoplanet.units import with_unit
1717

18-
try:
19-
import batman
20-
except ImportError:
21-
batman = None
2218

23-
24-
@pytest.mark.skipif(batman is None, reason="batman is not installed")
2519
def test_sky_coords():
26-
from batman import _rsky
20+
_rsky = pytest.importorskip("batman._rsky")
2721

2822
t = np.linspace(-100, 100, 1000)
2923

@@ -319,9 +313,8 @@ def test_in_transit_circ():
319313
assert np.all(inds == inds_circ)
320314

321315

322-
@pytest.mark.skipif(batman is None, reason="batman is not installed")
323316
def test_small_star():
324-
from batman import _rsky
317+
_rsky = pytest.importorskip("batman._rsky")
325318

326319
m_star = 0.151
327320
r_star = 0.189

tox.ini

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
[tox]
2-
envlist = py{38,39}-pymc{39,310,311,dev},lint,docs
2+
envlist = py{38,39,310}-pymc{311,dev},lint,docs
33

44
[gh-actions]
55
python =
66
3.8: py38
77
3.9: py39
8+
3.10: py310
89

910
[gh-actions:env]
1011
PYMC_VERSION =
11-
3.9: pymc39
12-
3.10: pymc310
1312
3.11: pymc311
1413
dev: pymcdev
1514

1615
[testenv]
1716
passenv = GITHUB_*
1817
deps =
19-
pymc{39,310}: arviz<0.11
20-
pymc39: pymc3~=3.9.0
21-
pymc310: pymc3~=3.10.0
18+
numpy<1.22
2219
pymc311: pymc3~=3.11.0
23-
pymcdev: https://github.com/pymc-devs/pymc3/archive/v3.zip
20+
pymcdev: https://github.com/pymc-devs/pymc/archive/v3.zip
2421
extras = test
2522
commands =
2623
pip freeze

0 commit comments

Comments
 (0)