Skip to content

Commit

Permalink
Merge branch 'master' into legacy-specifier-set
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon authored Jan 28, 2020
2 parents 663da25 + 939b28b commit 0c72b4b
Show file tree
Hide file tree
Showing 27 changed files with 626 additions and 121 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
docs:
name: tox -e docs
name: nox -s docs
runs-on: ubuntu-latest

steps:
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
python -m pip install --upgrade nox
- name: Build documentation
run: python -m tox -e docs
run: python -m nox -s docs
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
lint:
name: tox -e lint
name: nox -s lint
runs-on: ubuntu-latest

steps:
Expand All @@ -24,10 +24,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
python -m pip install --upgrade nox
- name: Run `tox -e lint`
run: python -m tox -e lint
- name: Run `nox -s lint`
run: python -m nox -s lint

build:
name: Build sdist and wheel
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*.egg
*.py[co]

.tox/
.[nt]ox/
.cache/
.coverage
.idea
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
args: []
- id: mypy
name: mypy for Python 2
exclude: '^(docs|tasks|tests)|setup\.py'
exclude: '^(docs|tasks|tests)|setup\.py|noxfile\.py'
args: ['--py2']

- repo: https://github.com/psf/black
Expand Down
25 changes: 13 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,30 @@ python: 3.8
matrix:
include:
- python: 2.7
env: TOXENV=py27
env: NOXSESSION=tests-2.7
- python: pypy
env: TOXENV=pypy
env: NOXSESSION=tests-pypy
- python: pypy3
env: TOXENV=pypy3
env: NOXSESSION=tests-pypy3
- python: 3.4
env: TOXENV=py34
env: NOXSESSION=tests-3.4
- python: 3.5
env: TOXENV=py35
env: NOXSESSION=tests-3.5
- python: 3.6
env: TOXENV=py36
env: NOXSESSION=tests-3.6
- python: 3.7
env: TOXENV=py37
env: NOXSESSION=tests-3.7
- python: 3.8
env: TOXENV=py38
- env: TOXENV=lint
- env: TOXENV=docs
env: NOXSESSION=tests-3.8
- env: NOXSESSION=lint
- env: NOXSESSION=docs

install:
- pip install tox
- pyenv global 3.7.1
- python3.7 -m pip install nox

script:
- tox
- python3.7 -m nox

notifications:
irc:
Expand Down
14 changes: 11 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
Changelog
---------

20.0 - master_
~~~~~~~~~~~~~~~~~
*unreleased*
~~~~~~~~~~~~

No changes yet.

20.1 - 2020-01-24
~~~~~~~~~~~~~~~~~~~

.. note:: This version is not yet released and is under active development.
* Fix a bug caused by reuse of an exhausted iterator. (:issue:`257`)

20.0 - 2020-01-06
~~~~~~~~~~~~~~~~~

* Add type hints (:issue:`191`)

Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ include LICENSE LICENSE.APACHE LICENSE.BSD
include .coveragerc
include .flake8
include .pre-commit-config.yaml
include tox.ini

recursive-include docs *
recursive-include tests *.py
recursive-include tests hello-world-*

exclude noxfile.py
exclude .travis.yml
exclude dev-requirements.txt
exclude tests/build-hello-world.sh
exclude tests/hello-world.c

prune docs/_build
prune tasks
45 changes: 27 additions & 18 deletions docs/development/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Getting started

Working on packaging requires the installation of a small number of
development dependencies. To see what dependencies are required to
run the tests manually, please look at the ``tox.ini`` file.
run the tests manually, please look at the ``noxfile.py`` file.

Running tests
~~~~~~~~~~~~~
Expand All @@ -16,54 +16,63 @@ automatically, so all you have to do is:
$ python -m pytest
...
62746 passed in 220.43 seconds
29204 passed, 4 skipped, 1 xfailed in 83.98 seconds
This runs the tests with the default Python interpreter. This also allows
you to run select tests instead of the entire test suite.

You can also verify that the tests pass on other supported Python interpreters.
For this we use `tox`_, which will automatically create a `virtualenv`_ for
For this we use `nox`_, which will automatically create a `virtualenv`_ for
each supported Python version and run the tests. For example:

