This repository was archived by the owner on Jun 12, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Scripts for Windows host and update for new website #32
Merged
TomAugspurger
merged 12 commits into
pandas-dev:master
from
simonjayhawkins:windows-host
Jul 17, 2020
Merged
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
eb14034
WIP: scripts for Windows host
simonjayhawkins ca53929
wip - was using volume, will change to mount cloned directory
simonjayhawkins 129a8ed
wip
simonjayhawkins cce6e8a
wip
simonjayhawkins f6ab739
wip
simonjayhawkins 1ef9852
whitespace
simonjayhawkins 3608bae
wip
simonjayhawkins 126cbc1
revert changes to Makefile
simonjayhawkins db7b75d
wip
simonjayhawkins 9cf9671
wip
simonjayhawkins 2dba9d6
delete web stuff
simonjayhawkins e181902
remove webiste repo link
simonjayhawkins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM continuumio/miniconda3:latest | ||
|
||
RUN apt-get update && apt-get install make && 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 "[email protected]" | ||
|
||
RUN git config --global user.name "Pandas Development Team" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
|
||
|
||
install Docker | ||
|
||
ensure the following repositories are forked to your GitHub account | ||
- https://github.com/pandas-dev/pandas-website | ||
- https://github.com/conda-forge/pandas-feedstock | ||
- https://github.com/MacPython/pandas-wheels | ||
- https://github.com/pandas-dev/pandas | ||
|
||
|
||
Open an Anaconda Prompt | ||
TODO: resolve git bash Docker volume issues so that make can be used on host | ||
|
||
|
||
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 . | ||
``` | ||
|
||
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 | ||
TODO: also make sure conda environment is up-to-date and pandas-release repo is up-to-date if | ||
re-using an older Docker image | ||
|
||
``` | ||
make update-repos | ||
``` | ||
|
||
Tag the release (This doesn't push the tag) | ||
|
||
``` | ||
make tag | ||
``` | ||
|
||
stop the container | ||
``` | ||
exit | ||
``` | ||
|
||
create the Docker image for the sdist build, pip test and conda test containers | ||
TODO: maybe update the image with apt-get for cached build | ||
|
||
``` | ||
docker build -t pandas-build . | ||
``` | ||
|
||
build the sdist | ||
|
||
TODO: some of the next steps are repetative. set WORKDIR and symlink to /pandas in pandas-build Docker image instead | ||
TODO: add container name (as in Makefile) and do not destroy container on exit | ||
|
||
``` | ||
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 | ||
|
||
TODO: avoid need to pass explicit filename below | ||
TODO: add container name (as in Makefile) and do not destroy container on exit | ||
|
||
``` | ||
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 | ||
|
||
TODO: add container name (as in Makefile) and do not destroy container on exit | ||
TODO: avoid need to re-type version below | ||
|
||
``` | ||
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 | ||
TODO: avoid need to enter specific filename below (maybe just copy contents of dist directory instead) | ||
|
||
``` | ||
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 | ||
|
||
... | ||
|
||
On pandas you should also now create and tag a new branch, so | ||
|
||
... | ||
``` | ||
|
||
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. | ||
|
||
|
||
Docs. You can cheat and re-tag / rebuild these if needed. | ||
|
||
<!-- doc: | ||
docker run -it \ | ||
--name=pandas-docs \ | ||
-v ${CURDIR}/pandas:/pandas \ | ||
-v ${CURDIR}/scripts/build-docs.sh:/build-docs.sh \ | ||
pandas-docs \ | ||
/build-docs.sh --> | ||
|
||
TODO build an intermediate doc image (and why pandas conda env not in Docker image?) | ||
``` | ||
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. | ||
|
||
``` | ||
docker run -it --rm -v %cd%:/local -v pandas-release:/pandas-release pandas-release /bin/bash -c "cp -r /pandas-release/pandas/doc/build/ /local/pandas-docs" | ||
``` | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think not needed