-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure all modules are added into documentation under the API docs. Update docs Makefile and config to make sure the build fails on warnings and the API docs RST documents are generated whenever the documentation is built. Closes #19
- Loading branch information
Showing
27 changed files
with
187 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
API Documentation | ||
================= | ||
|
||
Location: :doc:`/index` → :doc:`/api` | ||
|
||
This is the Camayoc API documentation. It is mostly auto generated from the | ||
source code. This section of the documentation should be treated as a handy | ||
reference for developers, not a gospel. | ||
|
||
.. toctree:: | ||
|
||
api/camayoc.rst | ||
api/camayoc.cli.rst | ||
api/camayoc.config.rst | ||
api/camayoc.constants.rst | ||
api/camayoc.exceptions.rst | ||
api/camayoc.tests.conftest.rst | ||
api/camayoc.tests.rho.rst | ||
api/camayoc.tests.rho.test_auth.rst | ||
api/camayoc.tests.rho.test_fact.rst | ||
api/camayoc.tests.rho.test_options.rst | ||
api/camayoc.tests.rho.test_profile.rst | ||
api/camayoc.tests.rho.test_scan.rst | ||
api/camayoc.tests.rho.utils.rst | ||
api/camayoc.tests.rst | ||
api/camayoc.utils.rst | ||
api/tests.rst | ||
api/tests.test_cli.rst | ||
api/tests.test_config.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.cli` | ||
============= | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.cli` | ||
|
||
.. automodule:: camayoc.cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.config` | ||
================ | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.config` | ||
|
||
.. automodule:: camayoc.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.constants` | ||
=================== | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.constants` | ||
|
||
.. automodule:: camayoc.constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.exceptions` | ||
==================== | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.exceptions` | ||
|
||
.. automodule:: camayoc.exceptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc` | ||
========= | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc` | ||
|
||
.. automodule:: camayoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.tests.conftest` | ||
======================== | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.tests.conftest` | ||
|
||
.. automodule:: camayoc.tests.conftest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.tests.rho` | ||
=================== | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.tests.rho` | ||
|
||
.. automodule:: camayoc.tests.rho |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.tests.rho.test_auth` | ||
============================= | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.tests.rho.test_auth` | ||
|
||
.. automodule:: camayoc.tests.rho.test_auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.tests.rho.test_fact` | ||
============================= | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.tests.rho.test_fact` | ||
|
||
.. automodule:: camayoc.tests.rho.test_fact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.tests.rho.test_options` | ||
================================ | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.tests.rho.test_options` | ||
|
||
.. automodule:: camayoc.tests.rho.test_options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.tests.rho.test_profile` | ||
================================ | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.tests.rho.test_profile` | ||
|
||
.. automodule:: camayoc.tests.rho.test_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.tests.rho.test_scan` | ||
============================= | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.tests.rho.test_scan` | ||
|
||
.. automodule:: camayoc.tests.rho.test_scan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.tests.rho.utils` | ||
========================= | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.tests.rho.utils` | ||
|
||
.. automodule:: camayoc.tests.rho.utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.tests` | ||
=============== | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.tests` | ||
|
||
.. automodule:: camayoc.tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`camayoc.utils` | ||
=============== | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/camayoc.utils` | ||
|
||
.. automodule:: camayoc.utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`tests` | ||
======= | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/tests` | ||
|
||
.. automodule:: tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`tests.test_cli` | ||
================ | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/tests.test_cli` | ||
|
||
.. automodule:: tests.test_cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`tests.test_config` | ||
=================== | ||
|
||
Location: :doc:`/index` → :doc:`/api` → :doc:`/api/tests.test_config` | ||
|
||
.. automodule:: tests.test_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# For each file found by `find`, generate a reStructuredText document in | ||
# `docs/api/`. | ||
# | ||
# NOTE: This script should be run from the repository root directory. That is, | ||
# this script should be run from this script's parent directory. | ||
# | ||
set -euo pipefail | ||
|
||
find camayoc/ tests/ -type f -name '*.py' | while read file_name; do | ||
# Transform file names to python module names. For example: | ||
# | ||
# tests/__init__.py → tests | ||
# tests/test_api.py → tests.test_api | ||
# | ||
# Note that file_name has no leading "./", as we omit it in find, above. | ||
module_name="${file_name%.py}" | ||
module_name="${module_name%/__init__}" | ||
module_name="${module_name//\//.}" | ||
|
||
# Generate stub *.rst file. (Tip: ${#foo} returns the length of foo.) | ||
cat >"docs/api/${module_name}.rst" <<EOF | ||
\`${module_name}\` | ||
$(printf %${#module_name}s | tr ' ' =)== | ||
Location: :doc:\`/index\` → :doc:\`/api\` → :doc:\`/api/${module_name}\` | ||
.. automodule:: ${module_name} | ||
EOF | ||
done |