Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update to Vega-Lite 5.15.1 #3206

Merged
merged 13 commits into from
Oct 3, 2023
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ git switch -c <your-branch-name>

With this branch checked-out, make the desired changes to the package.

A large part of Altair's code base is automatically generated.
After you have made your manual changes,
make sure to run the following to see if there are any changes
to the automatically generated files: `python tools/generate_schema_wrapper.py`.

For information on how to update the Vega-Lite version that Altair uses,
please read [the maintainers' notes](NOTES_FOR_MAINTAINERS.md).

### Testing your Changes

Before suggesting your contributing your changing to the main Altair repository,
Expand Down
5 changes: 2 additions & 3 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
1. Create a new virtual environment following the instructions in `CONTRIBUTING.md`.
Make sure to also install all dependencies for the documentation including `altair_saver`
and uninstall `vl-convert-python` (this is not needed for normal contributions to the repo, see `CONTRIBUTING.md` for details).
1. Create a new virtual environment following the instructions in `CONTRIBUTING.md`.
Make sure to also install all dependencies for the documentation.
joelostblom marked this conversation as resolved.
Show resolved Hide resolved

2. Make certain your branch is in sync with head:

Expand Down
2 changes: 1 addition & 1 deletion altair/utils/_importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def import_vegafusion() -> ModuleType:


def import_vl_convert() -> ModuleType:
min_version = "0.13.0"
min_version = "0.14.0"
try:
version = importlib_version("vl-convert-python")
if Version(version) < Version(min_version):
Expand Down
4 changes: 2 additions & 2 deletions altair/vegalite/v5/schema/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ruff: noqa
from .core import *
from .channels import *
SCHEMA_VERSION = 'v5.14.1'
SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v5.14.1.json'
SCHEMA_VERSION = 'v5.15.1'
SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v5.15.1.json'
33 changes: 25 additions & 8 deletions altair/vegalite/v5/schema/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7054,6 +7054,13 @@ class IntervalSelectionConfig(VegaLiteSchema):
An array of encoding channels. The corresponding data field values must match for a
data tuple to fall within the selection.

**See also:** The `projection with encodings and fields section
<https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
documentation.
fields : List(:class:`FieldName`)
An array of field names whose values must match for a data tuple to fall within the
selection.

Comment on lines +7057 to +7063
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in vega/vega-lite#9066 (comment), this is incorrect and will likely be removed in 5.16

**See also:** The `projection with encodings and fields section
<https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
documentation.
Expand Down Expand Up @@ -7121,10 +7128,11 @@ class IntervalSelectionConfig(VegaLiteSchema):
"""
_schema = {'$ref': '#/definitions/IntervalSelectionConfig'}

def __init__(self, type=Undefined, clear=Undefined, encodings=Undefined, mark=Undefined,
on=Undefined, resolve=Undefined, translate=Undefined, zoom=Undefined, **kwds):
def __init__(self, type=Undefined, clear=Undefined, encodings=Undefined, fields=Undefined,
mark=Undefined, on=Undefined, resolve=Undefined, translate=Undefined, zoom=Undefined,
**kwds):
super(IntervalSelectionConfig, self).__init__(type=type, clear=clear, encodings=encodings,
mark=mark, on=on, resolve=resolve,
fields=fields, mark=mark, on=on, resolve=resolve,
translate=translate, zoom=zoom, **kwds)


Expand All @@ -7150,6 +7158,13 @@ class IntervalSelectionConfigWithoutType(VegaLiteSchema):
An array of encoding channels. The corresponding data field values must match for a
data tuple to fall within the selection.

**See also:** The `projection with encodings and fields section
<https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
documentation.
fields : List(:class:`FieldName`)
An array of field names whose values must match for a data tuple to fall within the
selection.

**See also:** The `projection with encodings and fields section
<https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
documentation.
Expand Down Expand Up @@ -7217,11 +7232,12 @@ class IntervalSelectionConfigWithoutType(VegaLiteSchema):
"""
_schema = {'$ref': '#/definitions/IntervalSelectionConfigWithoutType'}

def __init__(self, clear=Undefined, encodings=Undefined, mark=Undefined, on=Undefined,
resolve=Undefined, translate=Undefined, zoom=Undefined, **kwds):
def __init__(self, clear=Undefined, encodings=Undefined, fields=Undefined, mark=Undefined,
on=Undefined, resolve=Undefined, translate=Undefined, zoom=Undefined, **kwds):
super(IntervalSelectionConfigWithoutType, self).__init__(clear=clear, encodings=encodings,
mark=mark, on=on, resolve=resolve,
translate=translate, zoom=zoom, **kwds)
fields=fields, mark=mark, on=on,
resolve=resolve, translate=translate,
zoom=zoom, **kwds)


