Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bf29422

Browse files
authored
Merge pull request #5364 from plotly/release-instructions-cleanup
Update release instructions
2 parents 7cb8cdb + ea6398e commit bf29422

File tree

1 file changed

+80
-35
lines changed

1 file changed

+80
-35
lines changed

‎RELEASE.md‎

Lines changed: 80 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## Release process - full release of `plotly` package
55

6-
This is the release process for releasing `plotly.py` version `X.Y.Z`, including changelogs, Github release and forum announcement.
6+
This is the release process for releasing Plotly.py version `X.Y.Z`, including changelogs, GitHub release and forum announcement.
77

88
### Finalize changelog
99

@@ -13,59 +13,104 @@ Make sure the changelog includes the version being published at the top, along
1313
with the expected publication date.
1414

1515
Use the `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, and `Security`
16-
labels for all changes to plotly.py. If the version of plotly.js has
16+
labels for all changes to Plotly.py. If the version of Plotly.js has
1717
been updated, include this as the first `Updated` entry. Call out any
1818
notable changes as sub-bullets (new trace types in particular), and provide
19-
a link to the plotly.js CHANGELOG.
19+
a link to the Plotly.js CHANGELOG.
20+
21+
### Update version numbers
22+
23+
**Create a release branch `git checkout -b release-X.Y.Z` _from the tip of `origin/main`_.**
24+
25+
- Manually update the versions to `X.Y.Z` in the files specified below:
26+
- `pyproject.toml`
27+
- update version
28+
- `CHANGELOG.md`
29+
- update version and release date
30+
- finalize changelog entries according to instructions above
31+
- `CITATION.cff`
32+
- update version and release date
33+
- Run `uv lock` to update the version number in the `uv.lock` file (do not update manually)
34+
- Commit and push your changes to the release branch:
35+
```sh
36+
$ git add -u
37+
$ git commit -m "version changes for vX.Y.Z"
38+
$ git push
39+
```
40+
- Create a GitHub pull request from `release-X.Y.Z` to `main` and wait for CI to be green
41+
- On the release branch, create and push a tag for the release:
42+
```sh
43+
$ git tag vX.Y.Z
44+
$ git push origin vX.Y.Z
45+
```
46+
47+
### Manual QA in Jupyter
48+
49+
We don't currently have automated tests for Jupyter, so we do this QA step manually.
50+
51+
The `full_build` job in the `release_build` workflow in CircleCI produces a tarball of artifacts `output.tgz`
52+
which you should download and decompress, which will give you a directory called `output`. The filenames within
53+
will contain version numbers; make sure the version numbers are correct.
54+
55+
Set up an environment with Jupyter, AnyWidget, and Pandas installed (`pip install jupyter anywidget pandas`). Then:
56+
57+
- unzip downloaded `output.tgz`
58+
- `pip uninstall plotly`
59+
- `pip install path/to/output/dist/plotly-X.Y.Z-py3-none-any.whl`
2060
21-
### Finalize versions
61+
You'll want to check, in both JupyterLab (launch with `jupyter lab`) and Jupyter Notebook (launch with `jupyter notebook`),
62+
that `go.Figure()` and `go.FigureWidget()` work as expected.
2263
23-
**Create a branch `git checkout -b release-X.Y.Z` *from the tip of `origin/main`*.**
64+
Notes:
65+
- **Start by creating a brand new notebook each time** so that there is no caching of previous results
66+
- **Do not run the Jupyter commands from the root `plotly.py/` directory on your machine** because Jupyter may be confused
67+
by metadata from previous Plotly.py builds
2468
25-
Manually update the versions to `X.Y.Z` in the files specified below.
69+
Code for testing `go.Figure()`:
70+
```python
71+
import plotly
72+
import plotly.graph_objects as go
2673

