Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
b8e1c29
change default to using simple pytest call
obestwalter Apr 12, 2018
c7dd288
cleaned up the code a bit
obestwalter Apr 12, 2018
b9d44e5
Improve plugin docs
obestwalter Apr 13, 2018
7f4aeea
Merge branch 'tox-quickstart-updates' into spring-cleaning
obestwalter Apr 13, 2018
bda2966
spring cleaning / refactoring
obestwalter Apr 14, 2018
c64e636
_exit_code_str -> exit_code_str
obestwalter Apr 14, 2018
591532e
fix docs to use pluggy API instead of import
obestwalter Apr 14, 2018
50d6230
fix test to use pluggy API instead of import
obestwalter Apr 14, 2018
0e05f36
use tmpdir right - thanks @asottile
obestwalter Apr 14, 2018
e2f97fc
fix redundant formulation - thanks @rpkilby
obestwalter Apr 14, 2018
a80fe9f
Imprve packaging and release orientation - thanks @rpkilby
obestwalter Apr 14, 2018
fb13e94
missed a word
obestwalter Apr 14, 2018
fc9fba2
finish up quickstart testing
obestwalter Apr 15, 2018
f179e5f
improve docstrings
obestwalter Apr 15, 2018
76b8205
exception object is usually called simply 'e'
obestwalter Apr 15, 2018
48cae31
fix some typos and make string formatting consistent within function
obestwalter Apr 15, 2018
ebd5835
remove spaces after class statement for consistency
obestwalter Apr 15, 2018
f9825d1
refactorings
obestwalter Apr 15, 2018
dc62bd6
own module for constants
obestwalter Apr 15, 2018
c44c7d4
json is part of stdlib since Python 2.6
obestwalter Apr 15, 2018
3b6bd01
There should only be one hookimpl object per project
obestwalter Apr 15, 2018
7cdf048
tidy up imports, unused fixtures, unused hook params
obestwalter Apr 15, 2018
3822793
no creation of hookimpl needed, check param types
obestwalter Apr 15, 2018
5b63777
fix imports
obestwalter Apr 15, 2018
a620048
naming things, imports, comments -> docstrings for attributes
obestwalter Apr 15, 2018
470149a
docstring fixes
obestwalter Apr 15, 2018
b8eee01
remove unnecessary monkeypatching
obestwalter Apr 15, 2018
1eecd5f
revert accidental test duplication
obestwalter Apr 15, 2018
f3412d6
clean up
obestwalter Apr 15, 2018
6f96ca2
clean up
obestwalter Apr 15, 2018
1dffe50
more fixes and "modernizations"
obestwalter Apr 15, 2018
8d8cd81
move more constants to shared constants module
obestwalter Apr 15, 2018
4d3193a
fix test bug introduced by switching to version tuples from shared const
obestwalter Apr 17, 2018
dffae55
The new PyPi is out! Update links.
obestwalter Apr 17, 2018
db57931
update some more pypi links - should be all now
obestwalter Apr 17, 2018
bc950dd
remove unstable API warning session class seems quite stable by now.
obestwalter Apr 17, 2018
d4cdf11
add platform = linux to make clear pra is only tested/used there
obestwalter Apr 20, 2018
5a6743b
formatting, whitelist sphinx-build command
obestwalter Apr 20, 2018
cdb6680
enhance plugin docs, small link and example fixes
obestwalter Apr 20, 2018
acdbd48
Do not use reorder imports - uses too much vertical space
obestwalter Apr 20, 2018
82a32bb
change imports to import needed objects directly
obestwalter Apr 20, 2018
7d139e5
revert to using format
obestwalter Apr 20, 2018
4969c57
prevent building messy packages - fixes #754
obestwalter Apr 20, 2018
7327c89
remove wrong docstring for hookspecs, add pluggy docs link
obestwalter Apr 22, 2018
61498c2
add new tox framework classifier to example and rephrase the naming part
obestwalter Apr 25, 2018
bdb0d17
remove unused links
obestwalter Apr 28, 2018
2d1f2a2
fix typo
obestwalter Apr 28, 2018
5a5b3dc
fix formatting error
obestwalter Apr 28, 2018
9662011
fix redundancy in title
obestwalter Apr 28, 2018
e3bba6b
fix API (hookspec is NOT part of API, but hookimpl is)
obestwalter Apr 28, 2018
5058cc9
some fixmes/todos about the pytestplugin
obestwalter Apr 28, 2018
a6c3ff6
some fixmes/todos about the pytestplugin
obestwalter Apr 28, 2018
d136a4f
add link to packaging guide
obestwalter Apr 28, 2018
98cbcd9
update marker handling
obestwalter Apr 28, 2018
84c5884
remove docstrings (don't work like that) - they're redundant anyway
obestwalter Apr 28, 2018
753fe55
add a doc example, more explanation and fix formatting
obestwalter Apr 28, 2018
b5944ca
add changelog entries
obestwalter Apr 28, 2018
40d2583
add a little constructor instead of building factors in namespace
obestwalter Apr 28, 2018
558000c
API: add docstring and mark elements appropriately
obestwalter Apr 28, 2018
1f995b3
add changelog entries
obestwalter Apr 28, 2018
2683477
fix import formatting
obestwalter Apr 28, 2018
e59afae
fix import formatting
obestwalter Apr 28, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ repos:
- id: check-yaml
- id: debug-statements
- id: flake8
- repo: https://github.com/asottile/reorder_python_imports
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a version of this that ensures that the import entries within one line are ABC ordered? do we want to enforce that as a best practice?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a look and there is not (yet), but we're not the only ones who'd like that: asottile/reorder-python-imports#8

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also use isort, it has options for this. It's less good about identifying modules but might be good enough

sha: v0.3.5
hooks:
- id: reorder-python-imports
language_version: python3.6
- repo: https://github.com/asottile/pyupgrade
sha: v1.2.0
hooks:
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on Github:
- `2.8 series of releases <https://github.com/tox-dev/tox/projects/6>`_

..
Everything below here is generated by `towncrier <https://pypi.python.org/pypi/towncrier>`_.
Everything below here is generated by `towncrier <https://pypi.org/project/towncrier>`_.
It is generated once as part of the release process rendering fragments from the `changelog`
folder. If necessary, the generated text can be edited afterwards to e.g. merge rc changes
into the final release notes.
Expand Down Expand Up @@ -781,7 +781,7 @@ Improved Documentation
location ({envtmpdir}/pseudo-home). If an index url was specified
a .pydistutils.cfg file will be written with an index_url setting
so that packages defining ``setup_requires`` dependencies will not
silently use your HOME-directory settings or https://pypi.python.org/pypi.
silently use your HOME-directory settings or PyPi.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed a link here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

broken.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my point was maybe we should have replaced it with http://pypi.org instead of removing it.


- fix `#1 <https://github.com/tox-dev/tox/issues/1>`_: empty setup files are properly detected, thanks Anthon van
der Neuth
Expand Down
1 change: 0 additions & 1 deletion HOWTORELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ If you want to use the scripts in `task/` you need a `.pypirc` with a correctly
.. code-block:: ini

[pypi]
;repository=https://pypi.python.org/pypi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay

;repository=https://upload.pypi.io/legacy/
username=<your username>
password=<your password>
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ include setup.py
include tox.ini
graft doc
graft tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

graft?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


global-exclude __pycache__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still unsure why we need these includes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are excludes :) because otherwise it is possible to pollute a release package with these files.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my point in #754 (comment)

