diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c6aa37f..f716b70f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,10 +163,14 @@ jobs: # increase in stability over using the latest minor. - name: CPython 3.9 tox: py39 - action: 3.9 + python-version: '3.9' task: - name: Check Newsfragment tox: check-newsfragment + - name: Check package manifest + tox: check-manifest + - name: Check pre-commit + tox: pre-commit steps: - uses: actions/checkout@v3 @@ -182,7 +186,7 @@ jobs: - name: Set up ${{ matrix.python.name }} uses: actions/setup-python@v3 with: - python-version: ${{ matrix.python.action }} + python-version: ${{ matrix.python.python-version }} - name: Install dependencies run: python -m pip install --upgrade pip tox diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 22a34b58..76039e21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,6 @@ repos: rev: 4.0.1 hooks: - id: flake8 - language_version: python3.10 - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.2.0 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 7b3feda0..7ef566a8 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -5,7 +5,7 @@ Want to contribute to this project? Great! We'd love to hear from you! As a developer and user, you probably have some questions about our project and how to contribute. -In this article we try to answer these and give you some recommendations. +In this article, we try to answer these and give you some recommendations. Ways to communicate and contribute @@ -28,10 +28,11 @@ There are several options to contribute to this project: If you found a bug or have a new cool feature, describe your findings. Try to be as descriptive as possible to help us understand your issue. -* Check out the Freenode ``#twisted-dev`` IRC channel. +* Check out the Libera ``#twisted`` IRC channel or `Twisted Gitter `_. - If you prefer to discuss some topics personally, you may find the IRC - channel interesting. + If you prefer to discuss some topics personally, + you may find the IRC or Gitter channels interesting. + They are bridged. * Modify the code. @@ -68,12 +69,14 @@ We recommend the following workflow: *Running the test suite* for details. - c. Document any user facing changes in one of the `/docs/` files. + c. Document any user-facing changes in one of the ``/docs/`` files. - d. Create a newsfragment in ``src/towncrier/newsfragments/`` describing the changes and containing information that are of interest for end-users. + d. Create a newsfragment in ``src/towncrier/newsfragments/`` describing the changes and containing information that is of interest to end-users. e. Create a `pull request`_. - Describe in the pull request what you did and why. If you have open questions, ask. + Describe in the pull request what you did and why. + If you have open questions, ask. + (optional) Allow team members to edit the code on your PR. #. Wait for feedback. If you receive any comments, address these. @@ -98,7 +101,7 @@ The following list contains some ways how to run the test suite: You may want to add the ``--skip-missing-interpreters`` option to avoid errors when a specific Python interpreter version couldn't be found. -* To get a complete list about the available targets, run:: +* To get a complete list of the available targets, run:: $ tox -av @@ -108,15 +111,13 @@ The following list contains some ways how to run the test suite: $ tox -- towncrier.test.test_project.InvocationTests.test_version * To run some quality checks before you create the pull request, - we recommend to use this call:: + we recommend using this call:: - $ tox -e check-manifest,check-newsfragment + $ tox -e pre-commit,check-manifest,check-newsfragment -* Install `pre-commit `_ and activate:: +* Or enable `pre-commit` as a git hook:: $ pip install pre-commit - $ pre-commit - Or run as git hook $ pre-commit install * To investigate and debug errors, use the ``trial`` command like this:: diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..9b086e81 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[flake8] +# Allow for longer test strings. Code is formatted to 88 columns by Black. +max-line-length = 99 diff --git a/src/towncrier/newsfragments/292.misc.rst b/src/towncrier/newsfragments/292.misc.rst new file mode 100644 index 00000000..e69de29b diff --git a/tox.ini b/tox.ini index a56fbe71..4ee4864a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = cov-erase, pre-commit, {pypy37,pypy38,py37,py38,py39,py310}-tests, flake8, check-manifest, check-newsfragment, cov-report +envlist = cov-erase, pre-commit, {pypy37,pypy38,py37,py38,py39,py310}-tests, check-manifest, check-newsfragment isolated_build=true skip_missing_envs = true @@ -33,6 +33,7 @@ commands = # specifying the entry point script in `{envbindir}`. coverage run -p --module twisted.trial {posargs:towncrier} coverage combine -a + coverage report [testenv:build] allowlist_externals = @@ -48,22 +49,3 @@ skip_install = true commands = # could be brought inside tox.ini after https://github.com/tox-dev/tox/issues/1571 bash {toxinidir}/tox_build.sh - -[testenv:cov-report] -deps = - coverage -skip_install = true -commands = - coverage html - coverage report - -[testenv:cov-erase] -deps = - coverage -skip_install = true -commands = - coverage erase - -[flake8] -# Allow for longer test strings. Code is formatted to 88 columns by Black. -max-line-length = 99