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
toolzdependency by @dangotbanned in #3426
- feat: Improve the syntax for conditions with multiple predicates. See the documentation of
alt.whenfor examples by @dangotbanned in #3427 and #3492 - feat: Reimplement
alt.expras 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
carbonthemes, provide autocomplete for themes by @dangotbanned in #3516 - perf: Fix issues with
Chart|LayerChart.encode, 1.32x speedup toinfer_encoding_typesby @dangotbanned in #3444
Various typing improvements:
- feat(typing): Adds public
altair.typingmodule by @dangotbanned in #3515 - feat(typing):
@deprecatedversioning, IDE highlighting by @dangotbanned in #3455 - feat: Adds
ChartTypetype and type guardis_chart_type. Change PurePath to Path type hints by @dangotbanned in #3420 - feat(typing): adds
Mapalias forMapping[str, Any]by @dangotbanned in #3458 - feat(typing): Ban
typing.Optionalimport usingruffby @dangotbanned in #3460 - feat(typing): Further simplify generated
Literalaliases by @dangotbanned in #3469 - feat(typing): Fully annotate
api.pyby @dangotbanned in #3508
Bug Fixes
- fix(typing): Resolve
mypy==1.11.0issues inplugin_registryby @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
ruffrulePLR1701by @dangotbanned in #3453 - fix(docs):
@utils.use_signatureformatting by @dangotbanned in #3450 - fix(typing): Ignore
[arg-type]error in_deduplicate_enum_errorsby @dangotbanned in #3475 - fix: Restrict static & runtime top-level imports by @dangotbanned in #3482
- fix: Avoid
sphinxerror "Code Execution failed:NameError: name 'format_locale' is not defined" by @dangotbanned in #3503 - fix: replace deprecated
sphinxdefault by @dangotbanned in #3512 - fix(ruff): Bump
ruff, fixRUF031by @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 Testin user guide by @dangotbanned in #3528 - docs: Fix and improve
alt.Optionaldoc by @dangotbanned in #3449 - docs: Fix camel case of fillOpacity channel by @timtroendle in #3465
- docs: Fix
CONTRIBUTING.mdphrasing 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
hatchguidance by @dangotbanned in #3461 - docs: Add
emptyas a explicitconditionkwarg by @dangotbanned in #3490 - docs: Undoc deprecated functionality by @dangotbanned in #3509
- docs: Remove reference to
altair_saverinsaveby @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 2by @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
ruffrules, 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
Literalaliases inapiby @dangotbanned in #3464 - ci: remove
toolzfrom[[tool.mypy.overrides]]by @dangotbanned in #3474 - refactor: Simplify
SchemaBaserepr by @dangotbanned in #3472 - refactor: remove dead
_get_channels_mappingcode by @dangotbanned in #3467 - ci: bump
ruff>=0.5.3forPLW1514fix by @dangotbanned in #3484 - test: skip
ibistest on unsupportedpythonversion by @dangotbanned in #3486 - refactor(typing): reduce type ignores in
api.pyby @dangotbanned in #3480 - fix: remove unsupported
sphinxtheme option'footer_items'by @dangotbanned in #3489 - refactor: Rename and move
is_undefined,OneOrSeqby @dangotbanned in #3491 - refactor(docs, ruff): Add
pydocstylerules 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-formatcomment by @dangotbanned in #3496 - ci: relax
numpy<=2.0.0constraint by @dangotbanned in #3504 - refactor: replace archived
m2rwith updatedmistuneby @dangotbanned in #3506 - build: Add
ipykerneloptional dependency todevgroup by @dangotbanned in #3507 - refactor(ruff): Organize imports w/ (
I001,TID252) rules by @dangotbanned in #3513 - ci: Bump
sphinx,vl-convert-pythonby @dangotbanned in #3527 - chore: Remove filterwarnings from tests for cross-version pandas compatibility by @MarcoGorelli in #3522
- ci(ruff): Enforce the default
C901complexity by @dangotbanned in #3531 - refactor: Simplify unreachable compound chart cases by @dangotbanned in #3520
- feat: Adds
vega-themes.jsonusingvl_convertby @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