Skip to content

Commit 1401a06

Browse files
authored
expose new features as preview submodule (#2361)
1 parent 2bd2570 commit 1401a06

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
### New features
66
- Use revised Pareto k threshold ([2349](https://github.com/arviz-devs/arviz/pull/2349))
7-
87
- Added arguments `ci_prob`, `eval_points`, `rvs`, and `random_state` to `plot_ecdf` ([2316](https://github.com/arviz-devs/arviz/pull/2316))
98
- Deprecated rcParam `stats.hdi_prob` and replaced with `stats.ci_prob` ([2316](https://github.com/arviz-devs/arviz/pull/2316))
9+
- 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`
10+
submodule ([2361](https://github.com/arviz-devs/arviz/pull/2361))
1011

1112
### Maintenance and fixes
1213
- Ensure support with numpy 2.0 ([2321](https://github.com/arviz-devs/arviz/pull/2321))

arviz/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def _log(
3737
from .rcparams import rc_context, rcParams
3838
from .utils import Numba, Dask, interactive_backend
3939
from .wrappers import *
40+
from . import preview
4041

4142
# add ArviZ's styles to matplotlib's styles
4243
_arviz_style_path = os.path.join(os.path.dirname(__file__), "plots", "styles")

arviz/preview.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# pylint: disable=unused-import,unused-wildcard-import,wildcard-import
2+
"""Expose features from arviz-xyz refactored packages inside ``arviz.preview`` namespace."""
3+
4+
try:
5+
from arviz_base import *
6+
except ModuleNotFoundError:
7+
pass
8+
9+
try:
10+
import arviz_stats
11+
except ModuleNotFoundError:
12+
pass
13+
14+
try:
15+
from arviz_plots import *
16+
except ModuleNotFoundError:
17+
pass

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ def get_version():
5454
url="http://github.com/arviz-devs/arviz",
5555
packages=find_packages(),
5656
install_requires=get_requirements(),
57-
extras_require=dict(all=get_requirements_optional()), # test=get_requirements_dev(),
57+
extras_require={
58+
"all": get_requirements_optional(),
59+
"preview": ["arviz-base[h5netcdf]", "arviz-stats[xarray]", "arviz-plots"],
60+
},
5861
long_description=get_long_description(),
5962
long_description_content_type="text/markdown",
6063
include_package_data=True,

0 commit comments

Comments
 (0)