Skip to content

Commit a8e1bde

Browse files
committed
Populate repo
Mostly the contents of the cookiecutter template [1] with some updates. [1] https://github.com/sphinx-contrib/cookiecutter Signed-off-by: Stephen Finucane <[email protected]>
1 parent c4fdc25 commit a8e1bde

File tree

14 files changed

+331
-0
lines changed

14 files changed

+331
-0
lines changed

.editorconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# -*- coding: utf-8 -*-
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
charset = utf-8
11+
12+
# Python files
13+
[*.py]
14+
indent_size = 4
15+
# isort plugin configuration
16+
known_first_party = sphinxcontrib
17+
multi_line_output = 2
18+
default_section = THIRDPARTY
19+
skip = .eggs docs
20+
21+
# .travis.yml
22+
[.travis.yml]
23+
indent_size = 2
24+
25+
# Dockerfile
26+
[Dockerfile]
27+
indent_size = 4
28+
29+
# Makefile
30+
[Makefile]
31+
indent_size = 4

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
*.py[cod]
2+
3+
# C extensions
4+
*.so
5+
6+
# Packages
7+
*.egg*
8+
*.egg-info
9+
dist
10+
build
11+
eggs
12+
parts
13+
bin
14+
var
15+
sdist
16+
develop-eggs
17+
.installed.cfg
18+
lib
19+
lib64
20+
21+
# Installer logs
22+
pip-log.txt
23+
24+
# Unit test / coverage reports
25+
cover/
26+
.coverage*
27+
.tox
28+
.venv
29+
.pytest_cache/
30+
.mypy_cache/
31+
32+
# Translations
33+
*.mo
34+
35+
# Complexity
36+
output/*.html
37+
output/*/index.html
38+
39+
# Sphinx
40+
doc/build
41+
42+
# pbr
43+
AUTHORS
44+
ChangeLog
45+
46+
# Editors
47+
*~
48+
.*.swp
49+
.*sw?

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: python
2+
sudo: false
3+
cache: pip
4+
5+
python:
6+
- 2.7
7+
- 3.4
8+
- 3.5
9+
- 3.6
10+
- pypy
11+
12+
install:
13+
- pip install tox-travis
14+
15+
script:
16+
- tox

CONTRIBUTING.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
==============
2+
Contributing
3+
==============
4+
5+
If you would like to contribute to this project, or any project in the
6+
`sphinx-contrib`_ namespace, you should refer to the guidelines found in the
7+
`Sphinx documentation`_.
8+
9+
.. _sphinx-contrib: https://github.com/sphinx-contrib
10+
.. _Sphinx documentation: http://www.sphinx-doc.org/en/stable/contrib/

LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright (c) 2018 by Stephen Finucane <[email protected]>
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are
6+
met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions and the following disclaimer in the
13+
documentation and/or other materials provided with the distribution.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.rst

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
====================
2+
sphinxcontrib-apidoc
3+
====================
4+
5+
A Sphinx extension for running `sphinx-apidoc`_ on each build.
6+
7+
Overview
8+
--------
9+
10+
*sphinx-apidoc* is a tool for automatic generation of Sphinx sources that,
11+
using the `autodoc`_ extension, document a whole package in the style of other
12+
automatic API documentation tools. *sphinx-apidoc* does not actually build
13+
documentation - rather it simply generates it. As a result, it must be run
14+
before *sphinx-build*. This generally results in ``tox.ini`` files like the
15+
following:
16+
17+
.. code-block:: ini
18+
19+
[testenv:docs]
20+
commands =
21+
sphinx-apidoc -o doc/api my_code my_code/tests
22+
sphinx-build -W -b html doc doc/_build/html
23+
24+
This extension eliminates the need to keep that configuration outside Sphinx.
25+
Instead, this functionality can be enabled and configured from your
26+
documentation's ``conf.py`` file, like so:
27+
28+
.. code-block:: python
29+
30+
extensions = [
31+
'sphinxcontrib.apidoc',
32+
# ...
33+
]
34+
apidoc_module_dir = '../my_code'
35+
apidoc_output_dir = 'reference'
36+
apidoc_excluded_modules = ['tests']
37+
38+
Configuration
39+
-------------
40+
41+
The *apidoc* extension uses the following configuration values:
42+
43+
``apidoc_module_dir``
44+
The path to the module to document. This must be a path to a Python package.
45+
This path can be a path relative to the documentation source directory or an
46+
absolute path.
47+
48+
**Required**
49+
50+
``apidoc_output_dir``
51+
The output directory. If it does not exist, it is created. This path is
52+
relative to the documentation source directory.
53+
54+
**Optional**, defaults to ``api``.
55+
56+
``apidoc_excluded_modules``
57+
An optional list of modules to exclude. These should be paths relative to
58+
``apidoc_module_dir``. fnmatch-style wildcarding is supported.
59+
60+
**Optional**, defaults to ``[]``.
61+
62+
Links
63+
-----
64+
65+
- Source: https://github.com/sphinx-contrib/apidoc
66+
- Bugs: https://github.com/sphinx-contrib/apidoc/issues
67+
68+
.. Links
69+
70+
.. _sphinx-apidoc: http://www.sphinx-doc.org/en/stable/man/sphinx-apidoc.html
71+
.. _autodoc: http://www.sphinx-doc.org/en/stable/ext/autodoc.html

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pbr

setup.cfg

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[metadata]
2+
name = sphinxcontrib-apidoc
3+
summary = A Sphinx extension for running 'sphinx-apidoc' on each build
4+
description-file =
5+
README.rst
6+
author = Stephen Finucane
7+
author-email = [email protected]
8+
home-page = http://www.sphinx-doc.org/
9+
classifier =
10+
Development Status :: 3 - Alpha
11+
Environment :: Console
12+
Framework :: Sphinx :: Extension
13+
Intended Audience :: Developers
14+
License :: OSI Approved :: Apache Software License
15+
Operating System :: OS Independent
16+
Programming Language :: Python
17+
Programming Language :: Python :: 2
18+
Programming Language :: Python :: 2.7
19+
Programming Language :: Python :: 3
20+
Programming Language :: Python :: 3.5
21+
Topic :: Documentation
22+
Topic :: Utilities
23+
24+
[global]
25+
setup-hooks =
26+
pbr.hooks.setup_hook
27+
28+
[files]
29+
packages =
30+
sphinxcontrib
31+
namespace_packages =
32+
sphinxcontrib
33+
34+
[build_sphinx]
35+
all_files = 1
36+
build-dir = doc/build
37+
source-dir = doc/source
38+
warning-is-error = 1
39+
40+
[wheel]
41+
universal = 1
42+
43+
[mypy]
44+
python_version = 2.7
45+
show_column_numbers = True
46+
show_error_context = True
47+
ignore_missing_imports = True
48+
follow_imports = skip
49+
incremental = True
50+
check_untyped_defs = True
51+
warn_unused_ignores = True
52+
53+
[flake8]
54+
show-source = True

setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env python
2+
3+
import setuptools
4+
5+
6+
setuptools.setup(
7+
setup_requires=['pbr'],
8+
pbr=True,
9+
)

sphinxcontrib/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
sphinxcontrib
3+
~~~~~~~~~~~~~
4+
5+
This package is a namespace package that contains all extensions
6+
distributed in the ``sphinx-contrib`` distribution.
7+
8+
:copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
9+
:license: BSD, see LICENSE for details.
10+
"""
11+
12+
__import__('pkg_resources').declare_namespace(__name__)

0 commit comments

Comments
 (0)