global-exclude *.py[cod]
1 change: 1 addition & 0 deletions changelog/754.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
filter out unwanted files in package - by @obestwalter
1 change: 1 addition & 0 deletions changelog/797.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extend the plugin documentation and make lot of small fixes and improvements - by @obestwalter
1 change: 1 addition & 0 deletions changelog/798.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
introduce a constants module to be used internally and as experimental API - by @obestwalter
1 change: 1 addition & 0 deletions changelog/799.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tidy up tests - remove unused fixtures, update old cinstructs, etc. - by @obestwalter
1 change: 1 addition & 0 deletions changelog/800.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
make the already existing implicit API explicit - by @obestwalter
1 change: 1 addition & 0 deletions changelog/801.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
improve tox quickstart and corresponding tests - @obestwalter
12 changes: 10 additions & 2 deletions changelog/examples.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
.. examples for changelog entries adding to your Pull Requests

file ``544.doc.rst``::

explain everything much better - by @passionate_technicalwriter

file ``544.feature.rst``::

``tox --version`` now shows information about all registered plugins - by @obestwalter.
``tox --version`` now shows information about all registered plugins - by @obestwalter


file ``571.bugfix.rst``::

``skip_install`` overrides ``usedevelop`` (``usedevelop`` is an option to choose the
installation type if the package is installed and `skip_install` determines if it should be
installed at all) - by @ferdonline.
installed at all) - by @ferdonline

.. see tox/pyproject.toml for all available categories
6 changes: 3 additions & 3 deletions doc/example/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ configuration:
/bin/bash


.. _virtualenv: https://pypi.python.org/pypi/virtualenv
.. _virtualenv: https://pypi.org/project/virtualenv

.. _multiindex:

Expand Down Expand Up @@ -175,8 +175,8 @@ like this:

.. code-block:: shell

tox -i DEV=http://pypi.python.org/simple # changes :DEV: package URLs
tox -i http://pypi.python.org/simple # changes default
tox -i DEV=http://pypi.org/simple # changes :DEV: package URLs
tox -i http://pypi.org/simple # changes default

further customizing installation
---------------------------------
Expand Down
2 changes: 0 additions & 2 deletions doc/example/pytest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ It is easy to integrate `pytest`_ runs with tox. If you encounter
issues, please check if they are `listed as a known issue`_ and/or use
the :doc:`support channels <../support>`.

.. _`pytest`: https://docs.pytest.org/en/latest/

Basic example
--------------------------

Expand Down
8 changes: 3 additions & 5 deletions doc/example/unittest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ unittest2, discover and tox
Running unittests with 'discover'
------------------------------------------

