Merge lp://qastaging/~rvb/maas/maas-doc-python into lp://qastaging/~maas-committers/maas/trunk
Proposed by
Raphaël Badin
Status: | Merged |
---|---|
Merged at revision: | 34 |
Proposed branch: | lp://qastaging/~rvb/maas/maas-doc-python |
Merge into: | lp://qastaging/~maas-committers/maas/trunk |
Diff against target: |
92 lines (+29/-1) 6 files modified
Makefile (+1/-1) buildout.cfg (+2/-0) docs/conf.py (+5/-0) docs/index.rst (+10/-0) docs/models.rst (+7/-0) src/maasserver/models.py (+4/-0) |
To merge this branch: | bzr merge lp://qastaging/~rvb/maas/maas-doc-python |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+89442@code.qastaging.launchpad.net |
Description of the change
This branch adds the auto-generation of the code documentation. The only trick is that we need to load the project's settings in conf.py in order to inspect its classes.
To post a comment you must log in.
This is great, but I can't get the docs to render fully.
[1]
- @bin/flake8 $(sources) | \
- (fgrep -v "from maas.settings import *" || true)
+ @bin/flake8 $(sources) | (! grep -v "from maas.settings import *")
Use fgrep here because the pattern contains regex characters that
should not have their special meaning interpreted.
[2]
`make build` breaks for me:
File ".../docs/conf.py", line 18, in <module> core.management import setup_environ core.management
from django.
ImportError: No module named django.
Adding the following line to the [sphinx] section in buildout fixed it
for me:
eggs = ${django:eggs}
[3]
+extra-paths = ${buildout: extra-paths}
If you add the eggs line in [2] then perhaps s/buildout/django/.
[4]
+Other service interact with a MaaS Server using its :doc:`api`.
s/service/services/
s/Server/server/ ?
[5]
+Code
+====
+
+.. toctree::
+ models
This just generates a header, and I see a build warning:
.../docs/ index.rst: 33: WARNING: toctree contains reference to
nonexisting document u'models'
[6]
+ """A `MACAddress` represents a `Mac Address en.wikipedia. org/wiki/ MAC_address>`_ attached to a `Node`.
+ <http://
+
+ """
Blank line. Trivial, I know :)