diff --git a/.gitignore b/.gitignore index 2c988749..9b00e7b3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,5 @@ MANIFEST .coverage coverage htmlcov -_trial_temp +_trial_temp* .tox -_trial_temp.lock diff --git a/.readthedocs.yml b/.readthedocs.yml index f0b6cf2e..f7e6d592 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,5 +1,17 @@ +# https://docs.readthedocs.io/en/stable/config-file/v2.html +version: 2 + +sphinx: + fail_on_warning: false + +formats: + - pdf + - epub + python: - version: 2.7 - pip_install: true - extra_requirements: - - dev + version: 3.8 + install: + - method: pip + path: . + extra_requirements: + - docs diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 046b400d..6bac9978 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,28 +1,24 @@ Developing ========== -Install dependencies: +This project uses `Tox `_ to manage virtual environments. -:: +To run the tests:: - pip install treq[dev] + tox -e py38-twisted_latest -Run Tests (unit & integration): +Lint:: -:: - - trial treq - -Lint: - -:: - - pep8 treq - pyflakes treq + tox -e flake8 Build docs:: tox -e docs + firefox docs/html/index.html + +To do it all:: + + tox -p Release notes ------------- diff --git a/changelog.d/296.doc.rst b/changelog.d/296.doc.rst new file mode 100644 index 00000000..f6606919 --- /dev/null +++ b/changelog.d/296.doc.rst @@ -0,0 +1 @@ +The dependency on Sphinx required to build the documentation has been moved from the ``dev`` extra to the new ``docs`` extra. diff --git a/setup.py b/setup.py index 3c3ca287..b8ad149a 100644 --- a/setup.py +++ b/setup.py @@ -38,9 +38,11 @@ "dev": [ "pep8", "pyflakes", - "sphinx", "httpbin==0.5.0", ], + "docs": [ + "sphinx>=1.4.8", + ], }, package_data={"treq": ["_version"]}, author="David Reid", diff --git a/tox.ini b/tox.ini index 4abd3119..530d8be0 100644 --- a/tox.ini +++ b/tox.ini @@ -13,8 +13,6 @@ deps = twisted_lowest: Twisted==18.7.0 twisted_latest: Twisted twisted_trunk: https://github.com/twisted/twisted/archive/trunk.zip - - docs: Sphinx>=1.4.8 setenv = # Avoid unnecessary network access when creating virtualenvs for speed. VIRTUALENV_NO_DOWNLOAD=1 @@ -53,6 +51,7 @@ commands = check-manifest [testenv:docs] +extras = docs changedir = docs commands = sphinx-build -b html . html