Merge ~powersj/cloud-init:docs/config-tox into cloud-init:master

Proposed by Joshua Powers
Status: Merged
Approved by: Scott Moser
Approved revision: 7375eec73e00b622f149527afd93a812dac7be68
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~powersj/cloud-init:docs/config-tox
Merge into: cloud-init:master
Diff against target: 175 lines (+97/-22)
5 files modified
Makefile (+3/-1)
doc/rtd/conf.py (+3/-10)
doc/rtd/index.rst (+0/-9)
doc/rtd/topics/docs.rst (+84/-0)
tox.ini (+7/-2)
Reviewer Review Type Date Requested Status
Scott Moser Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+372102@code.launchpad.net

Commit message

doc: document doc, create makefile and tox target

* Create makefile and tox targets for documentation building and testing
to better replicate the live web docs using the same theme.
* Created docs.rst to explain how to build and contribute to documentation
with style guide and tips.
* doc/rtd/conf.py:
    * Add copyright to rtd config
    * Use Sphinx's RTD theme to replicate actual docs

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:3366a331a27d601159604fa1a4531167a45da623
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1102/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1102//rebuild

review: Approve (continuous-integration)
Revision history for this message
Dan Watkins (oddbloke) :
Revision history for this message
Scott Moser (smoser) wrote :

I don't personally feel the need to have 'make doc' at all, but its not a problem to have it.

In the commit message subject line you have 'create markefile'

Revision history for this message
Joshua Powers (powersj) wrote :

Thanks for the reviews.

Fixed the commit message and responded to comments below.

Revision history for this message
Scott Moser (smoser) :
~powersj/cloud-init:docs/config-tox updated
8a19f93... by Joshua Powers

fixes from review

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:8a19f935dd5bc037ef74e1820b73c1a38b421450
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1104/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1104//rebuild

review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) :
~powersj/cloud-init:docs/config-tox updated
7375eec... by Joshua Powers

clarify capitalization of cloud-init

also fix textwidth to be in line with doc

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:7375eec73e00b622f149527afd93a812dac7be68
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1105/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1105//rebuild

