diff --git a/Dockerfile b/Dockerfile index 16f42aa..d06874e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,3 @@ RUN apt-get update && \ RUN conda update conda -y \ && conda install -y conda-build conda-verify gcc_linux-64 gxx_linux-64 \ && conda clean --all - -COPY pandas /pandas diff --git a/Makefile b/Makefile index d37edb8..5430a02 100644 --- a/Makefile +++ b/Makefile @@ -15,14 +15,12 @@ SHELL := /bin/bash init-repos: git clone https://github.com/pandas-dev/pandas && git -C pandas remote rename origin upstream && git -C pandas remote add origin https://github.com/$(GH_USERNAME)/pandas - git clone https://github.com/pandas-dev/pandas-website && git -C pandas-website remote rename origin upstream && git -C pandas-website remote add origin https://github.com/$(GH_USERNAME)/pandas-website git clone https://github.com/conda-forge/pandas-feedstock && git -C pandas-feedstock remote rename origin upstream && git -C pandas-feedstock remote add origin https://github.com/$(GH_USERNAME)/pandas-feedstock git clone --recursive https://github.com/MacPython/pandas-wheels && git -C pandas-wheels remote rename origin upstream && git -C pandas-wheels remote add origin https://github.com/$(GH_USERNAME)/pandas-wheels update-repos: git -C pandas checkout master && git -C pandas pull git -C pandas-wheels checkout master && git -C pandas-wheels pull - git -C pandas-website checkout master && git -C pandas-website pull git -C pandas-feedstock checkout master && git -C pandas-feedstock pull pushd pandas-wheels && git submodule update --recursive --remote && popd @@ -105,17 +103,6 @@ link-version: push-doc: | upload-doc link-stable link-version -website: - pushd pandas/web && \ - git checkout master && \ - git pull && \ - ./pandas_web.py pandas && \ - popd - - -push-website: - rsync -ravzI -e ssh pandas/web/build/* pandas.pydata.org:/usr/share/nginx/pandas/ - push-tag: pushd pandas && ../scripts/push-tag.py $(TAG) && popd @@ -136,7 +123,6 @@ wheels: download-wheels: ./scripts/download_wheels.py $(PANDAS_VERSION) - # TODO: Fetch from https://www.lfd.uci.edu/~gohlke/pythonlibs/ upload-pypi: diff --git a/README.md b/README.md index 060a502..0783348 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ Release automation for pandas. +**Windows users should follow the steps in `windows.md`** + ## Steps to a release - [ ] Manually update @@ -73,17 +75,14 @@ Docs. You can cheat and re-tag / rebuild these if needed. make doc ``` -Once the binaries finish, you'll need to manually upload the -wheels to PyPI. Assuming the job which `make wheels` triggered on MacPython completed successfully (you may want to double check this) -you can download a copy of the wheels for Mac / Linux locally. +Once the binaries finish, you'll need to manually upload the wheels to PyPI. +Assuming the job which `make wheels` triggered on MacPython completed successfully (you may want to double check this https://anaconda.org/multibuild-wheels-staging/pandas/files) you can download a copy of the wheels locally. ``` make download-wheels ``` -Christoph Gohlke builds the windows wheels. Fetch from from https://www.lfd.uci.edu/~gohlke/pythonlibs/ and download to the same `dist` directory. - Upload the wheels and sdist ``` @@ -94,41 +93,21 @@ Finalize the docs ``` make upload-doc -make website ``` -You also need to make edits to the pandas-website to appropriately display items. -Ideally this could be done via `make push-website` as the rule exists but the -intermediary steps aren't fully automated yet. +To make sure /stable and the latest minor revision point to the new release run the following. -```sh -pushd pandas-website -mv latest.rst previous.rst -# Recreate latest.rst to match release notes from GH in earlier steps -# Update pre_release.json and releases.json -git commit -am "Your updates" -git push -make html -make upload ``` - -To make sure /stable and the latest minor revision point to the new release run the following from root - -```sh -popd # should bring us back to root from pandas-website make link-stable make link-version ``` -Now check pandas.pydata.org and ensure the sidebar and links are correct! - goto announce. # Finalize -- [ ] Download Christoph's wheels and upload to PyPI - [ ] Announce Mailing List - [ ] Announce Twitter diff --git a/docker-files/windows/Dockerfile b/docker-files/windows/Dockerfile new file mode 100644 index 0000000..836f159 --- /dev/null +++ b/docker-files/windows/Dockerfile @@ -0,0 +1,23 @@ +FROM continuumio/miniconda3:latest + +RUN apt-get update && \ + apt-get install -y make rsync && \ + apt-get clean + +RUN conda update conda -y + +RUN git clone https://github.com/pandas-dev/pandas-release + +RUN conda env update -n base --file=pandas-release/environment.yml + +ARG GH_USERNAME + +ENV GH_USERNAME=$GH_USERNAME + +WORKDIR pandas-release + +RUN make init-repos + +RUN git config --global user.email "pandas-dev@python.org" + +RUN git config --global user.name "Pandas Development Team" diff --git a/scripts/pip_test.sh b/scripts/pip_test.sh index 8eb98ce..d0555bc 100755 --- a/scripts/pip_test.sh +++ b/scripts/pip_test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -# Cytyhon is *not* required here. +# Cython is *not* required here. conda create -n pip-test -y python=3.7 numpy pytz python-dateutil pytest pytest-mock hypothesis nomkl source activate pip-test diff --git a/windows.md b/windows.md new file mode 100644 index 0000000..37da179 --- /dev/null +++ b/windows.md @@ -0,0 +1,278 @@ +# README for MS Windows Users + +## Preparing for Your First Release + +Install Docker + +Ensure the following repositories are forked to your GitHub account + - https://github.com/conda-forge/pandas-feedstock + - https://github.com/MacPython/pandas-wheels + - https://github.com/pandas-dev/pandas + +Open an Anaconda Prompt + + +Build a Docker image with the conda base environment configured and repositories initialized. + +**change GH_USERNAME to your Github username** + +``` +docker build -t pandas-release --build-arg GH_USERNAME=simonjayhawkins -f docker-files/windows/Dockerfile . +``` + +## Preparing the Release Environment for a New Release + +Next we will prepare a Docker container for interactive use during the release process and copy the repositories +from the Docker image into a Docker volume for building the distribution and testing. + +To start with a clean volume. (after a previous release) + +``` +docker volume rm pandas-release +``` + +**change TAG to the release version** +``` +docker run -it --env TAG=v1.0.5 --name=pandas-release -v pandas-release:/pandas-release pandas-release /bin/bash +``` + +The Docker release container should be now be running. + +Make sure the repos are up-to-date + +``` +make update-repos +``` + +Tag the release. (This doesn't push the tag) + +``` +make tag +``` + +Stop the container. +``` +exit +``` + +## Preparing the Build and Test Environment + + +Create the Docker image for the sdist build, pip test and conda test containers + +``` +docker build -t pandas-build . +``` + +## Build the sdist + +``` +docker run -it --rm -v pandas-release:/pandas-release pandas-build /bin/bash + +ln -s pandas-release/pandas pandas + +cd pandas-release/ + +./scripts/build_sdist.sh + +exit +``` + +## Pip Tests + + +**change filename to the release version** + +``` +docker run -it --rm -v pandas-release:/pandas-release pandas-build /bin/bash + +ln -s pandas-release/pandas pandas + +cd pandas-release/ + +./scripts/pip_test.sh /pandas/dist/pandas-1.0.5.tar.gz + +exit + +``` + +## Conda Tests + + **change PANDAS_VERSION to the release version** + +``` +docker run -it --rm --env PANDAS_VERSION=1.0.5 -v pandas-release:/pandas-release pandas-build /bin/bash + +ln -s pandas-release/pandas pandas + +cd pandas-release/ + +conda build --numpy=1.17.3 --python=3.8 ./recipe --output-folder=/pandas/dist + +exit + +``` + +## Copy the sdist File from the Docker Volume to the Local Host. + +**change filename to the release version** + +``` +docker run -t --rm -v %cd%:/local -v pandas-release:/pandas-release pandas-release /bin/bash -c "cp /pandas-release/pandas/dist/pandas-1.0.5.tar.gz /local/" +``` + +## Push the Tag. + +**No going back now.** + +Restart the release container. + +``` +docker start pandas-release -i + +make push-tag + +exit +``` + +## Create New Branch +(not needed for Patch release) + +On pandas you should also now create and tag a new branch, so + +... + +## Create a Release + +Now manually create a release https://github.com/pandas-dev/pandas/releases + +Make sure to upload the sdist as the "binary". Conda-forge uses it. + + +## Start the Binary Builds. + +Restart the release container. + +``` +docker start pandas-release -i + +make conda-forge + +make wheels + +exit +``` + +Open PRs for each of those. + +Note that `make wheels` actually pushes a job to MacPython to produce wheels which we will download later. + + +## Build the Docs. +You can cheat and re-tag / rebuild these if needed. + +``` +docker run -it --name=pandas-docs -v pandas-release:/pandas-release pandas-docs /bin/bash + +rm -r pandas + +ln -s pandas-release/pandas pandas + +cd pandas-release/ + +# following maybe necessary to prevent segfaults +conda update -n base -c defaults conda + +conda env create --file=/pandas/environment.yml --name=pandas + +./scripts/build-docs.sh + +exit +``` + +Copy the built doc files to host and manually inspect html and pdf docs. + +**first remove the local pandas-docs directory (just manually use file manager for now)** + +``` +docker run -t --rm -v %cd%:/local -v pandas-release:/pandas-release pandas-release /bin/bash -c "cp -r /pandas-release/pandas/doc/build/ /local/pandas-docs" +``` + +## Upload the Docs + +Copy ssh key and config into release container and restart container. + +``` +docker cp %userprofile%/.ssh pandas-release:/root/.ssh + +docker start pandas-release -i + +chmod 400 ~/.ssh/id_rsa + +make upload-doc + +exit +``` + +## Upload the Binarys to PyPI + +Once the binaries finish, you'll need to manually upload the wheels to PyPI. + +Assuming the job which `make wheels` triggered on MacPython completed successfully (you may want to double check this https://anaconda.org/multibuild-wheels-staging/pandas/files) you can download a copy of the wheels locally. + +``` +docker start pandas-release -i + +make download-wheels + +make upload-pypi + +exit +``` + +## Finalize the Docs + +Do this once the wheels are available on PyPI. + +``` +docker start pandas-release -i + +make link-stable + +make link-version + +exit +``` + +# Announce + +- [ ] Announce Mailing List +- [ ] Announce Twitter