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
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.
Revision history for this message
Gavin Panella (allenap) wrote :

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>
    from django.core.management import setup_environ
  ImportError: No module named django.core.management

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
+ <http://en.wikipedia.org/wiki/MAC_address>`_ attached to a `Node`.
+
+ """

Blank line. Trivial, I know :)

review: Needs Fixing
Revision history for this message
Raphaël Badin (rvb) wrote :

Ah, I forgot to add a file. I fixed the other stuff as well now that I've fixed my setup ;).

Revision history for this message
Gavin Panella (allenap) wrote :

That's really cool. I especially like the [source] links.

[7]

+ """A `MACAddress` represents a `Mac Address

s/Mac/MAC/

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.