review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/Makefile b/Makefile
index 4ace227..2c6d0c8 100644
--- a/Makefile
+++ b/Makefile
@@ -106,7 +106,9 @@ deb-src:
106 echo sudo apt-get install devscripts; exit 1; }106 echo sudo apt-get install devscripts; exit 1; }
107 $(PYVER) ./packages/bddeb -S -d107 $(PYVER) ./packages/bddeb -S -d
108108
109doc:
110 tox -e doc
109111
110.PHONY: test pyflakes pyflakes3 clean pep8 rpm srpm deb deb-src yaml112.PHONY: test pyflakes pyflakes3 clean pep8 rpm srpm deb deb-src yaml
111.PHONY: check_version pip-test-requirements pip-requirements clean_pyc113.PHONY: check_version pip-test-requirements pip-requirements clean_pyc
112.PHONY: unittest unittest3 style-check114.PHONY: unittest unittest3 style-check doc
diff --git a/doc/rtd/conf.py b/doc/rtd/conf.py
index 4174477..9b27484 100644
--- a/doc/rtd/conf.py
+++ b/doc/rtd/conf.py
@@ -17,7 +17,8 @@ from cloudinit.config.schema import get_schema_doc
17# ]17# ]
1818
19# General information about the project.19# General information about the project.
20project = 'Cloud-Init'20project = 'cloud-init'
21copyright = '2019, Canonical Ltd.'
2122
22# -- General configuration ----------------------------------------------------23# -- General configuration ----------------------------------------------------
2324
@@ -59,15 +60,7 @@ show_authors = False
5960
60# The theme to use for HTML and HTML Help pages. See the documentation for61# The theme to use for HTML and HTML Help pages. See the documentation for
61# a list of builtin themes.62# a list of builtin themes.
62html_theme = 'default'63html_theme = 'sphinx_rtd_theme'
63
64# Theme options are theme-specific and customize the look and feel of a theme
65# further. For a list of options available for each theme, see the
66# documentation.
67html_theme_options = {
68 "bodyfont": "Ubuntu, Arial, sans-serif",
69 "headfont": "Ubuntu, Arial, sans-serif"
70}
7164
72# The name of an image file (relative to this directory) to place at the top65# The name of an image file (relative to this directory) to place at the top
73# of the sidebar.66# of the sidebar.
diff --git a/doc/rtd/index.rst b/doc/rtd/index.rst
index 20a99a3..c670b20 100644
--- a/doc/rtd/index.rst
+++ b/doc/rtd/index.rst
@@ -1,14 +1,5 @@
1.. _index:1.. _index:
22
3.. http://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html
4.. As suggested at link above for headings use:
5.. # with overline, for parts
6.. * with overline, for chapters
7.. =, for sections
8.. -, for subsections
9.. ^, for subsubsections
10.. “, for paragraphs
11
12#############3#############
13Documentation4Documentation
14#############5#############
diff --git a/doc/rtd/topics/docs.rst b/doc/rtd/topics/docs.rst
15new file mode 1006446new file mode 100644
index 0000000..1b15377
--- /dev/null
+++ b/doc/rtd/topics/docs.rst
@@ -0,0 +1,84 @@
1.. _docs:
2
3Docs
4****
5
6These docs are hosted on Read the Docs. The following will explain how to
7contribute to and build these docs locally.
8
9The documentation is primarily written in reStructuredText.
10
11
12Building
13========
14
15There is a makefile target to build the documentation for you:
16
17.. code-block:: shell-session
18
19 $ tox -e doc
20
21This will do two things:
22
23- Build the documentation using sphinx
24- Run doc8 against the documentation source code
25
26Once build the HTML files will be viewable in ``doc/rtd_html``. Use your
27web browser to open ``index.html`` to view and navigate the site.
28
29Style Guide
30===========
31
32Headings
33--------
34The headings used across the documentation use the following hierarchy:
35
36- ``*****``: used once atop of a new page
37- ``=====``: each sections on the page
38- ``-----``: subsections
39- ``^^^^^``: sub-subsections
40- ``"""""``: paragraphs
41
42The top level header ``######`` is reserved for the first page.
43
44If under and overline are used, their length must be identical. The length of
45the underline must be at least as long as the title itself
46
47Line Length
48-----------
49Please keep the line lengths to a maximum of **79** characters. This ensures
50that the pages and tables do not get too wide that side scrolling is required.
51
52Header
53------
54Adding a link at the top of the page allows for the page to be referenced by
55other pages. For example for the FAQ page this would be:
56
57.. code-block:: rst
58
59 .. _faq:
60
61Footer
62------
63The footer should include the textwidth
64
65.. code-block:: rst
66
67 .. vi: textwidth=79
68
69Vertical Whitespace
70-------------------
71One newline between each section helps ensure readability of the documentation
72source code.
73
74Common Words
75------------
76There are some common words that should follow specific usage:
77
78- ``cloud-init``: always lower case with a hyphen, unless starting a sentence
79 in which case only the 'C' is capitalized (e.g. ``Cloud-init``).
80- ``metadata``: one word
81- ``user data``: two words, not to be combined
82- ``vendor data``: like user data, it is two words
83
84.. vi: textwidth=79
diff --git a/tox.ini b/tox.ini
index 1f01eb7..f5baf32 100644
--- a/tox.ini
+++ b/tox.ini
@@ -53,8 +53,13 @@ exclude = .venv,.tox,dist,doc,*egg,.git,build,tools
5353
54[testenv:doc]54[testenv:doc]
55basepython = python355basepython = python3
56deps = sphinx56deps =
57commands = {envpython} -m sphinx {posargs:doc/rtd doc/rtd_html}57 doc8
58 sphinx
59 sphinx_rtd_theme
60commands =
61 {envpython} -m sphinx {posargs:doc/rtd doc/rtd_html}
62 doc8 doc/rtd
5863
59[testenv:xenial]64[testenv:xenial]
60commands =65commands =

Subscribers

People subscribed via source and target branches