You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+31-28Lines changed: 31 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,39 +264,42 @@ Two kinds of Jupyter support are included:
264
264
265
265
### Updating to a New Version of plotly.js
266
266
267
-
First, update the version of the `plotly.js` dependency in `js/package.json`.
268
-
Once you have done that,
269
-
run the `updateplotlyjs` command:
267
+
1. Create a new branch off of `main`.
270
268
271
-
```bash
272
-
python commands.py updateplotlyjs
273
-
```
274
-
275
-
This downloads new versions of `plot-schema.json` and `plotly.min.js` from the `plotly/plotly.js` GitHub repository
276
-
and places them in `codegen/resources/` and `plotly/package_data/`, respectively.
269
+
2. Manually update the version of the `plotly.js` dependency in `js/package.json`.
277
270
278
-
It then does the following:
279
-
- Regenerates all of the `graph_objs` classes based on the new schema
280
-
- Runs `npm install` in `js/` to refresh `js/package-lock.json` against the new `plotly.js`
281
-
- Runs `npm run build` to rebuild the JupyterLab extension and FigureWidget bundles in `plotly/labextension` and `plotly/package_data/widgetbundle.js`.
271
+
3. Run the `updateplotlyjs` command:
282
272
283
-
Commit the updated files under:
284
-
-`codegen/resources/`
285
-
-`js/`
286
-
-`plotly/graph_objs/`
287
-
-`plotly/labextension/`
288
-
-`plotly/offline/`
289
-
-`plotly/package_data/`
273
+
```bash
274
+
python commands.py updateplotlyjs
275
+
```
290
276
291
-
If you need to skip the `npm` steps entirely (e.g. `npm` isn't available),
292
-
set the `SKIP_NPM=1` environment variable:
277
+
This command does the following:
293
278
294
-
```bash
295
-
SKIP_NPM=1 python commands.py updateplotlyjs
296
-
```
297
-
298
-
If you do skip it, you'll need to find a way to manually run `npm install && npm run build` in `js/` before committing,
299
-
so that the lockfile and build artifacts stay in sync with `js/package.json`.
279
+
- Downloads new versions of `plot-schema.json` and `plotly.min.js` from the [plotly.js GitHub repository](https://github.com/plotly/plotly.js)
280
+
and places them in`codegen/resources/` and `plotly/package_data/`, respectively.
281
+
- Updates `plotly/offline/_plotlyjs_version.py` with the new version
282
+
- Regenerates all of the classes under `graph_objs/` (`go.Figure`, `go.Layout`, etc.), and `plotly/validators/_validators.json`, based on the new schema
283
+
- Runs `npm install`in`js/` to update `js/package-lock.json`
284
+
- Runs `npm run build`in`js/` to rebuild the JupyterLab extension and FigureWidget bundles, which updates the artifacts in`plotly/labextension` and `plotly/package_data/widgetbundle.js`.
285
+
286
+
> Note: To skip the `npm` steps entirely (e.g. if`npm` isn't available), you can set the `SKIP_NPM=1` environment variable:
287
+
>
288
+
> ```bash
289
+
> SKIP_NPM=1 python commands.py updateplotlyjs
290
+
> ```
291
+
>
292
+
> However, before proceeding further, you'll still need to somehow run `npm install && npm run build`in`js/` before committing, so that the lockfile and build artifacts stay in sync with `js/package.json`.
0 commit comments