Skip to content

Commit

Permalink
DOC: Update release instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lithomas1 committed Nov 28, 2023
1 parent 762b61d commit 1ec6bb3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
27 changes: 14 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).

./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.

scripts/download_wheels.sh <VERSION>

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

Expand All @@ -463,23 +467,20 @@ 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

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
4 changes: 3 additions & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5254,7 +5254,6 @@ def _validate_fill_value(self, value):
"""
dtype = self.dtype
if isinstance(dtype, np.dtype) and dtype.kind not in "mM":
# return np_can_hold_element(dtype, value)
try:
return np_can_hold_element(dtype, value)
except LossySetitemError as err:
Expand Down Expand Up @@ -6917,6 +6916,9 @@ def insert(self, loc: int, item) -> Index:
dtype = self._find_common_type_compat(item)
return self.astype(dtype).insert(loc, item)

print(item)
print(type(item))

if arr.dtype != object or not isinstance(
item, (tuple, np.datetime64, np.timedelta64)
):
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
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

0 comments on commit 1ec6bb3

Please sign in to comment.