Skip to content

Commit 63ca856

Browse files
committed
Fix documentation and README
1 parent 77f0a79 commit 63ca856

File tree

4 files changed

+14
-22
lines changed

4 files changed

+14
-22
lines changed

README.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ variants
1313
:target: https://variants.readthedocs.io/en/latest/?badge=latest
1414
:alt: Documentation Status
1515

16-
.. image:: https://pyup.io/repos/github/python-variants/variants/shield.svg
17-
:target: https://pyup.io/repos/github/python-variants/variants/
18-
:alt: Updates
19-
2016
``variants`` is a library that provides syntactic sugar for creating alternate forms of functions and other callables, in the same way that alternate constructors are class methods that provide alternate forms of the constructor function.
2117

2218
To create a function with variants, simply decorate the primary form with ``@variants.primary``, which then adds the ``.variant`` decorator to the original function, which can be used to register new variants. Here is a simple example of a function that prints text, with variants that specify the source of the text to print:
@@ -72,12 +68,3 @@ Requirements
7268

7369
This is a library for Python, with support for versions 2.7 and 3.4+.
7470

75-
76-
Credits
77-
---------
78-
79-
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
80-
81-
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
82-
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
83-

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# Insert the project root dir as the first element in the PYTHONPATH.
3030
# This lets us ensure that the source package is imported, and that its
3131
# version is used.
32-
sys.path.insert(0, project_root)
32+
sys.path.insert(0, os.path.join(project_root, 'src'))
3333

3434
import variants
3535

@@ -142,7 +142,7 @@
142142
# here, relative to this directory. They are copied after the builtin
143143
# static files, so a file named "default.css" will overwrite the builtin
144144
# "default.css".
145-
html_static_path = ['_static']
145+
#html_static_path = ['_static']
146146

147147
# If not '', a 'Last updated on:' timestamp is inserted at every page
148148
# bottom, using the given strftime format.

docs/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Welcome to variants's documentation!
22
======================================
33

4+
.. include:: ../README.rst
5+
6+
Documentation
7+
=============
48
Contents:
59

610
.. toctree::
@@ -9,7 +13,6 @@ Contents:
913
readme
1014
installation
1115
usage
12-
modules
1316
contributing
1417
authors
1518
history

tox.ini

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[tox]
2-
envlist = py27, py33, py34, py35, py36, flake8
2+
envlist = py27, py33, py34, py35, py36, flake8, docs
3+
skip_missing_interpreters = true
34

45
[travis]
56
python =
@@ -24,8 +25,9 @@ commands =
2425
pip install -U .
2526
pytest --basetemp={envtmpdir}
2627

27-
28-
; If you want to make tox run the tests with the same versions, create a
29-
; requirements.txt with the pinned versions and uncomment the following lines:
30-
; deps =
31-
; -r{toxinidir}/requirements.txt
28+
[testenv:docs]
29+
description = invoke sphinx-build to build the HTML docs, check that URIs are valid
30+
basepython = python3.6
31+
deps = {[testenv]deps}
32+
commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" {posargs:-W --color -bhtml}
33+
sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" {posargs:-W --color -blinkcheck}

0 commit comments

Comments
 (0)