Skip to content

v0.6.0rc1

Pre-release
Pre-release
Compare
Choose a tag to compare
@dfm dfm released this 16 Apr 15:27
· 10 commits to main since this release
c4eceb4
Support PyMC v5 (#309)

* Implementing support for pymc v4

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* workflow error

* workflow

* allow python version for lint

* getting distributions to work

* some tweaks for pymc3

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* pymc3 fixes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refactoring distributions again

* docstrings for distributions

* starting to re-write docs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* lint and starting to update tutorials

* fixing some eccentricity dist issues

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updating docs

* updating citations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update README [ci skip]

* making orphan page [ci skip]

* Require PyMC < 5 for PyMC v4 version of exoplanet

* Require pymc >= 5 in setup.py

Left TODO comments about other exoplanet-dev packages. No released version yet but their main branch has support for pymc >= 5

* Replace aesara by pytensor and pymc4 by pymc

The actual imports are in the compat module, but I updated `at` to `pt`.
That way `exoplanet` stays up to date with latest "notation" for `pytensor.tensor`

* Add upper limit on xarray for pymc3

Causes numpy error for Python >= 3.9 otherwise

* Accept pre-commit changes on tutorial notebooks

* Replace `AESARA_FLAGS` by `PYTENSOR_FLAGS` in `pytest.ini`

* Update docs from PyMC 4 to PyMC 5 (mostly pytensor -> Aesara)

* Comment-out warnings in `docs_setup()` with TODO to maybe remove them

* TODO comment for deprecated `pt.opt.Assert`

* Update `Evaluator()` call to use `model` kwarg

* Replace testval by initval and start by initvals

* Enable using kipping13 prior when eccentricity is a derived parameter

In PyMC 3, we could just used `observed=ecc` with any distribution.
In PyMC >= 5, we need to use a `pm.Potential`

* Add `_truncate_dist` helper function for eccentricity prior

* Fix vanelyen19 prior when eccentricity is a derived parameter

Same as kipping13: if eccentricity is "observed" (derived), extra prior must be a `pm.Potential`

* Test `angle()` and `unit_disk()` distributions and fix shape error

Previously, default initval was hardcoded so passing shape without initval caused error. Added failing tests and fixed

* Pop initval when ecc is None only when bounds are set

* Clean-up `_truncate_dist()` helper function

* Raise `NotImplementedError` when trying to pass observed ecc with bounds in kipping13

This did not work with the original PyMC3 implementation either, but is supported in PyMC 5.
This error makes it a bit clearer

* Test eccentricity priors with and without bounds

* Update required Python version from 3.6 to 3.8 in docs

* Convert shape from `int` to `tuple` for pymc>3 in impact parameter distribution

* Remove deprecated `pt.opt.Assert` in favor of `Assert` from `compat`

* Remove leftover commented-out warning filters

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Replace tox dependency by nox

* Check that kipping13_observed raises error with bounds when using PyMC3

* Get shape using `tag.test_value` for PyMC3 tests

`type.shape` works only in PyMC > 3

* Remove extra potential in vaneylen19 distribution PyMC 3 version

The implementation that worked with PyMC v5 did not in PyMC3

* Update dependency versions for PyMC v5

* Add `exoplanet-core` dependency to `docs`

Had to remove from the main dependencies because no of the different versions for PyMC3 and PyMC 5

* Another merge conflict

* Range of tests for deps

* Don't install coverage

---------

Co-authored-by: Dan F-M <foreman.mackey@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>