Repository navigation
Conversation
Move the plotly-express data generators into a new independently published deephaven-sample-data package (deephaven.sample_data). plotly-express now depends on it and deephaven.plot.express.data forwards to it with a DeprecationWarning. - Add plugins/sample-data with tests and release wiring (cog, tags, update_version.sh, change detection) - Install in-repo sample-data in tox, docs builds, Docker, and plugin_builder so unreleased versions resolve locally - Fix flights(ticking=False) failing due to missing columns Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Separate pip invocations cause fresh-environment installation failures for unpublished sample-data, while the compatibility shims break legacy exports and wildcard imports and recommend an invalid migration target.
4 open issues
What changed in this PR
Extracts sample datasets from Plotly Express into the independently published deephaven-sample-data package, making them available through deephaven.sample_data.
Changes:
- Moves dataset generators into the new package, adds tests, and fixes static flight generation.
- Adds deprecated forwarding modules and updates example-data documentation.
- Updates release automation, CI, and local dependency installation for the package split.
| File | Description |
|---|---|
tools/update_version.sh |
Supports sample-data version updates and Python-only releases. |
tools/plugin_builder.py |
Batches matching wheels into one installation command. |
plugins/sample-data/tox.ini |
Configures Python test environments. |
plugins/sample-data/test/deephaven/sample_data/test_sample_data.py |
Tests static and ticking datasets, determinism, and map centers. |
plugins/sample-data/test/deephaven/sample_data/__init__.py |
Enables test discovery. |
plugins/sample-data/test/deephaven/__init__.py |
Enables test discovery. |
plugins/sample-data/test/__init__.py |
Initializes the JVM for tests. |
plugins/sample-data/src/deephaven/sample_data/_generators.py |
Houses migrated generators and fixes static flights. |
plugins/sample-data/src/deephaven/sample_data/__init__.py |
Exports datasets and map-center constants. |
plugins/sample-data/setup.cfg |
Defines package metadata and dependencies. |
plugins/sample-data/README.md |
Documents installation, datasets, and migration. |
plugins/sample-data/pyproject.toml |
Configures the Python build backend. |
plugins/sample-data/LICENSE |
Adds the Apache 2.0 license. |
plugins/sample-data/CHANGELOG.md |
Initializes the package changelog. |
plugins/sample-data/.gitignore |
Excludes generated and local files. |
plugins/plotly-express/tox.ini |
Installs sample-data from the repository for tests. |
plugins/plotly-express/test/deephaven/plot/express/test_data_deprecation.py |
Tests forwarding and deprecation warnings. |
plugins/plotly-express/src/deephaven/plot/express/data/data_generators.py |
Replaces generators with lazy compatibility forwarding. |
plugins/plotly-express/src/deephaven/plot/express/data/_deprecation.py |
Centralizes lazy imports and warnings. |
plugins/plotly-express/src/deephaven/plot/express/data/__init__.py |
Provides deprecated dataset access. |
plugins/plotly-express/src/deephaven/plot/express/__init__.py |
Imports the compatibility data package. |
plugins/plotly-express/setup.cfg |
Adds the sample-data dependency. |
plugins/plotly-express/docs/example-data.md |
Uses the new API and explains deprecation. |
Dockerfile |
Installs local wheels together for dependency resolution. |
cog.toml |
Registers sample-data for releases. |
.github/workflows/modified-plugin.yml |
Adds the sample-data release-tag trigger. |
.github/workflows/build-docs.yml |
Installs local sample-data before documentation builds. |
.github/actions/get-changes/action.yml |
Detects sample-data changes and triggers dependent checks. |
Review effort: Balanced
- Restore the deephaven.plot.express.data_generators alias - Provide __all__ lazily in deprecated data shims so wildcard imports work - Point deprecation warnings at replacements that actually expose each name - Install all selected plugins in one pip call in plugin_builder - Regenerate example-data docs snapshots Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
plotly-express docs preview (Available for 14 days) |
dsmmcken
left a comment
There was a problem hiding this comment.
Trading view has some additional generators too that are slightly different to meet the needs of showing of that library.
…n_builder Selecting plotly-express now also builds and installs the in-repo sample-data package, so targeted --install/--reinstall use the local version instead of PyPI (or leaving it missing with --no-deps). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
plotly-express docs preview (Available for 14 days) |
deephaven-sample-data now depends only on Deephaven. The plotly-backed datasets (iris, tips, election, wind, gapminder) stay in plotly-express, which re-exports the Deephaven-only datasets from deephaven.sample_data without deprecation. Move the TradingView Lightweight example tables into deephaven.sample_data, renaming stocks to stock_trades, and deprecate tvl.data in favor of it. Lower the deephaven-core floor to 41.1 so TradingView Lightweight can depend on it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move all plotly-express datasets into deephaven-sample-data. The iris, tips, election, wind and gapminder source data is vendored as CSVs with attribution in NOTICE, so sample-data no longer depends on plotly. plotly-express depends on sample-data, and dx.data forwards its original names to it with a DeprecationWarning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
plotly-express docs preview (Available for 14 days) |
|
tradingview-lightweight docs preview (Available for 14 days) |
|
plotly-express docs preview (Available for 14 days) |
|
tradingview-lightweight docs preview (Available for 14 days) |
|
|
||
| # Datasets that only need Deephaven live in the deephaven-sample-data package | ||
| # Unresolvable by pre-commit's pyright until deephaven-sample-data is published to PyPI | ||
| from deephaven.sample_data import ( # pyright: ignore[reportMissingImports] |


Adds a new, independently published
deephaven-sample-datapackage (deephaven.sample_data) with deterministic sample datasets that any plugin can use. Each dataset ticks by default; passticking=Falsefor a static table. The package only depends on Deephaven (deephaven-core,jpy, pluspandas/numpy, which come with deephaven-core). It does not depend on plotly.Changes
plugins/sample-data(deephaven-sample-data,0.1.0.dev0) with a README and tests that build every dataset, static and ticking.iris,jobs,marketing,stocks,tips,election,wind,gapminder,fish_market,outages,flights, plus theOUTAGE_CENTER/FLIGHT_CENTERconstants.ohlc,stock_trades(formerlytvl.data.stocks),volume,yields,options_chain,values,large_prices.iris,tips,election,windandgapminderused to come fromplotly.express.data. It is now vendored as CSVs indeephaven/sample_data/_data/(~115 KB), exported unmodified from plotly 6.9.0. The generators add ticking rows on top, as before.NOTICErecords each dataset's source and license and includes Plotly's MIT license; it ships in the wheel and sdist.deephaven-sample-data.dx.data.*,from deephaven.plot.express.data import ...anddx.data.data_generators.*still work for the original 13 names but forward todeephaven.sample_datawith aDeprecationWarning. Newer datasets (e.g.ohlc) are only available fromdeephaven.sample_data. Importingdeephaven.plot.expressitself does not warn.deephaven-sample-data.deephaven.plot.tradingview_lightweight.dataforwards to it with aDeprecationWarning, mappingstockstosample_data.stock_trades. TheDEEPHAVEN_PLUGINS_STATIC_DATA=1override still works.cog.toml,tools/update_version.sh,sample-data-v*tag trigger, and CI change detection (sample-data changes also re-run the plotly-express and TradingView tests).plugin_builder.pyinstall the in-reposample-data.plugin_builder.pybuilds and installs it automatically when building plotly-express or TradingView Lightweight.example-data.mdpages usedeephaven.sample_dataand note the deprecation. Otherdx.data.*usages in docs are left for a follow-up.flights(ticking=False)previously failed becauseFlightIdx/Timestampwere only added in the ticking branch.Licensing
Reviewers: please confirm that redistributing
tipsis acceptable.Release notes
sample-datamust be released (tagsample-data-v0.1.0) before the next plotly-express or TradingView Lightweight release, since their published versions will pull it from PyPI.deephaven-sample-datato pyright'sadditional_dependenciesin.pre-commit-config.yamland drop thereportMissingImportsignores in the plotly-express and TradingView data shims.Testing
tox -e py3.12passes inplugins/sample-data(8 tests, including vendored row counts and a check that plotly isn't imported),plugins/plotly-express(213 tests, including the deprecation tests) andplugins/tradingview-lightweight(732 tests).NOTICE.deephaven-serveranddeephaven-sample-data, every vendored dataset loads with the expected row counts, and plotly is neither installed nor imported.