27-
- `pyproject.toml`
28-
+ update version
29-
- `CHANGELOG.md`
30-
+ update the release date
31-
- Commit your changes on the branch:
32-
+ `git commit -a -m "version changes for vX.Y.Z"`
33-
- Create a tag for Github release
34-
+ `git tag vX.Y.Z`
35-
+ `git push --atomic origin release-X.Y.Z vX.Y.Z`
36-
- Create a Github pull request from `release-X.Y.Z` to `main` and wait for CI to be green
74+
print(plotly.__version__) # Make sure version is correct
75+
fig = go.Figure(data=go.Scatter(x=[1, 2, 3, 4], y=[1, 3, 2, 4]))
76+
fig.show() # Figure should render in notebook
77+
```
3778

38-
### Download and QA CI Artifacts
79+
Code for testing `go.FigureWidget()`:
80+
```python
81+
import plotly
82+
import plotly.graph_objects as go
3983

40-
The `full_build` job in the `release_build` workflow in CircleCI produces a tarball of artifacts `output.tgz` which you should download and decompress, which will give you a directory called `output`. The filenames contained within will contain version numbers.
84+
print(plotly.__version__) # Make sure version is correct
85+
fig = go.Figure(data=go.Scatter(x=[1, 2, 3, 4], y=[1, 3, 2, 4]))
86+
figure_widget = go.FigureWidget(fig)
87+
figure_widget # Figure should render in notebook
88+
```
4189

42-
To locally install the PyPI dist, make sure you have an environment with JupyterLab installed (maybe one created with `conda create -n condatest python=3.10 jupyter anywidget pandas`):
90+
Once these are verified working, you can move on to publishing the release.
4391

44-
- `tar xzf output.tgz`
45-
- `pip uninstall plotly`
46-
- `conda uninstall plotly` (just in case!)
47-
- `pip install path/to/output/dist/plotly-X.Y.X-py3-none-any.whl`
92+
### Merge the release PR and make a GitHub release
4893

49-
You'll want to check, in both Lab and Notebook, **in a brand new notebook in each** so that there is no caching of previous results, that `go.Figure()` and `go.FigureWidget()` work without error.
94+
- Merge the pull request you created above into `main`
95+
- Go to https://github.com/plotly/plotly.py/releases and "Draft a new release"
96+
- Enter the `vX.Y.Z` tag you created already above and make "Release title" the same string as the tag.
97+
- Copy the changelog section for this version into "Describe this release"
98+
- Upload the build artifacts downloaded in the previous step (`.tar` and `.whl`)
5099

51-
### Publishing
100+
### Publishing to PyPI
52101

53-
Once you're satisfied that things render in Lab and Notebook in Widget and regular mode,
54-
you can publish the artifacts. **You will need special credentials from Plotly leadership to do this.**.
102+
The final step is to publish the release to PyPI. **You will need special permissions from Plotly leadership to do this.**.
55103

104+
You must install first install [Twine](https://pypi.org/project/twine/) (`pip install twine`) if not already installed.
56105

57106
Publishing to PyPI:
58107
```bash
59108
(plotly_dev) $ cd path/to/output
60109
(plotly_dev) $ twine upload plotly-X.Y.Z*
61110
```
62111

63-
### Merge the PR and make a Release
64-
65-
1. Merge the pull request you created above into `main`
66-
2. Go to https://github.com/plotly/plotly.py/releases and "Draft a new release"
67-
3. Enter the `vX.Y.Z` tag you created already above and make "Release title" the same string as the tag.
68-
4. Copy the changelog section for this version as the "Describe this release"
112+
You will be prompted to enter an API token; this can be generated in your PyPI account settings.
113+
Your account must have permissions to publish to the Plotly project on PyPI.
69114

70115
### Update documentation site
71116

@@ -85,9 +130,9 @@ to features in the release.
85130

86131
### Notify Stakeholders
87132

88-
* Post an announcement to the Plotly Python forum, with links to the README installation instructions and to the CHANGELOG.
133+
* Post an announcement to the [Plotly Python forum](https://community.plotly.com/c/plotly-python/5), with links to the README installation instructions and to the CHANGELOG.
89134
* Update the previous announcement to point to this one
90-
* Update the Github Release entry and CHANGELOG entry to have the nice title and a link to the announcement
135+
* Update the GitHub Release entry and CHANGELOG entry to have the nice title and a link to the announcement
91136
* Follow up on issues resolved in this release or forum posts with better answers as of this release
92137

93138
## Release process - Release *Candidate* of `plotly` package

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /