From 1bbf3dea02c631c8badea9a7cc15beaf08700865 Mon Sep 17 00:00:00 2001 From: Manuel Miranda Date: Tue, 3 Apr 2018 22:37:36 +0200 Subject: [PATCH] Fix sphinx build (#392) Also add extra step in build pipeline to avoid future errors. --- .travis.yml | 2 ++ CONTRIBUTING.rst | 2 +- Makefile | 2 +- docs/conda_environment.yml | 17 ----------------- docs/readthedocs.yml | 15 +++++++++++++-- docs/serializers.rst | 6 +++--- tox.ini | 12 ++++++++++++ 7 files changed, 32 insertions(+), 24 deletions(-) delete mode 100644 docs/conda_environment.yml diff --git a/.travis.yml b/.travis.yml index 9bb648cb..61834969 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,8 @@ matrix: - python: 3.6 env: TOXENV=syntax + - python: 3.6 + env: TOXENV=docs-html install: - pip install tox diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index c1182937..5c1147ba 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -5,5 +5,5 @@ Contributing #. Install dependencies with ``make install-dev`` (you will need ``pipenv`` which you can install with ``pip install pipenv``) #. Make a change (means writing code, tests without reducing coverage and docs) #. Ensure all tests pass with ``make test``. For fast iterations, use ``make unit`` which will build just the unit tests. You will need docker and docker-compose to be able to pass acceptance and functional tests. -#. Ensure documentation is OK with ``sphinx-autobuild docs/ docs/_build/html/`` +#. Ensure documentation is OK with ``pipenv run sphinx-autobuild docs/ docs/_build/html/`` #. Make the PR in Github (you must have a fork of your own) diff --git a/Makefile b/Makefile index 7c0da9b3..e093d20c 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ acceptance: pipenv run pytest -sv tests/acceptance doc: - make -C docs/ html + pipenv run make -C docs/ html functional: pipenv run bash examples/run_all.sh diff --git a/docs/conda_environment.yml b/docs/conda_environment.yml deleted file mode 100644 index 8d53e41f..00000000 --- a/docs/conda_environment.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: py35 -dependencies: -- openssl=1.0.2g=0 -- pip=8.1.1=py35_0 -- python=3.5.1=0 -- readline=6.2=2 -- setuptools=20.3=py35_0 -- sqlite=3.9.2=0 -- tk=8.5.18=0 -- wheel=0.29.0=py35_0 -- xz=5.0.5=1 -- zlib=1.2.8=0 -- pip: - - aioredis==0.2.8 - - aiomcache==0.4.0 - - async-timeout==1.1.0 - diff --git a/docs/readthedocs.yml b/docs/readthedocs.yml index 1772dc17..e9caa342 100644 --- a/docs/readthedocs.yml +++ b/docs/readthedocs.yml @@ -1,2 +1,13 @@ -conda: - file: conda_environment.yml +formats: + - none + +build: + image: latest + +python: + version: 3.6 + pip_install: true + extra_requirements: + - redis + - memcached + - msgpack diff --git a/docs/serializers.rst b/docs/serializers.rst index 2b8804e5..b68b20f6 100644 --- a/docs/serializers.rst +++ b/docs/serializers.rst @@ -48,10 +48,10 @@ JsonSerializer .. _msgpackserializer: -MessagePackSerializer --------------- +MsgPackSerializer +----------------- -.. autoclass:: aiocache.serializers.MessagePackSerializer +.. autoclass:: aiocache.serializers.MsgPackSerializer :members: In case the current serializers are not covering your needs, you can always define your custom serializer as shown in ``examples/serializer_class.py``: diff --git a/tox.ini b/tox.ini index fbd285fb..be7a4212 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,9 @@ envlist = py{36}-{deps-lowest,deps-devel} py{35,36}-ujson + codecov + syntax + docs-html [testenv] @@ -44,3 +47,12 @@ commands = coverage combine coverage report codecov + + +[testenv:docs-html] +deps = + .[redis] + .[memcached] + .[msgpack] + .[dev] +commands = sphinx-build -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html