Skip to content

Commit

Permalink
Get docs working
Browse files Browse the repository at this point in the history
  • Loading branch information
willprice committed Jan 17, 2019
1 parent 5113ddb commit 41d3119
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 9 deletions.
1 change: 1 addition & 0 deletions cvml/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import video, plot
__version__ = '0.1.1'
6 changes: 3 additions & 3 deletions cvml/video/stitch_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ def stitch_frames(frame_dir: pathlib.Path, output_file: pathlib.Path,
fps=59.94,
overwrite=False,
frame_pattern=re.compile(r'.*jpg', re.IGNORECASE)):
"""
Stitch a directory containing sequentially numbered frames into a
"""Stitch a directory containing sequentially numbered frames into a
video using FFMpeg
Args:
Expand All @@ -34,7 +33,8 @@ def stitch_frames(frame_dir: pathlib.Path, output_file: pathlib.Path,
overwrite: overwrite the ``output_file`` if it already exists?
frame_pattern: python regex pattern for selecting a subset of files, defaults to selecting everything
Returns: None
Returns:
None
"""
if not frame_dir.exists():
raise FileNotFoundError("Frame directory + " + str(frame_dir) + " does not exist")
Expand Down
20 changes: 15 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os
import sys
here = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.abspath(os.path.join(here, '../..')))


# -- Project information -----------------------------------------------------
Expand All @@ -39,6 +40,8 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
Expand Down Expand Up @@ -80,7 +83,7 @@
# 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'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -171,4 +174,11 @@
# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
todo_include_todos = True

# -- Options for autodoc extension -------------------------------------------
autodoc_default_options = {
'members': None,
'member-order': 'bysource',
}

3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Welcome to cvml's documentation!
:maxdepth: 2
:caption: Contents:

.. automodule:: cvml
plot
video


Indices and tables
Expand Down
5 changes: 5 additions & 0 deletions docs/source/plot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cvml.plot
=========

.. automodule:: cvml.plot
:imported-members:
5 changes: 5 additions & 0 deletions docs/source/video.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cvml.video
==========

.. automodule:: cvml.video
:imported-members:

0 comments on commit 41d3119

Please sign in to comment.