refactor: remove the ECharts renderer - #136
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the deprecated ECharts renderer and the compat shims and dead code that it and older specs left behind. Closes #126.
Change
flexviz/adapters/echarts_adapter.py,flexviz/adapters/js/echarts/(3 files), the ECharts bundle inruntime.py, the ECharts entries inregistry.py, the ECharts-only tests, and the ECharts parts ofArchitecture.md,docs/guides/customizing.md,docs/guides/cross-filtering.mdand the docstrings.renderer=onFigure.showandDashboard.show, and?renderer=on/viewand/h/{n}, keep"plotly"as the only value.adapters/registry.pystays as the place for a second renderer. The name must now match"plotly"exactly:normalize_renderer_name(lowercase and strip) is removed."echarts"value is removed from everyrendererparametrization, and 11 ECharts skips are gone. Two tests check thatrenderer=echartsgets 400 at/viewand/h/{n}.rendererparametrizations and the unusedrendererarguments of the test helpers are removed._wait_for_initkeeps its argument for now, because fix(cube): brush binned sources on their own bin grid #134 adds calls to it intest_browser_cube.py.test_adapters.pycover the capability check invalidate_dashboard_renderer, check thatPLOTLY_TRACE_TYPESholds every registered trace type, and check thatrenderer="Plotly"raises.x/ybranch inBarPlot.from_trace_spec, with its two tests;params.bar_modefallback inplotly_adapter.pyandplotly/traces.js;::bg/::fgid shim instripLayerSuffix, the legacy hover-mode coerce intoolbar.js, and the_fvClearAllCrosshairsandwindow.fvClearAllCrosshairsaliases;_registered_sources,FlexTrace.is_grouped_parent,CorrHeatmap.default_color_scale/default_color_range,set_cache_backendandset_cube_cache_backend(no callers);_fvResetRendererCacheinruntime/overlay.js, which only ECharts defined.Architecture.mdgives spec version0.7(it said0.5).Architecture.mdlists the 9 renderer hooks that the shared runtime andtoolbar.jscall, plus_fvAllFigUids. Before, it listed 4 hooks, and 3 of them do not exist after this PR. Theruntime.pydocstring points to this list.Architecture.mdno longer listsdispatchCrosshairs. The comments inpie.pyandline.pypoint at the right format and file.CHANGELOG.mdrecords the ECharts removal, the exact renderer name and the removed cache setters. The stale ECharts sentence in the fix(server): answer only same-origin pages and loopback host names #131 entry is removed.Impact
renderer="plotly"or no renderer sees no change.renderer="echarts"andrenderer="Plotly"now raiseValueError. A share URL orflexviz historyentry withrenderer=echartsreturns HTTP 400 at/viewand/h/{n}.flexviz.cache.set_cache_backendandset_cube_cache_backendare removed. They shipped in 0.1.0b1 to 0.1.0b5 but were not documented."plotly"to helpers that no longer take it.Checks
pytest tests flexviz_polars/tests(whatmake testruns): 2,363 passed, 2 skipped.pytest -m browser -p no:randomly -n 6 tests(whatmake test-browserruns): 306 passed.ruff format --check,ruff check flexviz tests,mkdocs build --strict,git diff --check: pass.