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
{{ message }}
Repository navigation
Commit 5dfdc25
Browse filesBrowse the repository at this point in the historyBrowse files
Follow the steps in this document to release a new version of Kaleido.
4
+
3
5
## Overview
4
6
5
-
Versions are determined automatically from git tags by `setuptools-git-versioning`. There is no hard-coded version string to update. Pushing a `v*` tag triggers CI, which tests and publishes the package to TestPyPI. Publishing to PyPI is done manually.
7
+
- Versions are determined automatically from git tags by `setuptools-git-versioning`. There is no hard-coded version string to update. Pushing a `v*` tag triggers CI, which tests and publishes the package to TestPyPI.
8
+
- Publishing to PyPI and creating a GitHub release are done manually.
6
9
7
10
## Release steps
8
11
9
12
1. Create release branch titled `release-vX.Y.Z`
10
-
- We try to follow [semantic versioning guidelines](https://semver.org) as much as possible
13
+
- We try to follow [semantic versioning guidelines](https://semver.org) as much as possible
11
14
2. Update the changelog:
12
15
- Review the items in `CHANGELOG.md` under the "Unreleased" header
13
-
- Ensure all items follow this format:
16
+
- Ensure all items follow this format:
14
17
-`- Description of change [[#XXXX](https://github.com/plotly/Kaleido/pull/XXXX)]`
15
-
- ...followed by `with thanks to @username for the contribution!` if the PR is from a community contributor
18
+
- ...followed by `with thanks to @username for the contribution!` if the PR is from a community contributor
16
19
- Add any missing items (PRs which were merged since the last release)
17
-
- PRs which don't change the contents of the built package (e.g. changes to the README, etc.) and minor dependency upgrades don't need to be mentioned
20
+
- PRs which don't change the contents of the built package (e.g. changes to the README, etc.) and minor dependency upgrades don't need to be mentioned
18
21
- Add a header `## vX.Y.Z` above the unreleased items, under `## Unreleased`
19
22
- Commit and push the `CHANGELOG.md` updates
20
-
- Note: In most cases, no other files need to be updated for the release. This is because the build process determines the package version from git tags, so the version number itself doesn't need to be updated anywhere besides the changelog.
21
-
5. Open a PR into `main`, wait for tests to pass, get approval, and then merge into `main`
22
-
6. On your local machine, tag the release branch merge commit with the version number:
23
+
-_Normally, the changelog is the only file that needs to be updated when making a release. The package version is determined automatically as explained in the overview above._
24
+
3. Open a PR into `main`, wait for tests to pass, get approval, and then merge into `main`.
25
+
4. On your local machine, check out `main`, pull, and tag the release branch merge commit with the version number:
23
26
24
27
git checkout main
25
28
git pull
@@ -34,25 +37,27 @@ Versions are determined automatically from git tags by `setuptools-git-versionin
34
37
35
38
nothing to commit, working tree clean
36
39
37
-
- If needed, stash or delete/move files to get to a clean environment. This is important because `setuptools-git-versioning` will not generate the correct version number if you have untracked or changed files presesnt.
40
+
- If needed, stash or delete/move files to get to a clean environment. This is important because `setuptools-git-versioning` will not generate the correct version number if you have untracked or changed files present.
38
41
- Build the package:
39
42
40
43
cd src/py/
41
44
python -m build
42
-
45
+
43
46
- Two artifacts will be added to `src/py/dist`. Ensure that they have the correct filenames:
44
-
-`kaleido-X.Y.Z-py3-none-any.whl`
45
-
-`kaleido-X.Y.Z.tar.gz`
46
-
7. Release on GitHub:
47
+
-`kaleido-X.Y.Z-py3-none-any.whl`
48
+
-`kaleido-X.Y.Z.tar.gz`
49
+
6. Release on GitHub:
47
50
- Go to https://github.com/plotly/Kaleido/releases and click "Draft a new release"
48
51
- Select the `vX.Y.Z` tag you created previously
49
52
- Copy and paste the relevant changelog section into the release notes
50
53
- Upload the `.whl` and `.tar.gz` build artifacts
51
-
8. Release on PyPI:
54
+
7. Release on PyPI:
52
55
- Install the `twine` Python package if not already installed (`pip install twine`)
53
56
-`cd` into the `dist/` directory
54
57
- Use `twine` to upload the artifacts to PyPI:
55
58
56
-
twine upload `kaleido-X.Y.Z*`
59
+
twine upload kaleido-X.Y.Z*
60
+
57
61
- You will need to enter an API token proving you have permission to publish
58
62
63
+
That's it! Make sure to visit https://pypi.org/project/kaleido to verify that the new package version is available.
0 commit comments