Skip to content

Commit

Permalink
chore: Release 5.5.0 (#3699)
Browse files Browse the repository at this point in the history
* update RELEASING.md:
 - Remove redundant tag step
 - Explicitly checkout main and check working tree
 - Normalize indentation of CLI commands

* Add expression docstring links to expr class docstring so sphinx finds them

* Add raw_enabled for :raw-html: directive

* Add Generic link

* format

* update user guide with link

* fix raw-html render

* bump version to 5.5.0

* expand urls

* Fix _continuous uniform probability distribution URL
  • Loading branch information
jonmmease authored Nov 23, 2024
1 parent b6481d2 commit b2ff8ce
Show file tree
Hide file tree
Showing 10 changed files with 232 additions and 68 deletions.
59 changes: 28 additions & 31 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@
Remove any existing environments managed by `hatch` so that it will create new ones
with the latest dependencies when executing the commands further below:

hatch env prune
hatch env prune

2. Make certain your branch is in sync with head. If you work on a fork, replace `origin` with `upstream`:
2. Make certain your branch is in sync with head, and that you have no uncommitted modifications. If you work on a fork, replace `origin` with `upstream`:

git pull origin main
git checkout main
git pull origin main
git status # Should show "nothing to commit, working tree clean"

3. Do a clean doc build:

hatch run doc:clean-all
hatch run doc:build-html
hatch run doc:serve
hatch run doc:clean-all
hatch run doc:build-html
hatch run doc:serve

Navigate to http://localhost:8000 and ensure it looks OK (particularly
do a visual scan of the gallery thumbnails).

4. Create a new release branch:

git switch -c version_5.0.0
git switch -c version_5.0.0

5. Update version to, e.g. 5.0.0:

Expand All @@ -28,56 +30,51 @@

6. Commit changes and push:

git add . -u
git commit -m "chore: Bump version to 5.0.0"
git push
git add . -u
git commit -m "chore: Bump version to 5.0.0"
git push

7. Merge release branch into main, make sure that all required checks pass

8. Tag the release:

git tag -a v5.0.0 -m "version 5.0.0 release"
git push origin v5.0.0

9. On main, build source & wheel distributions. If you work on a fork, replace `origin` with `upstream`:
8. On main, build source & wheel distributions. If you work on a fork, replace `origin` with `upstream`:

git switch main
git pull origin main
hatch clean # clean old builds & distributions
hatch build # create a source distribution and universal wheel
git switch main
git pull origin main
hatch clean # clean old builds & distributions
hatch build # create a source distribution and universal wheel

10. publish to PyPI (Requires correct PyPI owner permissions):
9. publish to PyPI (Requires correct PyPI owner permissions):

hatch publish

11. build and publish docs (Requires write-access to altair-viz/altair-viz.github.io):
10. build and publish docs (Requires write-access to altair-viz/altair-viz.github.io):

hatch run doc:publish-clean-build

12. On main, tag the release. If you work on a fork, replace `origin` with `upstream`:
11. On main, tag the release. If you work on a fork, replace `origin` with `upstream`:

git tag -a v5.0.0 -m "Version 5.0.0 release"
git push origin v5.0.0
git tag -a v5.0.0 -m "Version 5.0.0 release"
git push origin v5.0.0

13. Create a new branch:
12. Create a new branch:

git switch -c maint_5.1.0dev

14. Update version and add 'dev' suffix, e.g. 5.1.0dev:
13. Update version and add 'dev' suffix, e.g. 5.1.0dev:

- in ``altair/__init__.py``
- in ``doc/conf.py``

15. Commit changes and push:
14. Commit changes and push:

git add . -u
git commit -m "chore: Bump version to 5.1.0dev"
git push
16. Merge maintenance branch into main
15. Merge maintenance branch into main

17. Double-check that a conda-forge pull request is generated from the updated
16. Double-check that a conda-forge pull request is generated from the updated
pip package by the conda-forge bot (may take up to several hours):
https://github.com/conda-forge/altair-feedstock/pulls

18. Publish a new release in https://github.com/vega/altair/releases/
17. Publish a new release in https://github.com/vega/altair/releases/
2 changes: 1 addition & 1 deletion altair/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ruff: noqa
__version__ = "5.5.0dev"
__version__ = "5.5.0"

# The content of __all__ is automatically written by
# tools/update_init_file.py. Do not modify directly.
Expand Down
113 changes: 111 additions & 2 deletions altair/expr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,115 @@ class expr(_ExprRef, metaclass=_ExprMeta):
}))},
shorthand: 'yval'
})
.. _Number.isNaN:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNan
.. _Number.isFinite:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite
.. _Math.abs:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs
.. _Math.acos:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acos
.. _Math.asin:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asin
.. _Math.atan:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan
.. _Math.atan2:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2
.. _Math.ceil:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil
.. _Math.cos:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos
.. _Math.exp:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/exp
.. _Math.floor:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor
.. _Math.hypot:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot
.. _Math.log:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log
.. _Math.max:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max
.. _Math.min:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min
.. _Math.pow:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow
.. _Math.random:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
.. _Math.round:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round
.. _Math.sin:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sin
.. _Math.sqrt:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt
.. _Math.tan:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tan
.. _normal (Gaussian) probability distribution:
https://en.wikipedia.org/wiki/Normal_distribution
.. _cumulative distribution function:
https://en.wikipedia.org/wiki/Cumulative_distribution_function
.. _probability density function:
https://en.wikipedia.org/wiki/Probability_density_function
.. _log-normal probability distribution:
https://en.wikipedia.org/wiki/Log-normal_distribution
.. _continuous uniform probability distribution:
https://en.wikipedia.org/wiki/Continuous_uniform_distribution
.. _*unit*:
https://vega.github.io/vega/docs/api/time/#time-units
.. _JavaScript's String.replace:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace
.. _d3-format specifier:
https://github.com/d3/d3-format/
.. _*units*:
https://vega.github.io/vega/docs/api/time/#time-units
.. _timeUnitSpecifier API documentation:
https://vega.github.io/vega/docs/api/time/#timeUnitSpecifier
.. _timeFormat:
https://vega.github.io/vega/docs/expressions/#timeFormat
.. _utcFormat:
https://vega.github.io/vega/docs/expressions/#utcFormat
.. _d3-time-format specifier:
https://github.com/d3/d3-time-format/
.. _TimeMultiFormat object:
https://vega.github.io/vega/docs/types/#TimeMultiFormat
.. _UTC:
https://en.wikipedia.org/wiki/Coordinated_Universal_Time
.. _JavaScript's RegExp:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
.. _RGB:
https://en.wikipedia.org/wiki/RGB_color_model
.. _d3-color's rgb function:
https://github.com/d3/d3-color#rgb
.. _HSL:
https://en.wikipedia.org/wiki/HSL_and_HSV
.. _d3-color's hsl function:
https://github.com/d3/d3-color#hsl
.. _CIE LAB:
https://en.wikipedia.org/wiki/Lab_color_space#CIELAB
.. _d3-color's lab function:
https://github.com/d3/d3-color#lab
.. _HCL:
https://en.wikipedia.org/wiki/Lab_color_space#CIELAB
.. _d3-color's hcl function:
https://github.com/d3/d3-color#hcl
.. _W3C Web Content Accessibility Guidelines:
https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
.. _continuous color scheme:
https://vega.github.io/vega/docs/schemes
.. _geoArea:
https://github.com/d3/d3-geo#geoArea
.. _path.area:
https://github.com/d3/d3-geo#path_area
.. _geoBounds:
https://github.com/d3/d3-geo#geoBounds
.. _path.bounds:
https://github.com/d3/d3-geo#path_bounds
.. _geoCentroid:
https://github.com/d3/d3-geo#geoCentroid
.. _path.centroid:
https://github.com/d3/d3-geo#path_centroid
.. _window.screen:
https://developer.mozilla.org/en-US/docs/Web/API/Window/screen
"""

@override
Expand Down Expand Up @@ -643,13 +752,13 @@ def sampleUniform(
cls, min: IntoExpression = None, max: IntoExpression = None, /
) -> Expression:
"""
Returns a sample from a univariate `continuous uniform probability distribution`_) over the interval [``min``, ``max``).
Returns a sample from a univariate `continuous uniform probability distribution`_ over the interval [``min``, ``max``).
If unspecified, ``min`` defaults to ``0`` and ``max`` defaults to ``1``. If only one
argument is provided, it is interpreted as the ``max`` value.
.. _continuous uniform probability distribution:
https://en.wikipedia.org/wiki/Uniform_distribution_(continuous
https://en.wikipedia.org/wiki/Continuous_uniform_distribution
"""
return FunctionExpression("sampleUniform", (min, max))

Expand Down
32 changes: 16 additions & 16 deletions altair/vegalite/v5/schema/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -8308,8 +8308,8 @@ class Radius(FieldChannelMixin, core.PositionFieldDefBase):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -8644,8 +8644,8 @@ class RadiusDatum(DatumChannelMixin, core.PositionDatumDefBase):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -15197,8 +15197,8 @@ class Theta(FieldChannelMixin, core.PositionFieldDefBase):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -15529,8 +15529,8 @@ class ThetaDatum(DatumChannelMixin, core.PositionDatumDefBase):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -17067,8 +17067,8 @@ class X(FieldChannelMixin, core.PositionFieldDef):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -17550,8 +17550,8 @@ class XDatum(DatumChannelMixin, core.PositionDatumDef):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -19306,8 +19306,8 @@ class Y(FieldChannelMixin, core.PositionFieldDef):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -19789,8 +19789,8 @@ class YDatum(DatumChannelMixin, core.PositionDatumDef):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down
16 changes: 8 additions & 8 deletions altair/vegalite/v5/schema/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15216,8 +15216,8 @@ class PositionDatumDefBase(PolarDef):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -15410,8 +15410,8 @@ class PositionDatumDef(PositionDef):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -15681,8 +15681,8 @@ class PositionFieldDef(PositionDef):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down Expand Up @@ -15963,8 +15963,8 @@ class PositionFieldDefBase(PolarDef):
stacked bar and area charts
<https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
`with percentage tooltip
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__). :raw-html:`<br/>`
-``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).
* ``"center"`` - stacking with center baseline (for `streamgraph
<https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
* ``null`` or ``false`` - No-stacking. This will produce layered `bar
<https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
# built documents.
#
# The short X.Y version.
version = "5.5.0dev"
version = "5.5.0"
# The full version, including alpha/beta/rc tags.
release = f"{version}"

Expand Down
2 changes: 2 additions & 0 deletions doc/user_guide/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -791,3 +791,5 @@ Typing
Optional
is_chart_type

.. _Generic:
https://typing.readthedocs.io/en/latest/spec/generics.html#generics
Loading

0 comments on commit b2ff8ce

Please sign in to comment.