From ad254e27b9725b224ca641285b5bd2f340ae38e8 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Fri, 7 Sep 2018 23:10:41 -0500 Subject: [PATCH] Adding Sphinx AutoDoc for the codebase --- server/documentation/api/authentication.rst | 9 ++- server/documentation/api/index.rst | 4 +- server/documentation/api/user.rst | 14 ++-- server/documentation/conf.py | 9 +-- server/documentation/index.rst | 1 + server/documentation/server/atheneum.api.rst | 46 ++++++++++++ .../server/atheneum.middleware.rst | 22 ++++++ .../documentation/server/atheneum.model.rst | 22 ++++++ server/documentation/server/atheneum.rst | 49 +++++++++++++ .../documentation/server/atheneum.service.rst | 70 +++++++++++++++++++ .../documentation/server/atheneum.utility.rst | 46 ++++++++++++ server/documentation/server/modules.rst | 7 ++ 12 files changed, 283 insertions(+), 16 deletions(-) create mode 100644 server/documentation/server/atheneum.api.rst create mode 100644 server/documentation/server/atheneum.middleware.rst create mode 100644 server/documentation/server/atheneum.model.rst create mode 100644 server/documentation/server/atheneum.rst create mode 100644 server/documentation/server/atheneum.service.rst create mode 100644 server/documentation/server/atheneum.utility.rst create mode 100644 server/documentation/server/modules.rst diff --git a/server/documentation/api/authentication.rst b/server/documentation/api/authentication.rst index ebd8efe..63d081b 100644 --- a/server/documentation/api/authentication.rst +++ b/server/documentation/api/authentication.rst @@ -63,9 +63,12 @@ Authentication API :
header Content-Type: Depends on :mailheader:`Accept` header of request - :>json datetime creationTime: Creation time for the userToken - :>json datetime expirationTime: Expiration time for the userToken + :>json iso8601 creationTime: Creation time for the userToken + :>json iso8601 expirationTime: Expiration time for the userToken :>json boolean enabled: Whether the userToken is enabled :>json string token: UserToken to use for further authentication :>json int version: Version for the object @@ -100,7 +103,7 @@ Authentication API :
header Content-Type: Depends on :mailheader:`Accept` header of request - :>json datetime lastLoginTime: Updated lastLoginTime for the user + :>json iso8601 lastLoginTime: Updated lastLoginTime for the user :statuscode 200: User last_login_time successfully bumped :statuscode 401: Authorization failed diff --git a/server/documentation/api/index.rst b/server/documentation/api/index.rst index 3d2882f..e8b535d 100644 --- a/server/documentation/api/index.rst +++ b/server/documentation/api/index.rst @@ -1,5 +1,5 @@ -Atheneum API documentation -========================== +Atheneum HTTP API +================= .. toctree:: :maxdepth: 2 diff --git a/server/documentation/api/user.rst b/server/documentation/api/user.rst index 8fe00d3..22b9ead 100644 --- a/server/documentation/api/user.rst +++ b/server/documentation/api/user.rst @@ -87,8 +87,8 @@ User API :
header Content-Type: Depends on :mailheader:`Accept` header of request - :>json datetime creationTime: Creation time for the user - :>json datetime lastLoginTime: When the user last logged in, or was last bumped + :>json iso8601 creationTime: Creation time for the user + :>json iso8601 lastLoginTime: When the user last logged in, or was last bumped :>json string name: The user name :>json string role: The role assigned to the user :>json int version: Version information @@ -135,14 +135,14 @@ User API :
header Content-Type: Depends on :mailheader:`Accept` header of request - :>json datetime creationTime: Creation time for the user - :>json datetime lastLoginTime: When the user last logged in, or was last bumped + :>json iso8601 creationTime: Creation time for the user + :>json iso8601 lastLoginTime: When the user last logged in, or was last bumped :>json string name: The user name :>json string role: The role assigned to the user :>json int version: Version information @@ -193,7 +193,7 @@ User API :header Content-Type: Depends on :mailheader:`Accept` header of request - :>json datetime creationTime: Datetime the user was created + :>json iso8601 creationTime: Datetime the user was created :>json string name: Name of the created user :>json string role: Role of the created user :>json int version: Version number of the created user diff --git a/server/documentation/conf.py b/server/documentation/conf.py index 8f4802a..9b1757a 100644 --- a/server/documentation/conf.py +++ b/server/documentation/conf.py @@ -12,9 +12,9 @@ # 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 +sys.path.insert(0, os.path.abspath('../')) # -- Project information ----------------------------------------------------- @@ -40,7 +40,8 @@ release = '2018.8.1' # ones. extensions = [ 'sphinxcontrib.httpdomain', - 'sphinxjsondomain' + 'sphinxjsondomain', + 'sphinx.ext.autodoc' ] # Add any paths that contain templates here, relative to this directory. diff --git a/server/documentation/index.rst b/server/documentation/index.rst index ebf6edf..bafe5e2 100644 --- a/server/documentation/index.rst +++ b/server/documentation/index.rst @@ -12,6 +12,7 @@ Welcome to Atheneum's documentation! introduction api/index + server/modules Indices and tables ================== diff --git a/server/documentation/server/atheneum.api.rst b/server/documentation/server/atheneum.api.rst new file mode 100644 index 0000000..b2a06c3 --- /dev/null +++ b/server/documentation/server/atheneum.api.rst @@ -0,0 +1,46 @@ +atheneum.api package +==================== + +Submodules +---------- + +atheneum.api.authentication\_api module +--------------------------------------- + +.. automodule:: atheneum.api.authentication_api + :members: + :undoc-members: + :show-inheritance: + +atheneum.api.decorators module +------------------------------ + +.. automodule:: atheneum.api.decorators + :members: + :undoc-members: + :show-inheritance: + +atheneum.api.model module +------------------------- + +.. automodule:: atheneum.api.model + :members: + :undoc-members: + :show-inheritance: + +atheneum.api.user\_api module +----------------------------- + +.. automodule:: atheneum.api.user_api + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: atheneum.api + :members: + :undoc-members: + :show-inheritance: diff --git a/server/documentation/server/atheneum.middleware.rst b/server/documentation/server/atheneum.middleware.rst new file mode 100644 index 0000000..4373967 --- /dev/null +++ b/server/documentation/server/atheneum.middleware.rst @@ -0,0 +1,22 @@ +atheneum.middleware package +=========================== + +Submodules +---------- + +atheneum.middleware.authentication\_middleware module +----------------------------------------------------- + +.. automodule:: atheneum.middleware.authentication_middleware + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: atheneum.middleware + :members: + :undoc-members: + :show-inheritance: diff --git a/server/documentation/server/atheneum.model.rst b/server/documentation/server/atheneum.model.rst new file mode 100644 index 0000000..dfcc80a --- /dev/null +++ b/server/documentation/server/atheneum.model.rst @@ -0,0 +1,22 @@ +atheneum.model package +====================== + +Submodules +---------- + +atheneum.model.user\_model module +--------------------------------- + +.. automodule:: atheneum.model.user_model + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: atheneum.model + :members: + :undoc-members: + :show-inheritance: diff --git a/server/documentation/server/atheneum.rst b/server/documentation/server/atheneum.rst new file mode 100644 index 0000000..b876c3e --- /dev/null +++ b/server/documentation/server/atheneum.rst @@ -0,0 +1,49 @@ +atheneum package +================ + +Subpackages +----------- + +.. toctree:: + + atheneum.api + atheneum.middleware + atheneum.model + atheneum.service + atheneum.utility + +Submodules +---------- + +atheneum.db module +------------------ + +.. automodule:: atheneum.db + :members: + :undoc-members: + :show-inheritance: + +atheneum.default\_settings module +--------------------------------- + +.. automodule:: atheneum.default_settings + :members: + :undoc-members: + :show-inheritance: + +atheneum.errors module +---------------------- + +.. automodule:: atheneum.errors + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: atheneum + :members: + :undoc-members: + :show-inheritance: diff --git a/server/documentation/server/atheneum.service.rst b/server/documentation/server/atheneum.service.rst new file mode 100644 index 0000000..1e8c9e3 --- /dev/null +++ b/server/documentation/server/atheneum.service.rst @@ -0,0 +1,70 @@ +atheneum.service package +======================== + +Submodules +---------- + +atheneum.service.authentication\_service module +----------------------------------------------- + +.. automodule:: atheneum.service.authentication_service + :members: + :undoc-members: + :show-inheritance: + +atheneum.service.patch\_service module +-------------------------------------- + +.. automodule:: atheneum.service.patch_service + :members: + :undoc-members: + :show-inheritance: + +atheneum.service.role\_service module +------------------------------------- + +.. automodule:: atheneum.service.role_service + :members: + :undoc-members: + :show-inheritance: + +atheneum.service.transformation\_service module +----------------------------------------------- + +.. automodule:: atheneum.service.transformation_service + :members: + :undoc-members: + :show-inheritance: + +atheneum.service.user\_service module +------------------------------------- + +.. automodule:: atheneum.service.user_service + :members: + :undoc-members: + :show-inheritance: + +atheneum.service.user\_token\_service module +-------------------------------------------- + +.. automodule:: atheneum.service.user_token_service + :members: + :undoc-members: + :show-inheritance: + +atheneum.service.validation\_service module +------------------------------------------- + +.. automodule:: atheneum.service.validation_service + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: atheneum.service + :members: + :undoc-members: + :show-inheritance: diff --git a/server/documentation/server/atheneum.utility.rst b/server/documentation/server/atheneum.utility.rst new file mode 100644 index 0000000..d74b0d2 --- /dev/null +++ b/server/documentation/server/atheneum.utility.rst @@ -0,0 +1,46 @@ +atheneum.utility package +======================== + +Submodules +---------- + +atheneum.utility.authentication\_utility module +----------------------------------------------- + +.. automodule:: atheneum.utility.authentication_utility + :members: + :undoc-members: + :show-inheritance: + +atheneum.utility.json\_utility module +------------------------------------- + +.. automodule:: atheneum.utility.json_utility + :members: + :undoc-members: + :show-inheritance: + +atheneum.utility.pagination\_utility module +------------------------------------------- + +.. automodule:: atheneum.utility.pagination_utility + :members: + :undoc-members: + :show-inheritance: + +atheneum.utility.session\_utility module +---------------------------------------- + +.. automodule:: atheneum.utility.session_utility + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: atheneum.utility + :members: + :undoc-members: + :show-inheritance: diff --git a/server/documentation/server/modules.rst b/server/documentation/server/modules.rst new file mode 100644 index 0000000..abfd5c4 --- /dev/null +++ b/server/documentation/server/modules.rst @@ -0,0 +1,7 @@ +Atheneum Server API +=================== + +.. toctree:: + :maxdepth: 4 + + atheneum