diff --git a/python/celerite2/theano/__init__.py b/python/celerite2/theano/__init__.py new file mode 100644 index 0000000..b98122b --- /dev/null +++ b/python/celerite2/theano/__init__.py @@ -0,0 +1,12 @@ +__all__ = ["terms", "GaussianProcess"] + +import warnings + +warnings.warn( + "The `celerite2.theano` submodule is deprecated; " + "use `celerite2.pymc3` instead", + DeprecationWarning, +) + +from celerite2.pymc3.celerite2 import GaussianProcess +from celerite2.theano import terms diff --git a/python/celerite2/theano/terms.py b/python/celerite2/theano/terms.py new file mode 100644 index 0000000..f6bfbb1 --- /dev/null +++ b/python/celerite2/theano/terms.py @@ -0,0 +1,25 @@ +__all__ = [ + "Term", + "TermSum", + "TermProduct", + "TermDiff", + "TermConvolution", + "RealTerm", + "ComplexTerm", + "SHOTerm", + "Matern32Term", + "RotationTerm", +] + +from celerite2.pymc3.terms import ( + ComplexTerm, + Matern32Term, + RealTerm, + RotationTerm, + SHOTerm, + Term, + TermConvolution, + TermDiff, + TermProduct, + TermSum, +) diff --git a/python/test/pymc3/test_pymc3_celerite2.py b/python/test/pymc3/test_pymc3_celerite2.py index 6594774..3ad49ca 100644 --- a/python/test/pymc3/test_pymc3_celerite2.py +++ b/python/test/pymc3/test_pymc3_celerite2.py @@ -29,6 +29,13 @@ ) +def test_theano_import_warns(): + with pytest.deprecated_call(): + import celerite2.theano + + del celerite2.theano + + @pytest.fixture def data(): np.random.seed(40582)