Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Add back tox #316

Merged
merged 5 commits into from
Feb 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ matrix:
- python: 3.4
- python: 3.5
- python: 3.6
- python: 3.6

install:
- pip install --requirement requirements.txt

- pip install sphinx
script:
- cd src/
- pytest --cov
- pycodestyle
- sphinx-build -b html ../docs ../docs/_build -W

after_success:
- coveralls
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setup(app):
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.pngmath',
'sphinx.ext.imgmath',
'sphinx.ext.viewcode',
]

Expand Down
2 changes: 1 addition & 1 deletion src/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[pycodestyle]
exclude = migrations, paperless/settings.py
exclude = migrations, paperless/settings.py, .tox


[tool:pytest]
Expand Down
22 changes: 22 additions & 0 deletions src/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Tox (http://tox.testrun.org/) is a tool for running tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to roll this file's content into setup.cfg? I'd just like to limit the number .ini files littered about if I can help it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

afaik tox requires a tox.ini but it uses the setup.cfg and others files to get tools configuration. Like for pycodestyle.

Copy link

Choose a reason for hiding this comment

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

tox doesn't require a tox.ini (now), setup.cfg can be used with a [tox:tox] section. Leaving this here because it's highly ranked on a search engine. :)

# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
skipsdist = True
envlist = py34, py35, py36, pycodestyle, doc

[testenv]
commands = pytest
deps = -r{toxinidir}/../requirements.txt

[testenv:pycodestyle]
commands=pycodestyle
deps=pycodestyle

[testenv:doc]
deps =
-r{toxinidir}/../requirements.txt
sphinx
commands=sphinx-build -b html ../docs ../docs/_build -W