Version 5.4.0
What's Changed
Enhancements
- Update Vega-Lite from version 5.17.0 to version 5.20.1; see Vega-Lite Release Notes. By @binste in #3479 and #3525
- Remove several dependencies to make the package more lightweight:
- feat: make pandas and NumPy optional dependencies, don't require PyArrow for plotting with Polars/Modin/cuDF by @MarcoGorelli in #3452
- Remove
toolz
dependency by @dangotbanned in #3426
- feat: Improve the syntax for conditions with multiple predicates. See the documentation of
alt.when
for examples by @dangotbanned in #3427 and #3492 - feat: Reimplement
alt.expr
as a class that is understood by IDEs by @dangotbanned in #3466 - feat: Support a wider range of iterables, i.e. many places in Altair now accept not only lists but
np.array
,pd.Series
,tuples
, etc. by @dangotbanned in #3501 - feat: Adds 4 new
carbon
themes, provide autocomplete for themes by @dangotbanned in #3516 - perf: Fix issues with
Chart|LayerChart.encode
, 1.32x speedup toinfer_encoding_types
by @dangotbanned in #3444
Various typing improvements:
- feat(typing): Adds public
altair.typing
module by @dangotbanned in #3515 - feat(typing):
@deprecated
versioning, IDE highlighting by @dangotbanned in #3455 - feat: Adds
ChartType
type and type guardis_chart_type
. Change PurePath to Path type hints by @dangotbanned in #3420 - feat(typing): adds
Map
alias forMapping[str, Any]
by @dangotbanned in #3458 - feat(typing): Ban
typing.Optional
import usingruff
by @dangotbanned in #3460 - feat(typing): Further simplify generated
Literal
aliases by @dangotbanned in #3469 - feat(typing): Fully annotate
api.py
by @dangotbanned in #3508
Bug Fixes
- fix(typing): Resolve
mypy==1.11.0
issues inplugin_registry
by @dangotbanned in #3487 - fix: solve mypy errors which are due to same object names in core.py and channels.py by @binste in #3414
- fix: remove remapped
ruff
rulePLR1701
by @dangotbanned in #3453 - fix(docs):
@utils.use_signature
formatting by @dangotbanned in #3450 - fix(typing): Ignore
[arg-type]
error in_deduplicate_enum_errors
by @dangotbanned in #3475 - fix: Restrict static & runtime top-level imports by @dangotbanned in #3482
- fix: Avoid
sphinx
error "Code Execution failed:NameError: name 'format_locale' is not defined" by @dangotbanned in #3503 - fix: replace deprecated
sphinx
default by @dangotbanned in #3512 - fix(ruff): Bump
ruff
, fixRUF031
by @dangotbanned in #3529
Documentation
- docs: Versioning policy by @dangotbanned in #3488
- docs: Add example of reordering stacked bars by @joelostblom in #3395
- docs: Add example of how to create polar bar charts by @joelostblom in #3428
- docs: Add example of cumulative line chart with facet by @dsmedia in #3440
- docs: Add example with hover path and search box by @dsmedia in #3459
- docs: Add example for Bar Chart with Highlighting on Hover and Selection on Click by @dangotbanned in #3485
- docs: Link to
Vega Theme Test
in user guide by @dangotbanned in #3528 - docs: Fix and improve
alt.Optional
doc by @dangotbanned in #3449 - docs: Fix camel case of fillOpacity channel by @timtroendle in #3465
- docs: Fix
CONTRIBUTING.md
phrasing by @dangotbanned in #3477 - docs: Reduce number of items in header to 4 by @binste in #3401
- docs: Link to project board for roadmap by @joelostblom in #3404
- docs: Use raw strings with escape sequences by @joelostblom in #3411
- docs: Update
hatch
guidance by @dangotbanned in #3461 - docs: Add
empty
as a explicitcondition
kwarg by @dangotbanned in #3490 - docs: Undoc deprecated functionality by @dangotbanned in #3509
- docs: Remove reference to
altair_saver
insave
by @dangotbanned in #3510 - docs: Update link to Altair Ally by @sebp in #3517
Maintenance
- chore: Remove CoC link in templates since it's displayed by default by @joelostblom in #3390
- chore: Update org name from altair-viz to vega by @binste in #3400
- build: pin upperlimit geopandas by @mattijn in #3421
- ci: remove again geopandas pin and disable flaky test by @binste in #3422
- ci: Remove references to archived altair_viewer and altair_saver in ci, docs, and tests. Uninstall anywidget and vl-convert-python during one test run by @binste in #3419
- ci: prepare for
numpy 2
by @dangotbanned in #3438 - ci: Add a Dependabot config to auto-update GitHub action versions by @kurtmckee in #3437
- ci: Update dependabot.yaml to include prefix by @mattijn in #3442
- ci: Bump the github-actions group with 2 updates by @dependabot in #3439
- chore: avoid pandas warning for
freq='H'
in test_utils.py by @MarcoGorelli in #3446 - refactor: Add
ruff
rules, improve type annotations, improve ci performance by @dangotbanned in #3431 - style: Remove outdated comments about the use of the former _Parameter protocol by @binste in #3448
- chore: fixup ruff-mypy CI job due to Ruff change by @MarcoGorelli in #3463
- refactor(typing): Reuse generated
Literal
aliases inapi
by @dangotbanned in #3464 - ci: remove
toolz
from[[tool.mypy.overrides]]
by @dangotbanned in #3474 - refactor: Simplify
SchemaBase
repr by @dangotbanned in #3472 - refactor: remove dead
_get_channels_mapping
code by @dangotbanned in #3467 - ci: bump
ruff>=0.5.3
forPLW1514
fix by @dangotbanned in #3484 - test: skip
ibis
test on unsupportedpython
version by @dangotbanned in #3486 - refactor(typing): reduce type ignores in
api.py
by @dangotbanned in #3480 - fix: remove unsupported
sphinx
theme option'footer_items'
by @dangotbanned in #3489 - refactor: Rename and move
is_undefined
,OneOrSeq
by @dangotbanned in #3491 - refactor(docs, ruff): Add
pydocstyle
rules by @dangotbanned in #3493 - ci: include optional dependencies for Polars backend in ibis-framework install by @MarcoGorelli in #3494
- ci: Add
python-version=="3.9"
to github action by @dangotbanned in #3498 - ci(ruff): Remove stale
docstring-code-format
comment by @dangotbanned in #3496 - ci: relax
numpy<=2.0.0
constraint by @dangotbanned in #3504 - refactor: replace archived
m2r
with updatedmistune
by @dangotbanned in #3506 - build: Add
ipykernel
optional dependency todev
group by @dangotbanned in #3507 - refactor(ruff): Organize imports w/ (
I001
,TID252
) rules by @dangotbanned in #3513 - ci: Bump
sphinx
,vl-convert-python
by @dangotbanned in #3527 - chore: Remove filterwarnings from tests for cross-version pandas compatibility by @MarcoGorelli in #3522
- ci(ruff): Enforce the default
C901
complexity by @dangotbanned in #3531 - refactor: Simplify unreachable compound chart cases by @dangotbanned in #3520
- feat: Adds
vega-themes.json
usingvl_convert
by @dangotbanned in #3523
New Contributors
- @dangotbanned made their first contribution in #3420
- @kurtmckee made their first contribution in #3437
- @dependabot made their first contribution in #3439
- @dsmedia made their first contribution in #3440
- @MarcoGorelli made their first contribution in #3446
- @timtroendle made their first contribution in #3465
- @sebp made their first contribution in #3517
Full Changelog: v5.3.0...v5.4.0