Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more instructions to the release guide #14263

Merged
merged 4 commits into from
Nov 3, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@

3. Unpin specific versions from setup.py that use a git install.

4. Commit these changes with the message: "Release: VERSION"
4. Commit these changes with the message: "Release: VERSION" and push.

5. Add a tag in git to mark the release: "git tag VERSION -m 'Adds tag VERSION for pypi' "
5. Wait for the tests on master to be completed and be green (otherwise revert and fix bugs)

6. Add a tag in git to mark the release: "git tag VERSION -m 'Adds tag VERSION for pypi' "
sgugger marked this conversation as resolved.
Show resolved Hide resolved
Push the tag to git: git push --tags origin master

6. Build both the sources and the wheel. Do not change anything in setup.py between
7. Build both the sources and the wheel. Do not change anything in setup.py between
creating the wheel and the source distribution (obviously).

For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
Expand All @@ -38,7 +40,7 @@
For the sources, run: "python setup.py sdist"
You should now have a /dist directory with both .whl and .tar.gz source versions.

7. Check that everything looks correct by uploading the package to the pypi test server:
8. Check that everything looks correct by uploading the package to the pypi test server:

twine upload dist/* -r pypitest
(pypi suggest using twine as other methods upload files via plaintext.)
Expand All @@ -48,12 +50,16 @@
Check that you can install it in a virtualenv by running:
pip install -i https://testpypi.python.org/pypi transformers

8. Upload the final version to actual pypi:
Check you can run the following commands:
python -c "from transformers import pipeline; classifier = pipeline('text-classification'); print(classifier('What a nice release'))"
python -c "from transformers import *"

9. Upload the final version to actual pypi:
twine upload dist/* -r pypi

9. Copy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory.
10. Copy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory.

10. Run `make post-release` (or `make post-patch` for a patch release).
11. Run `make post-release` (or `make post-patch` for a patch release).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For post-patch it actually needs to be checked out on master, would be nice to mention it

"""

import os
Expand Down