Skip to content

Commit 51ec6cb

Browse files
updated release instructions
1 parent 3b393d7 commit 51ec6cb

File tree

2 files changed

+120
-160
lines changed

2 files changed

+120
-160
lines changed

doc/python/time-series.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,19 @@ fig.show()
8585

8686
### Configuring Tick Labels
8787

88-
By default, the tick labels (and optional ticks) are associated with a specific grid-line, and represent an *instant* in time, for example, "midnight on February 1, 2018". Tick labels can be formatted using the `tickformat` attribute (which accepts the [d3 time-format formatting strings](https://github.com/d3/d3-time-format)) to display only the month and year, but they still represent an instant by default, so in the figure below, the text of the label "Feb 2018" spans part of the month of January and part of the month of February. The `dtick` attribute controls the spacing between gridlines, and the `"M1"` setting means "1 month". This attribute also accepts a number of milliseconds, which can be scaled up to days by multiplying by `24*60*60*1000`.
88+
By default, the tick labels (and optional ticks) are associated with a specific grid-line, and represent an *instant* in time, for example, "00:00 on February 1, 2018". Tick labels can be formatted using the `tickformat` attribute (which accepts the [d3 time-format formatting strings](https://github.com/d3/d3-time-format)) to display only the month and year, but they still represent an instant by default, so in the figure below, the text of the label "Feb 2018" spans part of the month of January and part of the month of February. The `dtick` attribute controls the spacing between gridlines, and the `"M1"` setting means "1 month". This attribute also accepts a number of milliseconds, which can be scaled up to days by multiplying by `24*60*60*1000`.
8989

9090
Note that by default, the formatting of values of X and Y values in the hover label matches that of the tick labels of the corresponding axes, so when customizing the tick labels to something broad like "month", it's usually necessary to [customize the hover label](/python/hover-text-and-formatting/) to something narrower like the acutal date, as below.
9191

9292
```python
9393
import plotly.express as px
9494
df = px.data.stocks()
95-
fig = px.line(df, x="date", y=df.columns,
96-
hover_data={"date": "|%B %d, %Y"},
95+
fig = px.line(df, x="date", y=df.columns,
96+
hover_data={"date": "|%B %d, %Y"},
9797
title='custom tick labels')
9898
fig.update_xaxes(
99-
dtick="M1",
100-
tickformat="%b %Y",
99+
dtick="M1",
100+
tickformat="%b %Y",
101101
range=["2018-01-01", "2018-12-31"])
102102
fig.show()
103103
```
@@ -111,12 +111,12 @@ By setting the `ticklabelmode` attribute to `"period"` (the default is `"instant
111111
```python
112112
import plotly.express as px
113113
df = px.data.stocks()
114-
fig = px.line(df, x="date", y=df.columns,
115-
hover_data={"date": "|%B %d, %Y"},
114+
fig = px.line(df, x="date", y=df.columns,
115+
hover_data={"date": "|%B %d, %Y"},
116116
title='custom tick labels with ticklabelmode="period"')
117117
fig.update_xaxes(
118-
dtick="M1",
119-
tickformat="%b %Y",
118+
dtick="M1",
119+
tickformat="%b %Y",
120120
ticklabelmode="period",
121121
range=["2018-01-01", "2018-12-31"])
122122
fig.show()

release.md

+111-151
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,8 @@ releases and forum announcements to do :)
1111
This is the release process for releasing `plotly.py` version `X.Y.Z` with
1212
`plotlywidget`/`jupyterlab-plotly` with matching versions.
1313

14-
Note: it's easier to lock all three versions together, even if it means we occasionally
15-
push no-change versions to NPM/PyPI/Conda.
16-
17-
### Create a release branch
18-
19-
After all of the functionality for the release has been merged into master,
20-
create a branch named `release_X.Y.Z`. This branch will become the
21-
final version
14+
> Note: it's easier to lock all three versions together, even if it means we occasionally
15+
> push no-change versions to NPM/PyPI/Conda.
2216
2317
### Finalize changelog
2418

@@ -33,28 +27,119 @@ been updated, include this as the first `Updated` entry. Call out any
3327
noteable changes as sub-bullets (new trace types in particular), and provide
3428
a link to the plotly.js CHANGELOG.
3529

36-
As the first entry in the changelog, include a `JupyterLab Versions` section.
37-
Here, document the versions of `plotlywidget`,
38-
`@jupyter-widgets/jupyterlab-manager`, `jupyterlab`, and
39-
`@jupyterlab/plotly-extension` that are known to be compatible with this
40-
version of `plotly.py`.
30+
### Finalize versions
31+
32+
Manually update the versions to `X.Y.Z` in the files
33+
specified below.
34+
35+
- `plotly/_widget_version.py`:
36+
+ Update `__frontend_version__` to `^X.Y.Z` (Note the `^` prefix)
37+
- `packages/javascript/plotlywidget/package.json`
38+
+ Update `"version"` to `X.Y.Z`
39+
+ Ensure you're using `node` version 12 and `npm` version 6 to minimize diffs to `package-lock.json`
40+
+ Run `rm -rf node_modules && npm install && npm run build`
41+
- `packages/javascript/jupyterlab-plotly/package.json`
42+
+ **Ensure the version of `plotly.js` matches the one in `plotlywidget`**
43+
+ Update `"version"` to `X.Y.Z`
44+
+ Ensure you're using `node` version 12 and `npm` version 6 to minimize diffs to `package-lock.json`
45+
+ Run `rm -rf node_modules && npm install && npm run build`
46+
- Run `git diff` and ensure that only the files you modified and the build artifacts have changed
47+
- Ensure that the diff in `package-lock.json` seems sane
48+
- Commit and push.
49+
50+
### Tag the release
51+
52+
Make sure tests pass CI checks, then tag this commit as `vX.Y.Z` (e.g. `v3.1.1`) and push the tag.
53+
54+
```bash
55+
(plotly_dev) $ git checkout master
56+
(plotly_dev) $ git stash
57+
(plotly_dev) $ git pull origin master
58+
(plotly_dev) $ git tag vX.Y.Z
59+
(plotly_dev) $ git push origin vX.Y.Z
60+
```
61+
62+
### Publishing to PyPI
63+
64+
Build and publish the final version to PyPI
4165

42-
Note: Use the official (not release candidate) versions in the CHANGELOG.
66+
```bash
67+
(plotly_dev) $ cd packages/python/plotly
68+
(plotly_dev) $ rm -rf dist
69+
(plotly_dev) $ python setup.py sdist bdist_wheel
70+
(plotly_dev) $ rm -f dist/*dirty*
71+
(plotly_dev) $ twine upload dist/plotly-X.Y.Z*
72+
```
4373

44-
### Update README.md installation instructions
74+
Note: this will intentionally fail if your current git tree is dirty, because we want the tag
75+
to reflect what is being released, and the version number comes from the tag and the dirty-state.
4576

46-
Update the installation instructions in the README to the new versions of all
47-
of the dependencies. Use the release candidate versions, this way we can point
48-
people to the README of the `release_X.Y.Z` as the instructions for trying out
49-
the release candidate.
77+
After it has uploaded, move to another environment and double+triple check that you are able to upgrade ok:
78+
```bash
79+
$ pip install plotly --upgrade
80+
```
5081

51-
Note that the conda installation instructions must include
52-
"-c plotly/label/test" rather than "-c plotly" in order to install the
53-
release candidate version.
82+
And ask one of your friends to do it too. Our tests should catch any issues, but you never know.
5483

55-
Update the `doc/python/getting-started.md` file with the same version numbers.
84+
### Publish JS Extensions to NPM
85+
86+
Finally, publish the final version of the extensions to NPM with:
87+
88+
```bash
89+
cd packages/javascript/jupyterlab-plotly
90+
npm run build && npm publish --access public
91+
cd packages/javascript/plotlywidget
92+
npm run build && npm publish --access public
93+
```
94+
95+
### Publishing to the plotly conda channel
96+
97+
To publish package to the plotly anaconda channel you'll need to have the
98+
anaconda or miniconda distribution installed, and you'll need to have the
99+
`anaconda-client` package installed.
100+
101+
```bash
102+
(plotly_dev) $ conda config --set anaconda_upload no
103+
(plotly_dev) $ conda build recipe/
104+
```
105+
106+
Then upload artifacts to the anaconda channel by running the upload command that `conda`
107+
provides, which looks something like this:
108+
109+
```
110+
$ anaconda upload /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
111+
```
112+
113+
### Add GitHub Release entry
114+
115+
1. Go to https://github.com/plotly/plotly.py/releases and "Draft a new release"
116+
2. Enter the `vX.Y.Z` tag you created already above and make "Release title" the same string as the tag.
117+
3. Copy the changelog section for this version as the "Describe this release"
118+
119+
### Update documentation site
120+
121+
1. Search for the previous version string in the docs and replace it with the new version string, including but not necessarily limited to the following files:
122+
- `README.md`
123+
- `doc/python/getting-started.md`
124+
- `doc/apidoc/conf.py`
125+
- `doc/requirements.txt`
126+
- `binder/requirements.txt`
127+
2. `doc-prod` should already have been merged on a regular basis into `master`, but
128+
start by doing it first if not. Then merge `master` into `doc-prod` to deploy the doc related
129+
to features in the release.
130+
3. in a clone of the [`graphing-library-docs` repo](https://github.com/plotly/graphing-library-docs):
131+
1. bump the version of Plotly.js with `cd _data && python get_plotschema.py` fixing any errors that come up
132+
2. rebuild the Algolia `schema` index with `ALGOLIA_API_KEY=<key> make update_ref_search`
133+
3. Rebuild the Algolia `python` index with `ALGOLIA_API_KEY=<key> make update_python_search`
134+
4. Commit and push the changes to `master` in that repo
135+
136+
### Notify Stakeholders
137+
138+
* Post an announcement to the Plotly Python forum, with links to the README installation instructions and to the CHANGELOG.
139+
* Follow up on issues resolved in this release or forum posts with better answers as of this release
140+
141+
## Release *Candidate* process - `plotly` package
56142

57-
Commit Changelog, README and getting-started updates.
58143

59144
### Bump to release candidate version
60145

@@ -68,7 +153,7 @@ specified below.
68153
+ Ensure you're using `node` version 12 and `npm` version 6 to minimize diffs to `package-lock.json`
69154
+ Run `rm -rf node_modules && npm install && npm run build`
70155
- `packages/javascript/jupyterlab-plotly/package.json`
71-
+ Ensure the version of `plotly.js` matches the one in `plotlywidget`
156+
+ **Ensure the version of `plotly.js` matches the one in `plotlywidget`**
72157
+ Update `"version"` to `X.Y.Z-rc.1`
73158
+ Ensure you're using `node` version 12 and `npm` version 6 to minimize diffs to `package-lock.json`
74159
+ Run `rm -rf node_modules && npm install && npm run build`
@@ -105,7 +190,7 @@ And, you'll need to be a maintainer on PyPI. Then, from inside the repository:
105190
(plotly_dev) $ git stash
106191
(plotly_dev) $ rm -rf dist
107192
(plotly_dev) $ python setup.py sdist bdist_wheel
108-
(plotly_dev) $ rm dist/*dirty*
193+
(plotly_dev) $ rm -f dist/*dirty*
109194
(plotly_dev) $ twine upload dist/plotly-X.Y.Zrc1*
110195
```
111196

@@ -169,131 +254,6 @@ If problems are found in the release candidate, fix them on the release
169254
branch and then publish another release candidate with the candidate number
170255
incremented.
171256

172-
### Finalize CHANGELOG and README
173-
174-
Update CHANGELOG with release date and update README with final versions.
175-
176-
In the conda installation instructions, be sure to change the
177-
"-c plotly/label/test" argument to "-c plotly"
178-
179-
Update the doc/python/getting-started.md file with the same version numbers.
180-
181-
Commit Changelog, README and getting-started updates.
182-
183-
### Finalize versions
184-
185-
When no problems are identified in the release candidate, remove the
186-
release candidate suffix from the following version strings:
187-
188-
- `plotly/_widget_version.py`:
189-
+ Update `__frontend_version__` to `^X.Y.Z` (Note the `^` prefix)
190-
- `packages/javascript/plotlywidget/package.json`
191-
+ Update `"version"` to `X.Y.Z`
192-
+ Ensure you're using `node` version 12 and `npm` version 6 to minimize diffs to `package-lock.json`
193-
+ Run `rm -rf node_modules && npm install && npm run build`
194-
- `packages/javascript/jupyterlab-plotly/package.json`
195-
+ Ensure the version of `plotly.js` matches the one in `plotlywidget`
196-
+ Update `"version"` to `X.Y.Z`
197-
+ Ensure you're using `node` version 12 and `npm` version 6 to minimize diffs to `package-lock.json`
198-
+ Run `rm -rf node_modules && npm install && npm run build`
199-
- Run `git diff` and ensure that only the files you modified and the build artifacts have changed
200-
- Ensure that the diff in `package-lock.json` seems sane
201-
- Commit and push to the release branch.
202-
203-
### Merge release into master
204-
205-
Make sure the integration tests are passing on the release branch, then merge
206-
it into master on GitHub.
207-
208-
Make sure tests also pass on master, then update your local master,
209-
tag this merge commit as `vX.Y.Z` (e.g. `v3.1.1`)
210-
211-
push the tag.
212-
213-
```bash
214-
(plotly_dev) $ git checkout master
215-
(plotly_dev) $ git stash
216-
(plotly_dev) $ git pull origin master
217-
(plotly_dev) $ git tag vX.Y.Z
218-
(plotly_dev) $ git push origin vX.Y.Z
219-
```
220-
221-
### Publishing to PyPI
222-
223-
Publish the final version to PyPI
224-
225-
```bash
226-
(plotly_dev) $ cd packages/python/plotly
227-
(plotly_dev) $ rm -rf dist
228-
(plotly_dev) $ python setup.py sdist bdist_wheel
229-
(plotly_dev) $ rm dist/*dirty*
230-
(plotly_dev) $ twine upload dist/plotly-X.Y.Z*
231-
```
232-
233-
Note: this will intentionally fail if your current git tree is dirty, because we want the tag
234-
to reflect what is being released, and the version number comes from the tag and the dirty-state.
235-
236-
After it has uploaded, move to another environment and double+triple check that you are able to upgrade ok:
237-
```bash
238-
$ pip install plotly --upgrade
239-
```
240-
241-
And ask one of your friends to do it too. Our tests should catch any issues, but you never know.
242-
243-
### Publish JS Extensions to NPM
244-
245-
Finally, publish the final version of the extensions to NPM with:
246-
247-
```bash
248-
cd packages/javascript/jupyterlab-plotly
249-
npm run build && npm publish --access public
250-
cd packages/javascript/plotlywidget
251-
npm run build && npm publish --access public
252-
```
253-
254-
### Publishing to the plotly conda channel
255-
256-
Follow the anaconda upload instructions as described for the release candidate
257-
above, except:
258-
259-
- Do not include the `--label test` argument when uploading
260-
261-
```
262-
$ anaconda upload /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
263-
```
264-
265-
### Add GitHub Release entry
266-
267-
Go to https://github.com/plotly/plotly.py/releases and "Draft a new release"
268-
269-
Enter the vX.Y.Z tag
270-
271-
Make "Release title" the same string as the tag.
272-
273-
Copy changelog section for this version as the "Describe this release"
274-
275-
### Update documentation site
276-
277-
1. Search for the previous version string in the docs and replace it with the new version string, including but not necessarily limited to the following files:
278-
- `README.md`
279-
- `doc/python/getting-started.md`
280-
- `doc/apidoc/conf.py`
281-
- `doc/requirements.txt`
282-
- `binder/requirements.txt`
283-
2. `doc-prod` should already have been merged on a regular basis into `master`, but
284-
start by doing it first if not. Then merge `master` into `doc-prod` to deploy the doc related
285-
to features in the release.
286-
3. in a clone of the [`graphing-library-docs` repo](https://github.com/plotly/graphing-library-docs):
287-
1. bump the version of Plotly.js with `cd _data && python get_plotschema.py` fixing any errors that come up
288-
2. rebuild the Algolia `schema` index with `ALGOLIA_API_KEY=<key> make update_ref_search`
289-
3. Rebuild the Algolia `python` index with `ALGOLIA_API_KEY=<key> make update_python_search`
290-
4. Commit and push the changes to `master` in that repo
291-
292-
### Post announcement
293-
294-
Post an announcement to the Plotly Python forum, with links to the
295-
README installation instructions and to the CHANGELOG.
296-
297257
## Release process - `plotly-geo` package
298258

299259
The `plotly-geo` package contains the shape file resources used by plotly.py.

0 commit comments

Comments
 (0)