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

DOC: Update release instructions #56232

Merged
merged 4 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
26 changes: 13 additions & 13 deletions doc/source/development/maintaining.rst
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,13 @@ which will be triggered when the tag is pushed.
git tag -a v1.5.0.dev0 -m "DEV: Start 1.5.0"
git push upstream main --follow-tags

3. Build the source distribution (git must be in the tag commit)::
3. Download the source distribution and wheels from the `wheel staging area <https://anaconda.org/scientific-python-nightly-wheels/pandas>`_.
Be careful to make sure that no wheels are missing (e.g. due to failed builds).
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to describe how we can tell if a build failed

Copy link
Member Author

Choose a reason for hiding this comment

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

You kind of have to look manually for the individually jobs unfortunately.

I'm trying to build reporting for failed jobs here
#55903

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha, yeah let's assume that issue will address my comment here


./setup.py sdist --formats=gztar --quiet
Running scripts/download_wheels.sh with the version that you want to download wheels/the sdist for should do the trick.
This script will make a ``dist`` folder inside your clone of pandas and put the downloaded wheels and sdist there.
lithomas1 marked this conversation as resolved.
Show resolved Hide resolved

scripts/download_wheels.sh <VERSION>

4. Create a `new GitHub release <https://github.com/pandas-dev/pandas/releases/new>`_:

Expand All @@ -463,23 +467,19 @@ which will be triggered when the tag is pushed.
- Set as the latest release: Leave checked, unless releasing a patch release for an older version
(e.g. releasing 1.4.5 after 1.5 has been released)

5. The GitHub release will after some hours trigger an
5. Upload wheels to PyPI::

twine upload pandas/dist/pandas-<version>*.{whl,tar.gz} --skip-existing
Copy link
Member

Choose a reason for hiding this comment

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

Still not fond of using the pypi publish action https://github.com/pypa/gh-action-pypi-publish (by gating it behind a manual trigger)?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I'm warming up to it now.

Maybe something like https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment would be helpful?

Copy link
Member

Choose a reason for hiding this comment

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

Nice yeah I think that would work. I can also try to look into this sometime in the future

Copy link
Member

Choose a reason for hiding this comment

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

The latest version of the GitHub action now also implements the "Trusted Publisher" model of PyPI (https://github.com/marketplace/actions/pypi-publish#trusted-publishing), avoiding creating an API token that is stored as a secret in github


6. The GitHub release will after some hours trigger an
`automated conda-forge PR <https://github.com/conda-forge/pandas-feedstock/pulls>`_.
(If you don't want to wait, you can open an issue titled ``@conda-forge-admin, please update version`` to trigger the bot.)
Merge it once the CI is green, and it will generate the conda-forge packages.

In case a manual PR needs to be done, the version, sha256 and build fields are the
ones that usually need to be changed. If anything else in the recipe has changed since
the last release, those changes should be available in ``ci/meta.yaml``.

6. Packages for supported versions in PyPI are built automatically from our CI.
Once all packages are build download all wheels from the
`Anaconda repository <https://anaconda.org/multibuild-wheels-staging/pandas/files?version=\<version\>>`_
where our CI published them to the ``dist/`` directory in your local pandas copy.
You can use the script ``scripts/download_wheels.sh`` to download all wheels at once.

7. Upload wheels to PyPI::

twine upload pandas/dist/pandas-<version>*.{whl,tar.gz} --skip-existing

Post-Release
````````````

Expand Down
3 changes: 2 additions & 1 deletion scripts/download_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# one by one to the dist/ directory where they would be generated.

VERSION=$1
mkdir -p $(dirname -- $0)/../dist
Copy link
Member

Choose a reason for hiding this comment

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

Sorry for the late review. Small comment, but seems like you could just do mkdir -p $DIST_DIR if you write this in the line after defining the directory, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, I think.

Will make a note to do this (hopefully I don't forget).

DIST_DIR="$(realpath $(dirname -- $0)/../dist)"

if [ -z $VERSION ]; then
Expand All @@ -20,7 +21,7 @@ fi

curl "https://anaconda.org/multibuild-wheels-staging/pandas/files?version=${VERSION}" | \
grep "href=\"/multibuild-wheels-staging/pandas/${VERSION}" | \
sed -r 's/.*<a href="([^"]+\.whl)">.*/\1/g' | \
sed -r 's/.*<a href="([^"]+\.(whl|tar.gz))">.*/\1/g' | \
awk '{print "https://anaconda.org" $0 }' | \
xargs wget -P $DIST_DIR

Expand Down
Loading