Skip to content

Commit

Permalink
DOC Update maintainers' guide to use new wheel builder system (scikit…
Browse files Browse the repository at this point in the history
…-learn#18878)

Co-authored-by: Olivier Grisel <[email protected]>
  • Loading branch information
alfaro96 and ogrisel committed Nov 26, 2020
1 parent 68268eb commit eaa45c8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 51 deletions.
75 changes: 26 additions & 49 deletions doc/developers/maintainer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ permissions given to maintainers, which includes:
- become a member of the *scikit-learn* team on conda-forge by editing the
``recipe/meta.yaml`` file on
``https://github.com/conda-forge/scikit-learn-feedstock``
- *maintainer* on ``https://github.com/MacPython/scikit-learn-wheels``


.. _preparing_a_release_pr:

Expand Down Expand Up @@ -130,44 +128,19 @@ Making a release
candidate period, the latest stable is two versions behind the master
branch, instead of one.

3. At this point all relevant PRs should have been merged into the `0.99.X`
branch. Create the source tarball:

- Wipe clean your repo:

.. prompt:: bash $

git clean -xfd

- Generate the tarball:

.. prompt:: bash $

python setup.py sdist

- You can also test a binary dist build using:

.. prompt:: bash $

python setup.py bdist_wheel

- You can test if PyPi is going to accept the package using:

.. prompt:: bash $

twine check dist/*
3. Proceed with caution. Ideally, tags should be created when you're almost
certain that the release is ready, since adding a tag to the main repo can
trigger certain automated processes. You can create a PR in the main repo
and trigger the wheel builder with the ``[cd build]`` commit marker using
the command:

.. prompt:: bash $

You can run ``twine check`` after step 5 (fetching artifacts) as well.
git commit --allow-empty -m "Trigger wheel builder workflow: [cd build]"

The result should be in the `dist/` folder. We will upload it later
with the wheels. Check that you can install it in a new virtualenv and
that the tests pass.
The wheel building workflow is managed by GitHub Actions and the results be browsed at:
https://github.com/scikit-learn/scikit-learn/actions?query=workflow%3A%22Wheel+builder%22

4. Proceed with caution. Ideally, tags should be created when you're almost
certain that the release is ready, since adding a tag to the main repo can
trigger certain automated processes. You can test upload the ``sdist`` to
``test.pypi.org``, and test the next step by setting ``BUILD_COMMIT`` to the
branch name (``0.99.X`` for instance) in a PR to the wheel building repo.
Once all works, you can proceed with tagging. Create the tag and push it (if
it's an RC, it can be ``0.xxrc1`` for instance):

Expand All @@ -176,22 +149,28 @@ Making a release
git tag -a 0.99 # in the 0.99.X branch
git push [email protected]:scikit-learn/scikit-learn.git 0.99

5. Update the dependency versions and set ``BUILD_COMMIT`` variable to the
release tag at:
.. note::

Before building the wheels, make sure that the ``pyproject.toml`` file is
up to date and using the oldest version of ``numpy`` for each Python version
to avoid ABI incompatibility issues. Moreover, a new line have to be included
in the ``pyproject.toml`` file for each new supported version of Python.

https://github.com/MacPython/scikit-learn-wheels

Once the CI has completed successfully, collect the generated binary wheel
packages and upload them to PyPI by running the following commands in the
scikit-learn source folder (checked out at the release tag):
4. Once the CD has completed successfully, collect the generated binary
wheel packages and upload them to PyPI by running the following commands
in the scikit-learn source folder (checked out at the release tag):

.. prompt:: bash $

rm -r dist # only if there's anything other than the sdist tar.gz there
rm -r dist
pip install -U wheelhouse_uploader twine
python setup.py fetch_artifacts

6. Check the content of the `dist/` folder: it should contain all the wheels
This command will download all the binary packages accumulated in the `staging area on the anaconda.org
hosting service <https://anaconda.org/scikit-learn-wheels-staging/scikit-learn/files>`_ and put them in
your local `./dist` folder.

5. Check the content of the `./dist` folder: it should contain all the wheels
along with the source tarball ("scikit-learn-RRR.tar.gz").

Make sure that you do not have developer versions or older versions of
Expand All @@ -209,7 +188,7 @@ Making a release

twine upload dist/*

7. For major/minor (not bug-fix release), update the symlink for ``stable``
6. For major/minor (not bug-fix release), update the symlink for ``stable``
and the ``latestStable`` variable in
https://github.com/scikit-learn/scikit-learn.github.io:

Expand All @@ -231,8 +210,6 @@ The following GitHub checklist might be helpful in a release PR::

* [ ] update news and what's new date in master and release branch
* [ ] create tag
* [ ] update dependencies and release tag at
https://github.com/MacPython/scikit-learn-wheels
* [ ] twine the wheels to PyPI when that's green
* [ ] https://github.com/scikit-learn/scikit-learn/releases draft
* [ ] confirm bot detected at
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ filterwarnings =

[wheelhouse_uploader]
artifact_indexes=
# Wheels built by Azure Pipelines (only for specific tags):
# https://github.com/MacPython/scikit-learn-wheels
# Wheels built by the "Wheel builder" workflow in GitHub actions:
# https://github.com/scikit-learn/scikit-learn/actions?query=workflow%3A%22Wheel+builder%22
https://pypi.anaconda.org/scikit-learn-wheels-staging/simple/scikit-learn/

[flake8]
Expand Down

0 comments on commit eaa45c8

Please sign in to comment.