diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 18681e585..a7a1e09c4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,6 +53,14 @@ git switch -c 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, diff --git a/RELEASING.md b/RELEASING.md index f90fb82af..8c55de86e 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -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. 2. Make certain your branch is in sync with head: diff --git a/altair/utils/_importers.py b/altair/utils/_importers.py index ed83b1a72..6ee41351d 100644 --- a/altair/utils/_importers.py +++ b/altair/utils/_importers.py @@ -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): diff --git a/altair/vegalite/v5/schema/__init__.py b/altair/vegalite/v5/schema/__init__.py index f8aa25ee5..92072a1f1 100644 --- a/altair/vegalite/v5/schema/__init__.py +++ b/altair/vegalite/v5/schema/__init__.py @@ -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' diff --git a/altair/vegalite/v5/schema/core.py b/altair/vegalite/v5/schema/core.py index ab60f275a..3d12e0858 100644 --- a/altair/vegalite/v5/schema/core.py +++ b/altair/vegalite/v5/schema/core.py @@ -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 + `__ 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 `__ in the documentation. @@ -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) @@ -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 + `__ 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 `__ in the documentation. @@ -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): @@ -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'} diff --git a/altair/vegalite/v5/schema/vega-lite-schema.json b/altair/vegalite/v5/schema/vega-lite-schema.json index eabaeaac4..8532a959e 100644 --- a/altair/vegalite/v5/schema/vega-lite-schema.json +++ b/altair/vegalite/v5/schema/vega-lite-schema.json @@ -8791,6 +8791,11 @@ "mouseover", "mouseup", "mousewheel", + "pointerdown", + "pointermove", + "pointerout", + "pointerover", + "pointerup", "timer", "touchend", "touchmove", @@ -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." @@ -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." diff --git a/doc/releases/changes.rst b/doc/releases/changes.rst index ee81bd68a..56c48a18a 100644 --- a/doc/releases/changes.rst +++ b/doc/releases/changes.rst @@ -15,6 +15,16 @@ Bug Fixes Backward-Incompatible Changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Version 5.1.2 (released Oct 4, 2023) +---------------------------------------- + +- Update Vega-Lite from version 5.14.1 to version 5.15.1; + see `Vega-Lite Release Notes `_. + +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) ---------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index f60d2d9c3..1489225f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/tools/generate_schema_wrapper.py b/tools/generate_schema_wrapper.py index c692b9e2c..ee20a6349 100644 --- a/tools/generate_schema_wrapper.py +++ b/tools/generate_schema_wrapper.py @@ -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)