| 1 |
Development |
| 2 |
=========== |
| 3 |
|
| 4 |
Pull Requests |
| 5 |
------------- |
| 6 |
|
| 7 |
- Submit Pull Requests against the ``main`` branch. |
| 8 |
- Provide a good description of what you're doing and why. |
| 9 |
- Provide tests that cover your changes and try to run the tests locally first. |
| 10 |
|
| 11 |
**Example**. Assuming you set up a GitHub account, forked the wheel repository from |
| 12 |
https://github.com/pypa/wheel to your own page via web interface, and your |
| 13 |
fork is located at https://github.com/yourname/wheel |
| 14 |
|
| 15 |
:: |
| 16 |
|
| 17 |
$ git clone [email protected]:pypa/wheel.git |
| 18 |
$ cd wheel |
| 19 |
# ... |
| 20 |
$ git diff |
| 21 |
$ git add <modified> ... |
| 22 |
$ git status |
| 23 |
$ git commit |
| 24 |
|
| 25 |
You may reference relevant issues in commit messages (like #1259) to |
| 26 |
make GitHub link issues and commits together, and with a phrase like |
| 27 |
"fixes #1259" you can even close relevant issues automatically. Now |
| 28 |
push the changes to your fork:: |
| 29 |
|
| 30 |
$ git push [email protected]:yourname/wheel.git |
| 31 |
|
| 32 |
Open Pull Requests page at https://github.com/yourname/wheel/pulls and |
| 33 |
click "New pull request". That's it. |
| 34 |
|
| 35 |
Automated Testing |
| 36 |
----------------- |
| 37 |
|
| 38 |
All pull requests and merges to ``main`` branch are tested in `GitHub Actions`_ |
| 39 |
based on the workflows in the ``.github`` directory. |
| 40 |
|
| 41 |
The only way to trigger the test suite to run again for a pull request is to |
| 42 |
submit another change to the pull branch. |
| 43 |
|
| 44 |
.. _GitHub Actions: https://github.com/actions |
| 45 |
|
| 46 |
Running Tests Locally |
| 47 |
--------------------- |
| 48 |
|
| 49 |
Python requirements: tox_ or pytest_ |
| 50 |
|
| 51 |
To run the tests via tox against all matching interpreters:: |
| 52 |
|
| 53 |
$ tox |
| 54 |
|
| 55 |
To run the tests via tox against a specific environment:: |
| 56 |
|
| 57 |
$ tox -e py39 |
| 58 |
|
| 59 |
Alternatively, you can run the tests via pytest using your default interpreter:: |
| 60 |
|
| 61 |
$ pip install -e .[test] # Installs the test dependencies |
| 62 |
$ pytest # Runs the tests with the current interpreter |
| 63 |
|
| 64 |
The above pip install command will replace the current interpreter's installed |
| 65 |
wheel package with the development package being tested. If you use this |
| 66 |
workflow, it is recommended to run it under a virtualenv_. |
| 67 |
|
| 68 |
.. _tox: https://pypi.org/project/tox/ |
| 69 |
.. _pytest: https://pypi.org/project/pytest/ |
| 70 |
.. _virtualenv: https://pypi.org/project/virtualenv/ |
| 71 |
|
| 72 |
Getting Involved |
| 73 |
---------------- |
| 74 |
|
| 75 |
The wheel project welcomes help in the following ways: |
| 76 |
|
| 77 |
- Making Pull Requests for code, tests, or docs. |
| 78 |
- Commenting on open issues and pull requests. |
| 79 |
- Helping to answer questions on the `mailing list`_. |
| 80 |
|
| 81 |
.. _`mailing list`: https://mail.python.org/mailman/listinfo/distutils-sig |
| 82 |
|
| 83 |
Release Process |
| 84 |
--------------- |
| 85 |
|
| 86 |
To make a new release: |
| 87 |
|
| 88 |
#. Edit ``docs/news.rst`` and replace ``**UNRELEASED**`` with a release version |
| 89 |
and date, like ``**X.Y.Z (20XX-YY-ZZ)**``. |
| 90 |
#. Replace the ``__version__`` attribute in ``src/wheel/__init__.py`` with the |
| 91 |
same version number as above (without the date of course). |
| 92 |
#. Create a new git tag matching the version exactly |
| 93 |
#. Push the new tag to GitHub |
| 94 |
|
| 95 |
Pushing a new tag to GitHub will trigger the publish workflow which will package the |
| 96 |
project and publish the resulting artifacts to PyPI. |