From 580cd6f72b88feb482a980bf5ad660aa795cfcac Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Fri, 29 Sep 2023 10:13:00 -0700 Subject: [PATCH 01/11] Include instructions on how to update vega lite and auto created files --- CONTRIBUTING.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 18681e585..bbd71b6a3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,6 +53,28 @@ git switch -c With this branch checked-out, make the desired changes to the package. +### Updating the Vega-Lite version + +If your desired changes include updating the Vega-Lite that Altair uses +you need to change the following section in ``tools/generate_schema_wrapper.py`` +to the desired version number + +```python +SCHEMA_VERSION = { + "vega-lite": {"v5": "v5.15.0"}, +} +``` + +Then regenerate any automatically generated files +as described in the next section. + +### Updating any automatically generated files + +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: ``tools/generate_schema_wrapper.py``. + ### Testing your Changes Before suggesting your contributing your changing to the main Altair repository, From 5a3211332d560370672a19ac322a2893bffbfdeb Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Fri, 29 Sep 2023 10:13:30 -0700 Subject: [PATCH 02/11] Update VL version --- tools/generate_schema_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/generate_schema_wrapper.py b/tools/generate_schema_wrapper.py index 600ebdfbc..4b04bcac4 100644 --- a/tools/generate_schema_wrapper.py +++ b/tools/generate_schema_wrapper.py @@ -30,7 +30,7 @@ # Map of version name to github branch name. SCHEMA_VERSION = { - "vega-lite": {"v5": "v5.14.1"}, + "vega-lite": {"v5": "v5.15.0"}, } reLink = re.compile(r"(?<=\[)([^\]]+)(?=\]\([^\)]+\))", re.M) From 866588daf662e7d72531317d9a55a75cd796267c Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Fri, 29 Sep 2023 10:14:05 -0700 Subject: [PATCH 03/11] Add updates from regenerating auto files --- altair/vegalite/v5/schema/__init__.py | 4 +-- altair/vegalite/v5/schema/core.py | 33 ++++++++++++++----- .../vegalite/v5/schema/vega-lite-schema.json | 19 +++++++++++ 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/altair/vegalite/v5/schema/__init__.py b/altair/vegalite/v5/schema/__init__.py index f8aa25ee5..9d1723a42 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.0' +SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v5.15.0.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." From 4ed47487c1dc823b77481d669fa8cfd0aeea0961 Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Fri, 29 Sep 2023 10:14:11 -0700 Subject: [PATCH 04/11] Add release notes --- doc/releases/changes.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/releases/changes.rst b/doc/releases/changes.rst index ee81bd68a..2179a6ae1 100644 --- a/doc/releases/changes.rst +++ b/doc/releases/changes.rst @@ -15,6 +15,15 @@ Bug Fixes Backward-Incompatible Changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Version 5.1.2 (released Oct 4, 2023) +---------------------------------------- + +- Update Vega-Lite from version 5.14.1 to version 5.16.0; + see `Vega-Lite Release Notes `_. + +Bug Fixes +~~~~~~~~~ +- Remove usage of deprecated Pandas parameter ``convert_dtypes`` (#3191) Version 5.1.1 (released August 30, 2023) ---------------------------------------- From b4af8ec113df29c5d4e9fe61006908ea25e15547 Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Fri, 29 Sep 2023 10:30:53 -0700 Subject: [PATCH 05/11] Remove mention of altair-saver from docs --- RELEASING.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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: From 26fd96b03e1ed8556b618a44ae7af4fba223626f Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Fri, 29 Sep 2023 12:24:08 -0700 Subject: [PATCH 06/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bbd71b6a3..a7a1e09c4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,27 +53,13 @@ git switch -c With this branch checked-out, make the desired changes to the package. -### Updating the Vega-Lite version - -If your desired changes include updating the Vega-Lite that Altair uses -you need to change the following section in ``tools/generate_schema_wrapper.py`` -to the desired version number - -```python -SCHEMA_VERSION = { - "vega-lite": {"v5": "v5.15.0"}, -} -``` - -Then regenerate any automatically generated files -as described in the next section. - -### Updating any automatically generated files - 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: ``tools/generate_schema_wrapper.py``. +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 From 6d2b00b19b1b0970d64629516f7a336f67185373 Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Sun, 1 Oct 2023 09:40:52 -0700 Subject: [PATCH 07/11] Add note on pyarrow bool bug fix --- doc/releases/changes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/releases/changes.rst b/doc/releases/changes.rst index 2179a6ae1..aac33bfd8 100644 --- a/doc/releases/changes.rst +++ b/doc/releases/changes.rst @@ -24,6 +24,7 @@ Version 5.1.2 (released Oct 4, 2023) 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) ---------------------------------------- From 802d08ad48e4c042c3d7eb609767cdd5ef9594dc Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Tue, 3 Oct 2023 07:40:13 -0700 Subject: [PATCH 08/11] Update to 5.15.1 --- doc/releases/changes.rst | 2 +- tools/generate_schema_wrapper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/releases/changes.rst b/doc/releases/changes.rst index aac33bfd8..56c48a18a 100644 --- a/doc/releases/changes.rst +++ b/doc/releases/changes.rst @@ -18,7 +18,7 @@ Backward-Incompatible Changes Version 5.1.2 (released Oct 4, 2023) ---------------------------------------- -- Update Vega-Lite from version 5.14.1 to version 5.16.0; +- Update Vega-Lite from version 5.14.1 to version 5.15.1; see `Vega-Lite Release Notes `_. Bug Fixes diff --git a/tools/generate_schema_wrapper.py b/tools/generate_schema_wrapper.py index f3d19f2c1..ee20a6349 100644 --- a/tools/generate_schema_wrapper.py +++ b/tools/generate_schema_wrapper.py @@ -29,7 +29,7 @@ resolve_references, ) -SCHEMA_VERSION: Final = "v5.15.0" +SCHEMA_VERSION: Final = "v5.15.1" reLink = re.compile(r"(?<=\[)([^\]]+)(?=\]\([^\)]+\))", re.M) reSpecial = re.compile(r"[*_]{2,3}|`", re.M) From 2a508fd464aef459c317f9e74e9d8d22ecd9a79f Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Tue, 3 Oct 2023 07:38:46 -0700 Subject: [PATCH 09/11] Update to 5.15.1 --- altair/vegalite/v5/schema/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/altair/vegalite/v5/schema/__init__.py b/altair/vegalite/v5/schema/__init__.py index 9d1723a42..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.15.0' -SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v5.15.0.json' +SCHEMA_VERSION = 'v5.15.1' +SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v5.15.1.json' From 59ea4eab1a5259c315cea4a1e346cfe9a0cfc0a0 Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Tue, 3 Oct 2023 07:41:33 -0700 Subject: [PATCH 10/11] Require newer vl-convert --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From e9a33a0c3b9336ecfd07e8cdf094c02d652e5b72 Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Tue, 3 Oct 2023 08:56:39 -0700 Subject: [PATCH 11/11] Update vl-convert version --- altair/utils/_importers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):