@@ -56,7 +56,7 @@ To run tests locally execute:
56
56
tox -e py
57
57
58
58
This will run the test suite for the same Python version as under which ``tox `` is installed. Alternatively you can
59
- specify a specific version of python by using the ``pyNN `` format, such as: ``py38 ``, ``pypy3 ``, etc.
59
+ specify a specific version of Python by using the ``pyNN `` format, such as: ``py38 ``, ``pypy3 ``, etc.
60
60
61
61
``tox `` has been configured to forward any additional arguments it is given to ``pytest ``.
62
62
This enables the use of pytest's
@@ -71,14 +71,14 @@ select tests using the various ways that pytest provides:
71
71
tox -e py -- -k " test_extra"
72
72
73
73
Some tests require additional dependencies to be run, such is the various shell activators (``bash ``, ``fish ``,
74
- ``powershell ``, etc). These tests will automatically be skipped if these are not present, note however that in CI
74
+ ``powershell ``, etc). The tests will be skipped automatically if the dependencies are not present. Please note however that in CI
75
75
all tests are run; so even if all tests succeed locally for you, they may still fail in the CI.
76
76
77
77
Running linters
78
78
~~~~~~~~~~~~~~~
79
79
80
80
tox uses :pypi: `pre-commit ` for managing linting of the codebase. ``pre-commit `` performs various checks on all
81
- files in tox and uses tools that help follow a consistent code style within the codebase. To use linters locally,
81
+ files in tox and uses tools that help following a consistent code style within the codebase. To use linters locally,
82
82
run:
83
83
84
84
.. code-block :: shell
@@ -96,7 +96,7 @@ Code style guide
96
96
97
97
- First and foremost, the linters configured for the project must pass; this generally means following PEP-8 rules,
98
98
as codified by: ``flake8 ``, ``black ``, ``isort ``, ``pyupgrade ``.
99
- - Packaging options should be specified within ``setup.cfg ``, ``setup.py `` is only kept for editable installs.
99
+ - Packaging options should be specified within ``setup.cfg ``; ``setup.py `` is only kept for editable installs.
100
100
- All code (tests too) must be type annotated as much as required by ``mypy ``.
101
101
- We use a line length of 120.
102
102
- Exception messages should only be capitalized (and ended with a period/exclamation mark) if they are multi-sentenced,
@@ -132,13 +132,13 @@ Contributing
132
132
Submitting pull requests
133
133
~~~~~~~~~~~~~~~~~~~~~~~~
134
134
135
- Submit pull requests against the ``master `` branch, providing a good description of what you're doing and why. You must
135
+ Submit pull requests (PRs) against the ``master `` branch, providing a good description of what you're doing and why. You must
136
136
have legal permission to distribute any code you contribute to tox and it must be available under the MIT
137
137
License. Provide tests that cover your changes and run the tests locally first. tox
138
138
:ref: `supports <compatibility-requirements >` multiple Python versions and operating systems. Any pull request must
139
139
consider and work on all these platforms.
140
140
141
- Pull Requests should be small to facilitate review. Keep them self-contained, and limited in scope. `Studies have shown
141
+ Pull requests should be small to facilitate review. Keep them self-contained, and limited in scope. `Studies have shown
142
142
<https://www.kessler.de/prd/smartbear/BestPracticesForPeerCodeReview.pdf> `_ that review quality falls off as patch size
143
143
grows. Sometimes this will result in many small PRs to land a single large feature. In particular, pull requests must
144
144
not be treated as "feature branches", with ongoing development work happening within the PR. Instead, the feature should
@@ -151,22 +151,22 @@ or whitespace within lines. Such changes can be made separately, as a "formattin
151
151
Automated testing
152
152
~~~~~~~~~~~~~~~~~
153
153
154
- All pull requests and merges to ' master' branch are tested using
155
- `Azure Pipelines <https://azure.microsoft. com/en-gb/services/devops/pipelines/ >`_ (configured by
156
- ``azure-pipelines.yml `` file at the root of the repository ). You can find the status and results to the CI runs for your
154
+ All pull requests and merges to the `` master `` branch are tested using
155
+ `GitHub Actions <https://github. com/features/actions >`_ (configured by `` check.yml `` file inside the
156
+ ``.github/workflows `` directory ). You can find the status and the results to the CI runs for your
157
157
PR on GitHub's Web UI for the pull request. You can also find links to the CI services' pages for the specific builds in
158
158
the form of "Details" links, in case the CI run fails and you wish to view the output.
159
159
160
160
To trigger CI to run again for a pull request, you can close and open the pull request or submit another change to the
161
161
pull request. If needed, project maintainers can manually trigger a restart of a job/build.
162
162
163
- NEWS entries
164
- ~~~~~~~~~~~~
163
+ Changelog entries
164
+ ~~~~~~~~~~~~~~~~~
165
165
166
- The ``changelog.rst `` file is managed using :pypi: `towncrier ` and all non trivial changes must be accompanied by a news
167
- entry. To add an entry to the news file , first you need to have created an issue describing the change you want to
168
- make. A Pull Request itself *may * function as such, but it is preferred to have a dedicated issue (for example, in case
169
- the PR ends up rejected due to code quality reasons).
166
+ The ``changelog.rst `` file is managed using :pypi: `towncrier ` and all non trivial changes must be accompanied by a
167
+ changelog entry. To add an entry to the changelog , first you need to have created an issue describing the
168
+ change you want to make. A pull request itself *may * function as such, but it is preferred to have a dedicated issue
169
+ (for example, in case the PR ends up rejected due to code quality reasons).
170
170
171
171
Once you have an issue or pull request, you take the number and you create a file inside of the ``docs/changelog ``
172
172
directory named after that issue number with an extension of:
@@ -183,27 +183,20 @@ added a feature and deprecated/removed the old feature at the same time, you wou
183
183
``docs/changelog/1234.bugfix.rst `` and ``docs/changelog/1234.remove.rst ``). Likewise if a PR touches multiple issues/PRs
184
184
you may create a file for each of them with the same contents and :pypi: `towncrier ` will deduplicate them.
185
185
186
- Contents of a NEWS entry
187
- ^^^^^^^^^^^^^^^^^^^^^^^^
186
+ Contents of a changelog entry
187
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188
188
189
- The contents of this file are reStructuredText formatted text that will be used as the content of the news file entry.
189
+ The content of this file is reStructuredText formatted text that will be used as the content of the changelog entry.
190
190
You do not need to reference the issue or PR numbers here as towncrier will automatically add a reference to all of
191
- the affected issues when rendering the news file .
191
+ the affected issues when rendering the changelog .
192
192
193
- In order to maintain a consistent style in the ``changelog.rst `` file, it is preferred to keep the news entry to the
193
+ In order to maintain a consistent style in the ``changelog.rst `` file, it is preferred to keep the entries to the
194
194
point, in sentence case, shorter than 120 characters and in an imperative tone -- an entry should complete the sentence
195
195
``This change will … ``. In rare cases, where one line is not enough, use a summary line in an imperative tone followed
196
196
by a blank line separating it from a description of the feature/change in one or more paragraphs, each wrapped
197
- at 120 characters. Remember that a news entry is meant for end users and should only contain details relevant to an end
198
- user.
199
-
200
- Choosing the type of NEWS entry
201
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197
+ at 120 characters. Remember that a changelog entry is meant for end users and should only contain details relevant to an
198
+ end user.
202
199
203
- A trivial change is anything that does not warrant an entry in the news file. Some examples are: code refactors that
204
- don't change anything as far as the public is concerned, typo fixes, white space modification, etc. To mark a PR
205
- as trivial a contributor simply needs to add a randomly named, empty file to the ``news/ `` directory with the extension
206
- of ``.trivial ``.
207
200
208
201
Becoming a maintainer
209
202
~~~~~~~~~~~~~~~~~~~~~
0 commit comments