Skip to content

Commit 1f3a290

Browse files
Gallaeciokmike
authored andcommitted
Enable nitpicky Sphinx warnings, update pypy on CI (#140)
* Enable nitpicky Sphinx warnings, fix issues and fail on new issues * Add the documentation build to .travis.yml and clean up the file * Test Python 2 PyPy 7.0.0 * Test Python 2 PyPy 7.1.0 * Use Python 2 PyPy 7.0.0 to run the tests
1 parent 165f165 commit 1f3a290

File tree

4 files changed

+36
-22
lines changed

4 files changed

+36
-22
lines changed

.travis.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ matrix:
44
include:
55
- python: 2.7
66
env: TOXENV=py27
7-
- python: 2.7
7+
- python: pypy
88
env: TOXENV=pypy
99
- python: 3.4
1010
env: TOXENV=py34
@@ -14,27 +14,24 @@ matrix:
1414
env: TOXENV=py36
1515
- python: 3.7
1616
env: TOXENV=py37
17-
dist: xenial
18-
sudo: true
19-
- python: 3.5
17+
- python: pypy3
2018
env: TOXENV=pypy3
19+
- python: 3.7
20+
env: TOXENV=docs
2121

2222
install:
23+
# https://bitbucket.org/pypy/pypy/issues/2389/different-behavior-of-bytesdecode-utf8
24+
# The bug above causes Python 2 PyPy 7.1.0+ to fail one test, so below we
25+
# install 7.0.0. This can be removed once the Python 2 PyPy version in Travis
26+
# includes a fix.
2327
- |
2428
if [ "$TOXENV" = "pypy" ]; then
25-
export PYPY_VERSION="pypy-6.0.0-linux_x86_64-portable"
29+
export PYPY_VERSION="pypy-7.0.0-linux_x86_64-portable"
2630
wget "https://bitbucket.org/squeaky/portable-pypy/downloads/${PYPY_VERSION}.tar.bz2"
2731
tar -jxf ${PYPY_VERSION}.tar.bz2
2832
virtualenv --python="$PYPY_VERSION/bin/pypy" "$HOME/virtualenvs/$PYPY_VERSION"
2933
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
3034
fi
31-
if [ "$TOXENV" = "pypy3" ]; then
32-
export PYPY_VERSION="pypy3.5-6.0.0-linux_x86_64-portable"
33-
wget "https://bitbucket.org/squeaky/portable-pypy/downloads/${PYPY_VERSION}.tar.bz2"
34-
tar -jxf ${PYPY_VERSION}.tar.bz2
35-
virtualenv --python="$PYPY_VERSION/bin/pypy3" "$HOME/virtualenvs/$PYPY_VERSION"
36-
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
37-
fi
3835
- pip install -U tox twine wheel codecov
3936
script: tox
4037
after_success:

docs/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
# Add any paths that contain custom static files (such as style sheets) here,
126126
# relative to this directory. They are copied after the builtin static files,
127127
# so a file named "default.css" will overwrite the builtin "default.css".
128-
html_static_path = ['_static']
128+
html_static_path = []
129129

130130
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
131131
# using the given strftime format.
@@ -249,3 +249,8 @@
249249

250250
# Example configuration for intersphinx: refer to the Python standard library.
251251
intersphinx_mapping = {'http://docs.python.org/': None}
252+
253+
254+
# --- Nitpicking options ------------------------------------------------------
255+
256+
nitpicky = True

docs/w3lib.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
w3lib Package
22
=============
33

4-
:mod:`encoding` Module
5-
----------------------
4+
:mod:`~w3lib.encoding` Module
5+
-----------------------------
66

77
.. automodule:: w3lib.encoding
88
:members:
99

1010

11-
:mod:`html` Module
12-
------------------
11+
:mod:`~w3lib.html` Module
12+
-------------------------
1313

1414
.. automodule:: w3lib.html
1515
:members:
1616

1717

18-
:mod:`http` Module
19-
------------------
18+
:mod:`~w3lib.http` Module
19+
-------------------------
2020

2121
.. automodule:: w3lib.http
2222
:members:
2323

24-
:mod:`url` Module
25-
-----------------
24+
:mod:`~w3lib.url` Module
25+
------------------------
2626

2727
.. automodule:: w3lib.url
2828
:members:

tox.ini

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py27, pypy, py34, py35, py36, py37, pypy3
7+
envlist = py27, pypy, py34, py35, py36, py37, pypy3, docs
88

99
[testenv]
1010
deps =
@@ -15,3 +15,15 @@ commands =
1515
--doctest-modules \
1616
--cov=w3lib --cov-report=term \
1717
{posargs:w3lib tests}
18+
19+
[docs]
20+
changedir = docs
21+
deps =
22+
sphinx
23+
sphinx_rtd_theme
24+
25+
[testenv:docs]
26+
changedir = {[docs]changedir}
27+
deps = {[docs]deps}
28+
commands =
29+
sphinx-build -W -b html . {envtmpdir}/html

0 commit comments

Comments
 (0)