Skip to content

Autodocs for datastore#25

Merged
tomkooij merged 19 commits intoHiSPARC:masterfrom
tomkooij:autodocs
Sep 9, 2017
Merged

Autodocs for datastore#25
tomkooij merged 19 commits intoHiSPARC:masterfrom
tomkooij:autodocs

Conversation

@tomkooij
Copy link
Copy Markdown
Member

@tomkooij tomkooij commented May 11, 2017

Sphinx autodocs for the datastore.

This is an attempt to document the datastore (scripts, raw datastore tables) using sphinx autodoc (docstrings). I already added/enhanced some docstrings. But the datastore can use some docs. That should be fairly easy now.

Caution: The writer was a script writer in a folder writer with a main function called writer. To prevent ambiguous imports and to allow autodoc to work I change the writer into a package (analoguous to the wsgi package):

writer:
 \- __init__.py
  - writer_app.py  --> writer()
  - (modules)

So you can:

from writer import writer_app
writer_app.writer()

Perhaps writer() should be renamed application() or main()

This will require some changes in the ansible config (publicdb repo).

I changed imports in both the writer and wsgi package. But I basically reverted back to the current imports (version running on frome now), so I don't expect problems (and there are unittests), but I will rerun the acceptance tests, which are semi-automated anyway.

ToDo:

  • Change to writer package in ansible/publicdb.
  • Rerun acceptance tests
  • Setup gh-pages
  • Add to docs.hisparc.nl.
  • Add documentation\docstrings

tomkooij added 14 commits May 10, 2017 10:18
Make sure writer is a proper python package, so it can be imported
by sphinx autodoc.
Make sure autodoc can import packages from datastore
Prevent ambiguous imports: writer is a package. The writer application is in
the writer_app module of the writer package. The `main` function is named
`writer`.

from writer import writer_app
writer_app.writer()

writer/
  __init__.py
  writer_app.py
  (modules)
Add hisparc_style.css
Favicon
Logo's
Docstrings in `__init__.py` and some additions.
tables.IsDescription classes do not work with :show-inheritance:
@tomkooij
Copy link
Copy Markdown
Member Author

I pushed the current (7eaf413) version of the docs to http://docs.hisparc.nl/datastore/

@153957
Copy link
Copy Markdown
Member

153957 commented Sep 7, 2017

Added to docs.hisparc.nl: in HiSPARC/hisparc.github.io@8c72298

@153957 153957 self-requested a review September 9, 2017 08:47
Copy link
Copy Markdown
Member

@153957 153957 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I think we can merge this and then improve documentation as we go. (and also merge HiSPARC/publicdb#185)

@tomkooij
Copy link
Copy Markdown
Member Author

tomkooij commented Sep 9, 2017

Merging. Cannot remove don't merge label on mobile...

@tomkooij tomkooij merged commit a52b5ed into HiSPARC:master Sep 9, 2017
@153957 153957 mentioned this pull request Sep 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants