diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c69f57393..13e9b62234 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,10 @@ ### New features - Use revised Pareto k threshold ([2349](https://github.com/arviz-devs/arviz/pull/2349)) - - Added arguments `ci_prob`, `eval_points`, `rvs`, and `random_state` to `plot_ecdf` ([2316](https://github.com/arviz-devs/arviz/pull/2316)) - Deprecated rcParam `stats.hdi_prob` and replaced with `stats.ci_prob` ([2316](https://github.com/arviz-devs/arviz/pull/2316)) +- Expose features from [arviz-base](https://arviz-base.readthedocs.io), [arviz-stats](https://arviz-stats.readthedocs.io) and [arviz-plots](https://arviz-plots.readthedocs.io) as `arviz.preview` + submodule ([2361](https://github.com/arviz-devs/arviz/pull/2361)) ### Maintenance and fixes - Ensure support with numpy 2.0 ([2321](https://github.com/arviz-devs/arviz/pull/2321)) diff --git a/arviz/__init__.py b/arviz/__init__.py index 7930700e19..548d8b600f 100644 --- a/arviz/__init__.py +++ b/arviz/__init__.py @@ -37,6 +37,7 @@ def _log( from .rcparams import rc_context, rcParams from .utils import Numba, Dask, interactive_backend from .wrappers import * +from . import preview # add ArviZ's styles to matplotlib's styles _arviz_style_path = os.path.join(os.path.dirname(__file__), "plots", "styles") diff --git a/arviz/preview.py b/arviz/preview.py new file mode 100644 index 0000000000..f498d11e14 --- /dev/null +++ b/arviz/preview.py @@ -0,0 +1,17 @@ +# pylint: disable=unused-import,unused-wildcard-import,wildcard-import +"""Expose features from arviz-xyz refactored packages inside ``arviz.preview`` namespace.""" + +try: + from arviz_base import * +except ModuleNotFoundError: + pass + +try: + import arviz_stats +except ModuleNotFoundError: + pass + +try: + from arviz_plots import * +except ModuleNotFoundError: + pass diff --git a/setup.py b/setup.py index e5f17cc37b..7d5abc7d39 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,10 @@ def get_version(): url="http://github.com/arviz-devs/arviz", packages=find_packages(), install_requires=get_requirements(), - extras_require=dict(all=get_requirements_optional()), # test=get_requirements_dev(), + extras_require={ + "all": get_requirements_optional(), + "preview": ["arviz-base[h5netcdf]", "arviz-stats[xarray]", "arviz-plots"], + }, long_description=get_long_description(), long_description_content_type="text/markdown", include_package_data=True,