Skip to content

Commit 1c4dba3

Browse files
authored
Prepare 0.23 release (#2499)
* update warning, version and changelog * cmdstanpy 2.0 support only in arviz-base * update 404 page * remove deprecated GHA * double check public namespaces * pylint
1 parent 4db6129 commit 1c4dba3

File tree

9 files changed

+76
-87
lines changed

9 files changed

+76
-87
lines changed

.azure-pipelines/azure-pipelines-external.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
Python_311_Special_versions:
2020
python.version: "3.11"
21-
cmdstanpy.version: "github"
21+
cmdstanpy.version: "latest"
2222
emcee.version: 2
2323
name: "External special"
2424

.github/workflows/rtd_link_description.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
# Change Log
22

3-
## v0.x.x Unreleased
4-
5-
### New features
3+
## v0.23.0 (2025 Des 9)
64

75
### Maintenance and fixes
86
- Fix numpyro jax incompatibility. ([2465](https://github.com/arviz-devs/arviz/pull/2465))
97
- Avoid closing unloaded files in `from_netcdf()` ([2463](https://github.com/arviz-devs/arviz/issues/2463))
108
- Fix sign error in lp parsed in from_numpyro ([2468](https://github.com/arviz-devs/arviz/issues/2468))
119
- Fix attrs persistance in idata-datatree conversions ([2476](https://github.com/arviz-devs/arviz/issues/2476))
1210

13-
### Deprecation
14-
15-
### Documentation
16-
1711
## v0.22.0 (2025 Jul 9)
1812

1913
### New features

arviz/__init__.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# pylint: disable=wildcard-import,invalid-name,wrong-import-position
22
"""ArviZ is a library for exploratory analysis of Bayesian models."""
3-
__version__ = "0.23.0.dev0"
3+
__version__ = "0.23.0"
44

55
import logging
66
import os
7-
import warnings
8-
import datetime
9-
from pathlib import Path
7+
import re
108

119
from matplotlib.colors import LinearSegmentedColormap
1210
from matplotlib.pyplot import style
@@ -15,6 +13,17 @@
1513

1614

1715
def _warn_once_per_day():
16+
from .preview import info
17+
18+
# skip warning if all 3 arviz subpackages are already installed
19+
pat = re.compile(r"arviz_(base|stats|plots) available")
20+
if len(pat.findall(info)) == 3:
21+
return
22+
23+
import datetime
24+
from warnings import warn
25+
from pathlib import Path
26+
1827
warning_dir = Path.home() / "arviz_data"
1928
warning_dir.mkdir(exist_ok=True)
2029

@@ -27,7 +36,7 @@ def _warn_once_per_day():
2736
last_date = None
2837

2938
if last_date != today:
30-
warnings.warn(
39+
warn(
3140
"\nArviZ is undergoing a major refactor to improve flexibility and extensibility "
3241
"while maintaining a user-friendly interface."
3342
"\nSome upcoming changes may be backward incompatible."
@@ -364,4 +373,4 @@ def _mpl_cm(name, colorlist):
364373

365374

366375
# clean namespace
367-
del os, logging, LinearSegmentedColormap, Logger, mpl
376+
del os, re, logging, version, LinearSegmentedColormap, Logger, mpl

arviz/preview.py

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,51 @@
88

99
try:
1010
from arviz_base import *
11+
import arviz_base as base
1112

12-
status = "arviz_base available, exposing its functions as part of arviz.preview"
13-
_log.info(status)
13+
_status = "arviz_base available, exposing its functions as part of arviz.preview"
14+
_log.info(_status)
1415
except ModuleNotFoundError:
15-
status = "arviz_base not installed"
16-
_log.info(status)
16+
_status = "arviz_base not installed"
17+
_log.info(_status)
1718
except ImportError:
18-
status = "Unable to import arviz_base"
19-
_log.info(status, exc_info=True)
19+
_status = "Unable to import arviz_base"
20+
_log.info(_status, exc_info=True)
2021

21-
info += status + "\n"
22+
info += _status + "\n"
2223

2324
try:
2425
from arviz_stats import *
2526

26-
status = "arviz_stats available, exposing its functions as part of arviz.preview"
27-
_log.info(status)
27+
# the base computational module fron arviz_stats will override the alias to arviz-base
28+
# arviz.stats.base will still be available
29+
import arviz_base as base
30+
import arviz_stats as stats
31+
32+
_status = "arviz_stats available, exposing its functions as part of arviz.preview"
33+
_log.info(_status)
2834
except ModuleNotFoundError:
29-
status = "arviz_stats not installed"
30-
_log.info(status)
35+
_status = "arviz_stats not installed"
36+
_log.info(_status)
3137
except ImportError:
32-
status = "Unable to import arviz_stats"
33-
_log.info(status, exc_info=True)
34-
info += status + "\n"
38+
_status = "Unable to import arviz_stats"
39+
_log.info(_status, exc_info=True)
40+
info += _status + "\n"
3541

3642
try:
3743
from arviz_plots import *
44+
import arviz_plots as plots
3845

39-
status = "arviz_plots available, exposing its functions as part of arviz.preview"
40-
_log.info(status)
46+
_status = "arviz_plots available, exposing its functions as part of arviz.preview"
47+
_log.info(_status)
4148
except ModuleNotFoundError:
42-
status = "arviz_plots not installed"
43-
_log.info(status)
49+
_status = "arviz_plots not installed"
50+
_log.info(_status)
4451
except ImportError:
45-
status = "Unable to import arviz_plots"
46-
_log.info(status, exc_info=True)
52+
_status = "Unable to import arviz_plots"
53+
_log.info(_status, exc_info=True)
54+
55+
info += _status + "\n"
4756

48-
info += status + "\n"
57+
# clean namespace
58+
del logging, _status, _log

doc/_templates/404.html

Lines changed: 0 additions & 27 deletions
This file was deleted.

doc/source/404.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
html_theme.sidebar_secondary.remove:
3+
orphan:
4+
---
5+
6+
:::{title}
7+
Page not found
8+
:::
9+
10+
:::{card} 404 - Page not found
11+
:img-top: _static/404.png
12+
13+
Sorry, it looks like your sampler ventured to an undefined region of the documentation space.
14+
15+
The page you are looking for could not be found.
16+
17+
The navbar can help you find the page you are looking for.
18+
Otherwise you can go back to the [documentation homepage](https://python.arviz.org).
19+
:::

doc/source/conf.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
# This patterns also effect to html_static_path and html_extra_path
162162
exclude_patterns = ["_build", "build", "Thumbs.db", ".DS_Store", "notebooks/.ipynb_checkpoints"]
163163
# configure notfound extension to not add any prefix to the urls
164-
notfound_urls_prefix = "/en/latest/"
164+
notfound_urls_prefix = "/en/stable/"
165165

166166
# The name of the Pygments (syntax highlighting) style to use.
167167
pygments_style = "sphinx"
@@ -220,7 +220,7 @@
220220
"doc_path": "doc/source/",
221221
"default_mode": "light",
222222
}
223-
html_sidebars: Dict[str, Any] = {"index": []}
223+
html_sidebars: Dict[str, Any] = {"index": [], "404": [], "community": []}
224224

225225
# Add any paths that contain custom static files (such as style sheets) here,
226226
# relative to this directory. They are copied after the builtin static files,
@@ -229,11 +229,6 @@
229229
html_static_path = ["_static"]
230230
html_css_files = ["custom.css"]
231231

232-
# use additional pages to add a 404 page
233-
html_additional_pages = {
234-
"404": "404.html",
235-
}
236-
237232
# -- Options for HTMLHelp output ------------------------------------------
238233

239234
# Output file base name for HTML help builder.

doc/source/user_guide/migration_guide.ipynb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
"and exposes all their elements through the `arviz.preview` namespace. In the future, with the ArviZ 1.0 release, the `arviz` namespace will look\n",
2929
"like `arviz.preview` looks like today.\n",
3030
"\n",
31+
":::{info}\n",
32+
"Starting with version 0.23.0, ArviZ will emit a warning once a day at import time informing about the upcoming major version.\n",
33+
"You can install arviz-base, arviz-stats and arviz-plots to silence this warning completely.\n",
34+
":::\n",
35+
"\n",
3136
"We encourage you to try it out and get a head start on the migration!"
3237
]
3338
},
@@ -15046,7 +15051,7 @@
1504615051
],
1504715052
"metadata": {
1504815053
"kernelspec": {
15049-
"display_name": "arviz",
15054+
"display_name": "Python 3 (ipykernel)",
1505015055
"language": "python",
1505115056
"name": "python3"
1505215057
},
@@ -15060,7 +15065,7 @@
1506015065
"name": "python",
1506115066
"nbconvert_exporter": "python",
1506215067
"pygments_lexer": "ipython3",
15063-
"version": "3.13.5"
15068+
"version": "3.12.12"
1506415069
}
1506515070
},
1506615071
"nbformat": 4,

0 commit comments

Comments
 (0)