summaryrefslogtreecommitdiff
path: root/docs/development.rst
blob: 0100e53cfe511384a90b222164f4791d58c26177 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Development
===========

Pull Requests
-------------

- Submit Pull Requests against the ``master`` branch.
- Provide a good description of what you're doing and why.
- Provide tests that cover your changes and try to run the tests locally first.

**Example**. Assuming you set up GitHub account, forked wheel repository from
https://github.com/pypa/wheel to your own page via web interface, and your
fork is located at https://github.com/yourname/wheel

::

  $ git clone git@github.com:pypa/wheel.git
  $ cd wheel
  # ...
  $ git diff
  $ git add <modified> ...
  $ git status
  $ git commit

You may reference relevant issues in commit messages (like #1259) to
make GitHub link issues and commits together, and with phrase like
"fixes #1259" you can even close relevant issues automatically. Now
push the changes to your fork::

  $ git push git@github.com:yourname/wheel.git

Open Pull Requests page at https://github.com/yourname/wheel/pulls and
click "New pull request". That's it.

Automated Testing
-----------------

All pull requests and merges to 'master' branch are tested in `Github Actions`_
based on the workflows in the ``.github`` directory.

The only way to trigger the test suite to run again for a pull request is to
submit another change to the pull branch.

.. _Github Actions: https://github.com/actions

Running Tests Locally
---------------------

Python requirements: tox_ or pytest_

To run the tests via tox against all matching interpreters::

  $ tox

To run the tests via tox against a specific environment::

  $ tox -e py35

Alternatively, you can run the tests via pytest using your default interpreter::

  $ pip install -e .[test]  # Installs the test dependencies
  $ pytest                  # Runs the tests with the current interpreter

The above pip install command will replace the current interpreter's installed
wheel package with the development package being tested. If you use this
workflow, it is recommended to run it under a virtualenv_.

.. _tox: https://pypi.org/project/tox/
.. _pytest: https://pypi.org/project/pytest/
.. _virtualenv: https://pypi.org/project/virtualenv/

Getting Involved
----------------

The wheel project welcomes help in the following ways:

- Making Pull Requests for code, tests, or docs.
- Commenting on open issues and pull requests.
- Helping to answer questions on the `mailing list`_.

.. _`mailing list`: https://mail.python.org/mailman/listinfo/distutils-sig

Release Process
---------------

To make a new release:

#. Edit ``docs/news.rst`` and replace ``**UNRELEASED**`` with a release version
   and date, like ``**X.Y.Z (20XX-YY-ZZ)**``.
#. Replace the ``__version__`` attribute in ``src/wheel/__init__.py`` with the
   same version number as above (without the date of course).
#. Create a new git tag matching the version exactly
#. Push the new tag to GitHub

Pushing a new tag to GitHub will trigger the publish workflow which package the
project and publish the resulting artifacts to PyPI.