.. _Pygments: https://pypi.python.org/pypi/Pygments

The discover_ project allows to discover and run unittests
and we can easily integrate it in a ``tox`` run. As an example,
perform a checkout of Pygments_:
perform a checkout of `Pygments <https://pypi.org/project/Pygments>`_:

.. code-block:: shell

Expand All @@ -34,7 +32,6 @@ Running unittest2 and sphinx tests in one go
-----------------------------------------------------

.. _`Michael Foord`: http://www.voidspace.org.uk/
.. _tox.ini: https://github.com/testing-cabal/mock/blob/master/tox.ini

`Michael Foord`_ has contributed a ``tox.ini`` file that
allows you to run all tests for his mock_ project,
Expand All @@ -45,7 +42,8 @@ its repository with:

git clone https://github.com/testing-cabal/mock.git

the checkout has a tox.ini_ that looks like this:
The checkout has a `tox.ini file <https://github.com/testing-cabal/mock/blob/master/tox.ini>`_
that looks like this:

.. code-block:: ini

Expand Down
16 changes: 7 additions & 9 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ right next to your ``setup.py`` file::
# content of: tox.ini , put in same dir as setup.py
[tox]
envlist = py27,py36

[testenv]
deps=pytest # install pytest in the venvs
commands=pytest # or 'nosetests' or ...
deps = pytest # install pytest in the virtualenv where commands will be executed
commands =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a matter of style, but do we need here the line break? shouldn't the comment came right after the = and align alongside that all subsequent lines? mostly to keep it consistent with the deps line, also in Python according to PEP-8 two spaces are recommended before the comment, should the deps line follow this rule, to have the most consistent experience?

# whatever extra steps before testing might be necessary
pytest # or any other test runner that you might use

You can also try generating a ``tox.ini`` file automatically, by running
``tox-quickstart`` and then answering a few simple questions.
Expand Down Expand Up @@ -63,13 +66,12 @@ Current features

- test-tool agnostic: runs pytest, nose or unittests in a uniform manner

* :doc:`(new in 2.0) plugin system <plugins>` to modify tox execution with simple hooks.
* :doc:`plugin system <plugins>` to modify tox execution with simple hooks.

* uses pip_ and setuptools_ by default. Support for configuring the installer command
through :confval:`install_command=ARGV`.

* **cross-Python compatible**: CPython-2.7, 3.4 and higher,
Jython and pypy_.
* **cross-Python compatible**: CPython-2.7, 3.4 and higher, Jython and pypy_.

* **cross-platform**: Windows and Unix style environments

Expand All @@ -92,10 +94,6 @@ Current features
* supports :ref:`using different / multiple PyPI index servers <multiindex>`


.. _pypy: http://pypy.org

.. _`tox.ini`: :doc:configfile

.. toctree::
:hidden:

Expand Down
30 changes: 17 additions & 13 deletions doc/links.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@

.. _`Cookiecutter`: https://cookiecutter.readthedocs.io
.. _`pluggy`: https://pluggy.readthedocs.io
.. _`cookiecutter-tox-plugin`: https://github.com/tox-dev/cookiecutter-tox-plugin
.. _devpi: http://doc.devpi.net
.. _Python: http://www.python.org
.. _virtualenv: https://pypi.python.org/pypi/virtualenv
.. _virtualenv3: https://pypi.python.org/pypi/virtualenv3
.. _virtualenv5: https://pypi.python.org/pypi/virtualenv5
.. _`py.test`: http://pytest.org
.. _virtualenv: https://pypi.org/project/virtualenv
.. _`pytest`: https://pytest.org
.. _nosetests:
.. _`nose`: https://pypi.python.org/pypi/nose
.. _`nose`: https://pypi.org/project/nose
.. _`Holger Krekel`: https://twitter.com/hpk42
.. _`pytest-xdist`: https://pypi.python.org/pypi/pytest-xdist
.. _`pytest-xdist`: https://pypi.org/project/pytest-xdist

.. _`easy_install`: http://peak.telecommunity.com/DevCenter/EasyInstall
.. _pip: https://pypi.python.org/pypi/pip
.. _setuptools: https://pypi.python.org/pypi/setuptools
.. _pip: https://pypi.org/project/pip
.. _setuptools: https://pypi.org/project/setuptools
.. _`jenkins`: https://jenkins.io/index.html
.. _sphinx: https://pypi.python.org/pypi/Sphinx
.. _discover: https://pypi.python.org/pypi/discover
.. _unittest2: https://pypi.python.org/pypi/unittest2
.. _mock: https://pypi.python.org/pypi/mock/
.. _sphinx: https://pypi.org/project/Sphinx
.. _discover: https://pypi.org/project/discover
.. _unittest2: https://pypi.org/project/unittest2
.. _mock: https://pypi.org/project/mock/
.. _pypy: http://pypy.org

.. _`Python Packaging Guide`: https://packaging.python.org/tutorials/distributing-packages/#packaging-your-project
.. _`tox.ini`: :doc:configfile
Loading