Skip to content

Commit 9ba2723

Browse files
committed
Add API section to toctree for better doc organization.
Add Installation & Tutorial place holders. Dynamically pull __version__ when docs are built.
1 parent 71d55b6 commit 9ba2723

6 files changed

Lines changed: 39 additions & 5 deletions

File tree

docs/source/API.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
API Documentation
2+
=================
3+
4+
.. toctree::
5+
6+
objectrocket.client
7+
objectrocket.constants
8+
objectrocket.errors
9+
objectrocket.instances

docs/source/Installation.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Installation
2+
============
3+
If you don't know how to do this already, you probably should be playing around with Python :)

docs/source/Tutorial.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Tutorial
2+
========
3+
And now for a super fun tutorial.

docs/source/conf.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15+
import os
16+
import sys
17+
1518
import sphinx_rtd_theme
1619

20+
from objectrocket import __version__
21+
1722
# If extensions (or modules to document with autodoc) are in another directory,
1823
# add these directories to sys.path here. If the directory is relative to the
1924
# documentation root, use os.path.abspath to make it absolute, like shown here.
25+
SOURCE_DIR = os.path.abspath(os.path.dirname(__file__))
26+
DOCS_DIR = os.path.dirname(SOURCE_DIR)
27+
REPO_DIR = os.path.dirname(DOCS_DIR)
28+
sys.path.append(REPO_DIR)
2029

2130
# -- General configuration ------------------------------------------------
2231

@@ -52,9 +61,10 @@
5261
# built documents.
5362
#
5463
# The short X.Y version.
55-
version = '0.1'
64+
_version_list = __version__.split('.')
65+
version = '.'.join((_version_list[0], _version_list[1]))
5666
# The full version, including alpha/beta/rc tags.
57-
release = '0.1.0'
67+
release = __version__
5868

5969
# The language for content autogenerated by Sphinx. Refer to documentation
6070
# for a list of supported languages.

docs/source/index.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
ObjectRocket Python Client
22
==========================
3+
Welcome to the ObjectRocket Python Client's documentation. This client is designed to interface
4+
with the ObjectRocket APIv2.
35

46
.. toctree::
57
:maxdepth: 2
68

7-
objectrocket.client
8-
objectrocket.constants
9-
objectrocket.instances
9+
Installation
10+
Tutorial
11+
API
1012

1113
.. automodule:: objectrocket
1214
:members:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Errors
2+
======
3+
4+
.. automodule:: objectrocket.errors
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

0 commit comments

Comments
 (0)