Skip to content

Commit

Permalink
expose new features as preview submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
OriolAbril committed Jul 19, 2024
1 parent 979687c commit b1ebb2a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions arviz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
17 changes: 17 additions & 0 deletions arviz/preview.py
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b1ebb2a

Please sign in to comment.