From f9d151af239feb68c1cfd7276f55fa32a8730ecd Mon Sep 17 00:00:00 2001 From: Robert Banagale Date: Mon, 24 Aug 2020 11:17:32 -0700 Subject: [PATCH 1/3] Stub sphinx quickstart --- docs/Makefile | 20 ++++++++++++++++++ docs/conf.py | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 20 ++++++++++++++++++ docs/make.bat | 35 ++++++++++++++++++++++++++++++++ 4 files changed, 130 insertions(+) create mode 100644 docs/Makefile create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/make.bat diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..d4bb2cbb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..1cd994e4 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,55 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# 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('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'stream-chat-python' +copyright = '2020, Stream' +author = 'Stream' + +# The full version, including alpha/beta/rc tags +release = 'v1.4.0' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# 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'] \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..542613fd --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,20 @@ +.. stream-chat-python documentation master file, created by + sphinx-quickstart on Mon Aug 24 11:13:35 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to stream-chat-python's documentation! +============================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 00000000..922152e9 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd From 6bfbe800d06c75a5748689abaf18210799bc6115 Mon Sep 17 00:00:00 2001 From: Robert Banagale Date: Mon, 24 Aug 2020 12:06:46 -0700 Subject: [PATCH 2/3] First doc generation attempt --- docs/_sources/modules.rst | 7 +++++ docs/_sources/stream_chat.rst | 45 +++++++++++++++++++++++++++++ docs/_sources/stream_chat.tests.rst | 37 ++++++++++++++++++++++++ docs/conf.py | 13 ++++----- docs/index.rst | 7 +---- docs/requirements.txt | 2 ++ 6 files changed, 98 insertions(+), 13 deletions(-) create mode 100644 docs/_sources/modules.rst create mode 100644 docs/_sources/stream_chat.rst create mode 100644 docs/_sources/stream_chat.tests.rst create mode 100644 docs/requirements.txt diff --git a/docs/_sources/modules.rst b/docs/_sources/modules.rst new file mode 100644 index 00000000..ac22ef30 --- /dev/null +++ b/docs/_sources/modules.rst @@ -0,0 +1,7 @@ +stream_chat +=========== + +.. toctree:: + :maxdepth: 4 + + stream_chat diff --git a/docs/_sources/stream_chat.rst b/docs/_sources/stream_chat.rst new file mode 100644 index 00000000..bbd5fe51 --- /dev/null +++ b/docs/_sources/stream_chat.rst @@ -0,0 +1,45 @@ +stream\_chat package +==================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + stream_chat.tests + +Submodules +---------- + +stream\_chat.channel module +--------------------------- + +.. automodule:: stream_chat.channel + :members: + :undoc-members: + :show-inheritance: + +stream\_chat.client module +-------------------------- + +.. automodule:: stream_chat.client + :members: + :undoc-members: + :show-inheritance: + +stream\_chat.exceptions module +------------------------------ + +.. automodule:: stream_chat.exceptions + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: stream_chat + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/_sources/stream_chat.tests.rst b/docs/_sources/stream_chat.tests.rst new file mode 100644 index 00000000..6dfa6ba7 --- /dev/null +++ b/docs/_sources/stream_chat.tests.rst @@ -0,0 +1,37 @@ +stream\_chat.tests package +========================== + +Submodules +---------- + +stream\_chat.tests.conftest module +---------------------------------- + +.. automodule:: stream_chat.tests.conftest + :members: + :undoc-members: + :show-inheritance: + +stream\_chat.tests.test\_channel module +--------------------------------------- + +.. automodule:: stream_chat.tests.test_channel + :members: + :undoc-members: + :show-inheritance: + +stream\_chat.tests.test\_client module +-------------------------------------- + +.. automodule:: stream_chat.tests.test_client + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: stream_chat.tests + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/conf.py b/docs/conf.py index 1cd994e4..f6a4cc0e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,14 +10,14 @@ # 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 ----------------------------------------------------- -project = 'stream-chat-python' +project = 'stream_chat' copyright = '2020, Stream' author = 'Stream' @@ -30,8 +30,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [ -] +extensions = ['sphinx.ext.autodoc'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -47,7 +46,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' # 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, diff --git a/docs/index.rst b/docs/index.rst index 542613fd..901a82f0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,9 +1,4 @@ -.. stream-chat-python documentation master file, created by - sphinx-quickstart on Mon Aug 24 11:13:35 2020. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to stream-chat-python's documentation! +stream-chat-python documentation ============================================== .. toctree:: diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..d9e80248 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +Sphinx==3.2.1 +sphinx-rtd-theme==0.5.0 \ No newline at end of file From 172173956c41db09c7dd0f4738464e94928c6887 Mon Sep 17 00:00:00 2001 From: Robert Banagale Date: Mon, 24 Aug 2020 12:14:19 -0700 Subject: [PATCH 3/3] Add additional requirements --- docs/requirements.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index d9e80248..1ac95a35 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,4 @@ Sphinx==3.2.1 -sphinx-rtd-theme==0.5.0 \ No newline at end of file +sphinx-rtd-theme==0.5.0 +jwt==1.0.0 +pytest==6.0.1 \ No newline at end of file