Skip to content

Commit

Permalink
docs - clean up doc build (#754)
Browse files Browse the repository at this point in the history
* Build docs during CI to catch out errors

* Treat warnings as errors

* Fix doc warning/errors

This adds the API reference docs to the site navigation, so we can start
to see just how bad they are. :)
  • Loading branch information
chadwhitacre authored and kapilt committed Dec 21, 2016
1 parent e3522c0 commit 24bdc7a
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 19 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Expand Up @@ -10,9 +10,6 @@ install:
- pip install -r requirements-dev.txt
- pip install coveralls
- python setup.py develop
script: nosetests -s -v --with-coverage --cover-package=c7n tests
script: make sphinx && nosetests -s -v --with-coverage --cover-package=c7n tests
after_success:
coveralls



18 changes: 10 additions & 8 deletions c7n/actions.py
Expand Up @@ -311,14 +311,16 @@ def send_sqs(self, message):
class AutoTagUser(EventAction):
"""Tag a resource with the user who created/modified it.
policies:
- name: ec2-auto-tag-owner
resource: ec2
filters:
- tag:Owner: absent
actions:
- type: auto-tag-creator
tag: OwnerContact
.. code-block:: yaml
policies:
- name: ec2-auto-tag-owner
resource: ec2
filters:
- tag:Owner: absent
actions:
- type: auto-tag-creator
tag: OwnerContact
There's a number of caveats to usage, resources which don't
include tagging as part of their api, may have some delay before
Expand Down
2 changes: 1 addition & 1 deletion c7n/filters/metrics.py
Expand Up @@ -31,7 +31,7 @@ class MetricsFilter(Filter):
- GetMetricStatistics - http://goo.gl/w8mMEY
- Supported Metrics - http://goo.gl/n0E0L7
usage:: yaml
.. code-block:: yaml
- name: ec2-underutilized
resource: ec2
Expand Down
5 changes: 2 additions & 3 deletions c7n/resources/ebs.py
Expand Up @@ -497,8 +497,7 @@ class EncryptInstanceVolumes(BaseAction):
- Requires instance restart
- Not suitable for autoscale groups.
Multistep process
-----------------
Multistep process:
- Stop instance (if running)
- For each volume
Expand All @@ -517,7 +516,7 @@ class EncryptInstanceVolumes(BaseAction):
:example:
.. code-base: yaml
.. code-block:: yaml
policies:
- name: encrypt-unencrypted-ebs
Expand Down
2 changes: 1 addition & 1 deletion c7n/utils.py
Expand Up @@ -89,7 +89,7 @@ def type_schema(
inherits issues with additionalProperties and type enums.
- aliases: additional names this type maybe called
- required: list of required properties, by default 'type' is required
- **props: additional key value properties
- props: additional key value properties
"""
if aliases:
type_names = [type_name]
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile.sphinx
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line.
SRCDIR = docs/source
SPHINXOPTS =
SPHINXOPTS = -W
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = $(SRCDIR)/../build
Expand Down
Binary file removed docs/source/_static/c1_labs.png
Binary file not shown.
Binary file added docs/source/c1_labs.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Expand Up @@ -137,7 +137,7 @@
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = 'c1_labs.png'
html_favicon = 'c1_labs.ico'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
7 changes: 7 additions & 0 deletions docs/source/index.rst
Expand Up @@ -50,6 +50,13 @@ Navigate below and get started with Cloud Custodian!
developer


.. toctree::
:maxdepth: 2
:caption: API Reference

generated/modules


Indices and tables
==================

Expand Down

0 comments on commit 24bdc7a

Please sign in to comment.