Skip to content

Commit

Permalink
Merge pull request #321 from twm/rtd-conf
Browse files Browse the repository at this point in the history
Fix ReadTheDocs build
  • Loading branch information
twm authored Jan 25, 2021
2 parents e3a12f8 + 8cc0a38 commit 321fb6e
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 23 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ MANIFEST
.coverage
coverage
htmlcov
_trial_temp
_trial_temp*
.tox
_trial_temp.lock
20 changes: 16 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -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
24 changes: 10 additions & 14 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
Developing
==========

Install dependencies:
This project uses `Tox <https://tox.readthedocs.io/en/latest/config.html>`_ 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
-------------
Expand Down
1 change: 1 addition & 0 deletions changelog.d/296.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The dependency on Sphinx required to build the documentation has been moved from the ``dev`` extra to the new ``docs`` extra.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
"dev": [
"pep8",
"pyflakes",
"sphinx",
"httpbin==0.5.0",
],
"docs": [
"sphinx>=1.4.8",
],
},
package_data={"treq": ["_version"]},
author="David Reid",
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -53,6 +51,7 @@ commands =
check-manifest

[testenv:docs]
extras = docs
changedir = docs
commands =
sphinx-build -b html . html
Expand Down

0 comments on commit 321fb6e

Please sign in to comment.