Skip to content

Commit d943d62

Browse files
fix up build process
1 parent 18252a2 commit d943d62

File tree

4 files changed

+48
-21
lines changed

4 files changed

+48
-21
lines changed

packages/javascript/jupyterlab-plotly/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"style/*.*"
2323
],
2424
"scripts": {
25-
"build": "npm run build:lib && npm run build:nbextension && npm run build:labextension:dev",
25+
"build:dev": "npm run build:lib && npm run build:nbextension && npm run build:labextension:dev",
2626
"build:prod": "npm run build:lib && npm run build:nbextension && npm run build:labextension",
2727
"build:labextension": "jupyter labextension build .",
2828
"build:labextension:dev": "jupyter labextension build --development True .",

packages/python/plotly/plotly/express/trendline_functions/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import pandas as pd
1212
import numpy as np
1313

14+
__all__ = ["ols", "lowess", "rolling", "ewm", "expanding"]
15+
1416

1517
def ols(trendline_options, x_raw, x, y, x_label, y_label, non_missing):
1618
"""Ordinary Least Squares (OLS) trendline function

packages/python/plotly/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ def run(self):
528528
"plotly.express",
529529
"plotly.express.data",
530530
"plotly.express.colors",
531+
"plotly.express.trendline_functions",
531532
"plotly.graph_objects",
532533
"_plotly_utils",
533534
"_plotly_utils.colors",

release.md

+44-20
Original file line numberDiff line numberDiff line change
@@ -42,41 +42,44 @@ specified below.
4242
+ Update `"version"` to `X.Y.Z`
4343
+ Ensure you're using `node` version 12 and `npm` version 6 to minimize diffs to `package-lock.json`
4444
+ Ensure you're in a Python virtual environment with JupyterLab 3 installed
45-
+ Run `rm -rf node_modules && npm install && npm run build:prod`
45+
+ Run `rm -rf node_modules && npm install && npm run clean && npm run build:prod`
4646
- This the last good time to install the extensions locally and check that everything works in dev mode
4747
- Run `git diff` and ensure that only the files you modified and the build artifacts have changed
4848
- Ensure that the diff in `package-lock.json` seems sane
4949
- Commit and tag but *don't push* until after everything is available on NPM/PyPI/Conda (see below):
5050
+ `git commit -a -m "release vX.Y.Z"`
5151
+ `git tag vX.Y.Z`
5252

53-
### Publish JS Extensions to NPM
54-
55-
Build and publish the final version of the extensions to NPM. We do this first because
56-
once we push to PyPI the README will refer to these versions.
57-
58-
```bash
59-
cd packages/javascript/jupyterlab-plotly
60-
npm run build && npm publish --access public
61-
```
62-
63-
Final checks could be done here if desired.
6453

6554
### Publishing to PyPI
6655

6756
Build and publish the final version to PyPI.
6857

58+
> NOTE: for some reason, this produces a broken build if `npm run build:prod` isn't '
59+
> run once before in the `jupyterlab-plotly` directory so don't skip that step above!
60+
6961
```bash
7062
(plotly_dev) $ git status # make sure it's not dirty!
7163
(plotly_dev) $ cd packages/python/plotly
7264
(plotly_dev) $ rm -rf dist
7365
(plotly_dev) $ python setup.py sdist bdist_wheel
74-
(plotly_dev) $ rm -f dist/*dirty*
66+
(plotly_dev) $ rm -f dist/*dirty* # make sure your version is not dirty!
67+
```
68+
69+
Here you should do some local QA:
70+
71+
```bash
72+
(plotly_dev) $ pip uninstall plotly
73+
(plotly_dev) $ pip install dist/plotly-X.Y.X-py2.py3-none-any.whl
74+
```
75+
76+
Once you're satisfied that things render in Lab and Notebook in Widget and regular mode,
77+
you can upload to PyPI.
78+
79+
```bash
7580
(plotly_dev) $ twine upload dist/plotly-X.Y.Z*
7681
```
7782

78-
Note: this will intentionally fail if your current git tree is dirty, because we want the tag
79-
to reflect what is being released, and the version number comes from the tag and the dirty-state.
8083

8184
After it has uploaded, move to another environment and double+triple check that you are able to upgrade ok:
8285
```bash
@@ -85,6 +88,18 @@ $ pip install plotly --upgrade
8588

8689
And ask one of your friends to do it too. Our tests should catch any issues, but you never know.
8790

91+
### Publish JS Extensions to NPM
92+
93+
Build and publish the final version of the extensions to NPM. We do this right away because
94+
once we push to PyPI the README will refer to these versions.
95+
96+
> NOTE: this assumes the extension is already built above so don't skip that step above!
97+
98+
```bash
99+
cd packages/javascript/jupyterlab-plotly
100+
npm publish --access public
101+
```
102+
88103
### Publishing to the plotly conda channel
89104

90105
To publish package to the plotly anaconda channel you'll need to have the
@@ -185,21 +200,30 @@ And, you'll need to be a maintainer on PyPI. Then, from inside the repository:
185200
(plotly_dev) $ git stash
186201
(plotly_dev) $ rm -rf dist
187202
(plotly_dev) $ python setup.py sdist bdist_wheel
188-
(plotly_dev) $ rm -f dist/*dirty*
189-
(plotly_dev) $ twine upload dist/plotly-X.Y.Zrc1*
203+
(plotly_dev) $ rm -f dist/*dirty* # make sure your version is not dirty!
204+
```
205+
206+
Here you should do some local QA:
207+
208+
```bash
209+
(plotly_dev) $ pip uninstall plotly
210+
(plotly_dev) $ pip install dist/plotly-vX.Y.Zrc1-py2.py3-none-any.whl
190211
```
191212

192-
Note: this will intentionally fail if your current git tree is dirty, because we want the tag
193-
to reflect what is being released, and the version number comes from the tag and the dirty-state.
213+
Once you're satisfied that things render in Lab and Notebook in Widget and regular mode,
214+
you can upload to PyPI.
194215

216+
```bash
217+
(plotly_dev) $ twine upload dist/plotly-X.Y.Zrc1*
218+
```
195219

196220
### Publish release candidate of JS Extensions to NPM
197221

198222
Now, publish the release candidate of the extensions to NPM.
199223

200224
```bash
201225
cd ./packages/javascript/jupyterlab-plotly
202-
npm run build && npm publish --access public --tag next
226+
npm publish --access public --tag next
203227
```
204228

205229
The `--tag next` part ensures that users won't install this version unless

0 commit comments

Comments
 (0)