Skip to content

Commit

Permalink
Updates auto generated documentation with theme and basic support
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Sybrandt committed Apr 29, 2020
1 parent 080b0a6 commit 7e35ce7
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 23 deletions.
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_api
_build
14 changes: 13 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,17 @@ help:

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
%: Makefile autodoc
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

autodoc:
rm -rf _api
mkdir -p _api
sphinx-apidoc \
--implicit-namespaces \
--separate \
--force \
-H Agatha \
-d 2 \
-o _api \
../agatha
Binary file added docs/_static/sidebar_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/_templates/.include
Empty file.
10 changes: 0 additions & 10 deletions docs/agatha.rst

This file was deleted.

9 changes: 6 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"sphinx.ext.autodoc", # Make documentation from source
"sphinx.ext.napoleon", # Read docs in Google format
"sphinx_autodoc_typehints", # Allow automatic documentation to see hints
"sphinx_rtd_theme", # Provides theme
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -47,8 +48,8 @@
'_build',
'Thumbs.db',
'.DS_Store',
'test*',
'**__pycache__**',
'api/test*',
'api/*_pb2.rst',
]

# Enable txt and md files
Expand All @@ -63,9 +64,11 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "sphinx_rtd_theme"

# 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,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_logo = "_static/sidebar_logo.png"
7 changes: 7 additions & 0 deletions docs/help/toc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Help
====

.. toctree::
:maxdepth: 1

train_agatha
6 changes: 6 additions & 0 deletions docs/help/train_agatha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
How to train the Agatha Deep-Learning Model
-------------------------------------------


This is a quick tutorial on how to train the Agatha deep-learning model.
Hopefully, this will be relatively painless to write...
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Agatha: Biomedical Hypothesis Generation

.. toctree::
:maxdepth: 2
:caption: Contents:

help/toc
api/modules



Expand All @@ -12,4 +14,3 @@ Indices and tables

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
7 changes: 0 additions & 7 deletions docs/modules.rst

This file was deleted.

3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@ recommonmark

# Allow sphinx to see type hints
sphinx-autodoc-typehints

# Theme
sphinx-rtd-theme

0 comments on commit 7e35ce7

Please sign in to comment.