Skip to content

Commit 6b122a3

Browse files
Support pymc for 3.13 (#653)
1 parent 70fa97e commit 6b122a3

5 files changed

+2
-19
lines changed

preliz/tests/predictive_explorer.ipynb

-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
"metadata": {},
88
"outputs": [],
99
"source": [
10-
"%matplotlib inline\n",
11-
"import sys\n",
12-
"\n",
1310
"import ipytest\n",
1411
"import pytest\n",
1512
"\n",
@@ -82,7 +79,6 @@
8279
" return model\n",
8380
" return a_pymc_model\n",
8481
"\n",
85-
"@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason=\"Skipping for Python 3.13 and above\")\n",
8682
"@pytest.mark.parametrize(\"iterations, kind_plot\", [\n",
8783
" (50, \"hist\"),\n",
8884
" (10, \"kde\"),\n",
@@ -117,7 +113,6 @@
117113
" return a_model\n",
118114
" return a_bambi_model\n",
119115
"\n",
120-
"@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason=\"Skipping for Python 3.13 and above\")\n",
121116
"@pytest.mark.parametrize(\"iterations, kind_plot\", [\n",
122117
" (50, \"hist\"),\n",
123118
" (10, \"kde\"),\n",

preliz/tests/test_distributions.py

-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sys
2-
31
import numpy as np
42
import pytest
53
from numpy.testing import assert_almost_equal
@@ -293,7 +291,6 @@ def test_ppf(a_few_poissons):
293291
assert result2 == 4.0
294292

295293

296-
@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason="Skipping for Python 3.13 and above")
297294
def test_to_pymc():
298295
with Model() as model:
299296
Gamma(1, 1).to_pymc("a", shape=(2, 2))
@@ -310,7 +307,6 @@ def test_to_pymc():
310307
assert Censored(Normal(0, 1), lower=0).to_pymc().ndim == 0
311308

312309

313-
@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason="Skipping for Python 3.13 and above")
314310
def test_to_bambi():
315311
bambi_prior = Gamma(mu=2, sigma=1).to_bambi()
316312
assert bambi_prior.name == "Gamma"

preliz/tests/test_posterior_to_prior.py

-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import sys
2-
31
import pandas as pd
4-
import pytest
52

63
from preliz.distributions import Gamma, LogNormal, Normal
74
from preliz.ppls.agnostic import posterior_to_prior
@@ -22,7 +19,6 @@
2219
pass
2320

2421

25-
@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason="Skipping for Python 3.13 and above")
2622
def test_p2p_pymc():
2723
posterior_to_prior(model, idata)
2824
assert 'Gamma\x1b[0m("b", alpha=' in posterior_to_prior(model, idata, new_families="auto")
@@ -49,7 +45,6 @@ def test_p2p_pymc():
4945
pass
5046

5147

52-
@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason="Skipping for Python 3.13 and above")
5348
def test_p2p_bambi():
5449
posterior_to_prior(bmb_model, bmb_idata)
5550
posterior_to_prior(bmb_model, bmb_idata, new_families="auto")

preliz/tests/test_ppe.py

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sys
2-
31
import numpy as np
42

53
try:
@@ -14,7 +12,6 @@
1412
np.random.seed(42)
1513

1614

17-
@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason="Skipping for Python 3.13 and above")
1815
@pytest.mark.parametrize(
1916
"params",
2017
[

requirements-dev.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ nbformat
99
lxml
1010
ipykernel
1111
pandas
12-
pymc>=5.16.0; python_version<"3.13"
13-
bambi>=0.13.0; python_version<"3.13"
12+
pymc>=5.16.0
13+
bambi>=0.13.0
1414
ruff

0 commit comments

Comments
 (0)