.. code-block:: console
$ tox
$ nox -s tests
...
py27: commands succeeded
ERROR: pypy: InterpreterNotFound: pypy
ERROR: py34: InterpreterNotFound: python3.4
ERROR: py35: InterpreterNotFound: python3.5
py36: commands succeeded
ERROR: py37: InterpreterNotFound: python3.7
docs: commands succeeded
pep8: commands succeeded
nox > Ran multiple sessions:
nox > * tests-2.7: success
nox > * tests-3.4: skipped
nox > * tests-3.5: success
nox > * tests-3.6: success
nox > * tests-3.7: success
nox > * tests-3.8: success
nox > * tests-pypy: skipped
nox > * tests-pypy3: skipped
You may not have all the required Python versions installed, in which case you
will see one or more ``InterpreterNotFound`` errors.

If you wish to run just the linting rules, you may use `pre-commit`_.
Running linters
~~~~~~~~~~~~~~~

If you wish to run the linting rules, you may use `pre-commit`_ or run
``nox -s lint``.

.. code-block:: console
$ nox -s lint
...
nox > Session lint was successful.
Building documentation
~~~~~~~~~~~~~~~~~~~~~~

packaging documentation is stored in the ``docs/`` directory. It is
written in `reStructured Text`_ and rendered using `Sphinx`_.

Use `tox`_ to build the documentation. For example:
Use `nox`_ to build the documentation. For example:

.. code-block:: console
$ tox -e docs
$ nox -s docs
...
docs: commands succeeded
congratulations :)
nox > Session docs was successful.
The HTML documentation index can now be found at
``docs/_build/html/index.html``.

.. _`pytest`: https://pypi.org/project/pytest/
.. _`tox`: https://pypi.org/project/tox/
.. _`nox`: https://pypi.org/project/nox/
.. _`virtualenv`: https://pypi.org/project/virtualenv/
.. _`pip`: https://pypi.org/project/pip/
.. _`sphinx`: https://pypi.org/project/Sphinx/
Expand Down
39 changes: 15 additions & 24 deletions docs/development/release-process.rst
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
Release Process
===============

#. Checkout the current ``master`` branch, with a clean working directory.
#. Modify the ``CHANGELOG.rst`` to include changes made since the last release
and update the section header for the new release.
#. Bump the version in ``packaging/__about__.py``

#. Install the latest ``setuptools``, ``wheel`` and ``twine`` packages
from PyPI::

$ pip install --upgrade setuptools wheel twine

#. Ensure no ``dist/`` folder exists and then create the distribution files::
#. Checkout the current ``master`` branch.
#. Install the latest ``nox``::

$ python setup.py sdist bdist_wheel
$ pip install nox

#. Check the built distribution files with ``twine``::

$ twine check dist/*
#. Modify the ``CHANGELOG.rst`` to include changes made since the last release
and update the section header for the new release.

#. Commit the changes to ``master``.
#. Run the release automation with the required version number (YY.N)::

#. If all goes well, upload the build distribution files::
$ nox -s release -- YY.N

$ twine upload dist/*
#. Modify the ``CHANGELOG.rst`` to reflect the development version does not
have any changes since the last release.

#. Create a
`release on GitHub <https://github.com/pypa/packaging/releases>`_ and
include the artifacts uploaded to PyPI.
#. Notify the other project owners of the release.

#. Bump the version for development in ``packaging/__about__.py`` and
``CHANGELOG.rst``.
.. note::
Access needed for making the release are:

#. Notify the other project owners of the release.
- PyPI maintainer (or owner) access to `packaging`
- push directly to the `master` branch on the source repository
- push tags directly to the source repository
2 changes: 1 addition & 1 deletion docs/development/submitting-patches.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Code
----

This project's source is auto-formatted with |black|. You can check if your
code meets our requirements by running our linters against it with ``tox -e
code meets our requirements by running our linters against it with ``nox -s
lint`` or ``pre-commit run --all-files``.

`Write comments as complete sentences.`_
Expand Down
Loading

0 comments on commit 0c72b4b

Please sign in to comment.