From f85ed5cfb17d1d9eb1fa34c677afe6270d85fc88 Mon Sep 17 00:00:00 2001 From: Tom Most Date: Sun, 24 Jan 2021 14:42:13 -0800 Subject: [PATCH 1/4] Update RTD config to use Python 3.7 This fixes the current build failure. --- .readthedocs.yml | 20 ++++++++++++++++---- changelog.d/296.doc.rst | 1 + setup.py | 4 +++- tox.ini | 3 +-- 4 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 changelog.d/296.doc.rst 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/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 528bed28..325b65d7 100644 --- a/setup.py +++ b/setup.py @@ -42,9 +42,11 @@ "mock", "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 0f87167f..3e33f504 100644 --- a/tox.ini +++ b/tox.ini @@ -14,8 +14,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 @@ -54,6 +52,7 @@ commands = check-manifest [testenv:docs] +extras = docs changedir = docs commands = sphinx-build -b html . html From 64e18ee0450f150f161a2192d33bc0bdf1bccb4d Mon Sep 17 00:00:00 2001 From: Tom Most Date: Sun, 24 Jan 2021 14:57:02 -0800 Subject: [PATCH 2/4] Update contribution docs for Tox --- CONTRIBUTING.rst | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 046b400d..a7dec6f2 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,29 +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 +To do it all:: + + tox -p + Release notes ------------- From 8f71ac9abcaa09cfff832a5acf2274cec79802ac Mon Sep 17 00:00:00 2001 From: Tom Most Date: Sun, 24 Jan 2021 14:57:21 -0800 Subject: [PATCH 3/4] Update Git ignores for tox -p --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 From 8cc0a38728ef987d317797ea8bb48a199fe47acc Mon Sep 17 00:00:00 2001 From: Tom Most Date: Sun, 24 Jan 2021 23:15:46 -0800 Subject: [PATCH 4/4] Suggest how to view docs Co-authored-by: Adi Roiban --- CONTRIBUTING.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index a7dec6f2..6bac9978 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -14,6 +14,7 @@ Lint:: Build docs:: tox -e docs + firefox docs/html/index.html To do it all::