Skip to content

Commit

Permalink
Support pymc for 3.13 (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanbabbar04 authored Feb 28, 2025
1 parent 70fa97e commit 6b122a3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 19 deletions.
5 changes: 0 additions & 5 deletions preliz/tests/predictive_explorer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import sys\n",
"\n",
"import ipytest\n",
"import pytest\n",
"\n",
Expand Down Expand Up @@ -82,7 +79,6 @@
" return model\n",
" return a_pymc_model\n",
"\n",
"@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason=\"Skipping for Python 3.13 and above\")\n",
"@pytest.mark.parametrize(\"iterations, kind_plot\", [\n",
" (50, \"hist\"),\n",
" (10, \"kde\"),\n",
Expand Down Expand Up @@ -117,7 +113,6 @@
" return a_model\n",
" return a_bambi_model\n",
"\n",
"@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason=\"Skipping for Python 3.13 and above\")\n",
"@pytest.mark.parametrize(\"iterations, kind_plot\", [\n",
" (50, \"hist\"),\n",
" (10, \"kde\"),\n",
Expand Down
4 changes: 0 additions & 4 deletions preliz/tests/test_distributions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import sys

import numpy as np
import pytest
from numpy.testing import assert_almost_equal
Expand Down Expand Up @@ -293,7 +291,6 @@ def test_ppf(a_few_poissons):
assert result2 == 4.0


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


@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason="Skipping for Python 3.13 and above")
def test_to_bambi():
bambi_prior = Gamma(mu=2, sigma=1).to_bambi()
assert bambi_prior.name == "Gamma"
Expand Down
5 changes: 0 additions & 5 deletions preliz/tests/test_posterior_to_prior.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import sys

import pandas as pd
import pytest

from preliz.distributions import Gamma, LogNormal, Normal
from preliz.ppls.agnostic import posterior_to_prior
Expand All @@ -22,7 +19,6 @@
pass


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


@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason="Skipping for Python 3.13 and above")
def test_p2p_bambi():
posterior_to_prior(bmb_model, bmb_idata)
posterior_to_prior(bmb_model, bmb_idata, new_families="auto")
Expand Down
3 changes: 0 additions & 3 deletions preliz/tests/test_ppe.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import sys

import numpy as np

try:
Expand All @@ -14,7 +12,6 @@
np.random.seed(42)


@pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason="Skipping for Python 3.13 and above")
@pytest.mark.parametrize(
"params",
[
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ nbformat
lxml
ipykernel
pandas
pymc>=5.16.0; python_version<"3.13"
bambi>=0.13.0; python_version<"3.13"
pymc>=5.16.0
bambi>=0.13.0
ruff

0 comments on commit 6b122a3

Please sign in to comment.