class JoinAggregateFieldDef(VegaLiteSchema):
Expand Down Expand Up @@ -21862,7 +21878,8 @@ class EventType(WindowEventType):

enum('click', 'dblclick', 'dragenter', 'dragleave', 'dragover', 'keydown', 'keypress',
'keyup', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'mousewheel',
'timer', 'touchend', 'touchmove', 'touchstart', 'wheel')
'pointerdown', 'pointermove', 'pointerout', 'pointerover', 'pointerup', 'timer', 'touchend',
'touchmove', 'touchstart', 'wheel')
"""
_schema = {'$ref': '#/definitions/EventType'}

Expand Down
19 changes: 19 additions & 0 deletions altair/vegalite/v5/schema/vega-lite-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8791,6 +8791,11 @@
"mouseover",
"mouseup",
"mousewheel",
"pointerdown",
"pointermove",
"pointerout",
"pointerover",
"pointerup",
"timer",
"touchend",
"touchmove",
Expand Down Expand Up @@ -12467,6 +12472,13 @@
},
"type": "array"
},
"fields": {
"description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.",
"items": {
"$ref": "#/definitions/FieldName"
},
"type": "array"
},
"mark": {
"$ref": "#/definitions/BrushConfig",
"description": "An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\n\n__See also:__ [`mark` examples](https://vega.github.io/vega-lite/docs/selection.html#mark) in the documentation."
Expand Down Expand Up @@ -12535,6 +12547,13 @@
},
"type": "array"
},
"fields": {
"description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.",
"items": {
"$ref": "#/definitions/FieldName"
},
"type": "array"
},
"mark": {
"$ref": "#/definitions/BrushConfig",
"description": "An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\n\n__See also:__ [`mark` examples](https://vega.github.io/vega-lite/docs/selection.html#mark) in the documentation."
Expand Down
10 changes: 10 additions & 0 deletions doc/releases/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ Bug Fixes
Backward-Incompatible Changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Version 5.1.2 (released Oct 4, 2023)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update this date depending on the actual release

----------------------------------------

- Update Vega-Lite from version 5.14.1 to version 5.15.1;
see `Vega-Lite Release Notes <https://github.com/vega/vega-lite/releases>`_.
joelostblom marked this conversation as resolved.
Show resolved Hide resolved

Bug Fixes
~~~~~~~~~
- Remove usage of deprecated Pandas parameter ``convert_dtypes`` (#3191)
- Fix encoding type inference for boolean columns when pyarrow is installed (#3210)

Version 5.1.1 (released August 30, 2023)
----------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dev = [
"pytest-cov",
"m2r",
"vega_datasets",
"vl-convert-python>=0.13.0",
"vl-convert-python>=0.14.0",
"mypy",
"pandas-stubs",
"types-jsonschema",
Expand Down
2 changes: 1 addition & 1 deletion tools/generate_schema_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
resolve_references,
)

SCHEMA_VERSION: Final = "v5.14.1"
SCHEMA_VERSION: Final = "v5.15.1"

reLink = re.compile(r"(?<=\[)([^\]]+)(?=\]\([^\)]+\))", re.M)
reSpecial = re.compile(r"[*_]{2,3}|`", re.M)
Expand Down