Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

expose new features as preview submodule #2361

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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