Open archmoj opened 1 day ago
cc: @gvwilson @ndrezn
Are there similar defaults in ddk that should be updated?
Are the .json
files in packages/python/plotly/plotly/package_data/templates/
generated by a script? If so, what script and where does the data come from? (the compact formatting of these .json
files leads me to believe they aren't hand-edited.)
packages/python/plotly/setup.py
refers to package_data/templates/*
.packages/python/plotly/templategen/*
seems to be the generator.@LiamConnors Are these templates auto generated?
We should add map
alternatives e.g. here and in other places similar to mapbox
.
It appears that templategen
is invoked manually rather than automatically.
Progress of a sort. Please note that I'm working off the master branch, which may not have the most up-to-date files.
packages/python/plotly/templategen/utils/__init__.py
to change template.data.heatmapgl[0]
to template.data.heatmap[0]
. (Step 3 fails without this change.)packages/python/plotly/templategen/__init__.py
to packages/python/plotly/templategen/__main__.py
so that we can run python -m templategen
from the packages/python/plotly/templategen
directory.plotly/package_data/templates/ggplot2.json
plotly/package_data/templates/plotly.json
plotly/package_data/templates/plotly_dark.json
plotly/package_data/templates/plotly_white.json
plotly/package_data/templates/seaborn.json
plotly/package_data/templates/simple_white.json
gridon.json
, presentation.json
, xgridoff.json
, or ygridoff.json
- I don't know why.I'm attaching pretty-printed versions of the old and new versions of plotly.json. The only difference is that the new version has an entry for scattermap as well as scattermapbox, while the old version only had scattermapbox.
Note that I have not added map
since there wasn't an entry for mapbox
, and that I didn't have to add scattermap
(it was already there).
Thanks @gvwilson That's a good progress to help continue automation of this process.
Are you going to open a pull request?
If so on master
please git pull
switch to have the latest files.
Then please switch to a new branch other than master and and rerun the script and commit the changes.
You may consider skipping the pretty-print step in your PR specially if that helps the diffs to be clearer.
I've created a new branch off master
with my changes called add-new-traces-to-templategen
- @archmoj please take it from here.
In order for
scattermap
andmap
behave similar toscattermapbox
andmapbox
, we should addscattermap
andmap
to the templates insidepackages/python/plotly/plotly/package_data/templates/
.