From 0c8c70315420dccab03e35a54329838d7c3203dd Mon Sep 17 00:00:00 2001 From: Joel Lee Date: Wed, 21 Jul 2021 14:44:37 +0800 Subject: [PATCH 1/4] Trigger pre-commit --- docs/Makefile | 20 +++++++++++++++++++ docs/conf.py | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 20 +++++++++++++++++++ docs/make.bat | 35 +++++++++++++++++++++++++++++++++ 4 files changed, 127 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..456308c2 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,52 @@ +# 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 = 'supabase' +copyright = '2021, Joel Lee' +author = 'Joel Lee' + + +# -- 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..14d7ae89 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,20 @@ +.. supabase documentation master file, created by + sphinx-quickstart on Wed Jul 21 14:39:24 2021. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to supabase'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..2119f510 --- /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 95808c562fa99c90f8fd3661efbdb38225454c3d Mon Sep 17 00:00:00 2001 From: Joel Lee Date: Wed, 21 Jul 2021 15:05:06 +0800 Subject: [PATCH 2/4] chore: format docs file with black --- README.md | 2 +- docs/conf.py | 17 ++++++++--------- docs/index.rst | 7 +++++++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 901a2d10..8c60b772 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # supabase-py -[![Documentation Status](https://readthedocs.org/projects/gotrue-py/badge/?version=latest)](https://gotrue-py.readthedocs.io/en/latest/?badge=latest) +[![Documentation Status](https://readthedocs.org/projects/supabase/badge/?version=latest)](https://supabase.readthedocs.io/en/latest/?badge=latest) Supabase client for Python. This mirrors the design of [supabase-js](https://github.com/supabase/supabase-js/blob/master/README.md) diff --git a/docs/conf.py b/docs/conf.py index 456308c2..26c7fd8d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,9 +17,9 @@ # -- Project information ----------------------------------------------------- -project = 'supabase' -copyright = '2021, Joel Lee' -author = 'Joel Lee' +project = "supabase" +copyright = "2021, Joel Lee" +author = "Joel Lee" # -- General configuration --------------------------------------------------- @@ -27,16 +27,15 @@ # 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 = ["myst_parser"] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +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'] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # -- Options for HTML output ------------------------------------------------- @@ -44,9 +43,9 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +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 +html_static_path = ["_static"] diff --git a/docs/index.rst b/docs/index.rst index 14d7ae89..42f4934c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,3 +18,10 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` + + +Features +-------- +* Auth +* Realtime +* Storage \ No newline at end of file From c8289d4e3c8dd0a2fe2bbafc259d8a9d41e83637 Mon Sep 17 00:00:00 2001 From: Joel Lee Date: Wed, 21 Jul 2021 15:22:40 +0800 Subject: [PATCH 3/4] docs: substitute CLRF --- README.md | 1 - docs/make.bat | 70 +++++++++++++++++++++++++-------------------------- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 91aa738b..8c005747 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # supabase-py -======= [![Tests](https://github.com/supabase/supabase-py/actions/workflows/ci-python.yml/badge.svg)](https://github.com/supabase/supabase-py/actions) [![PYPI Version](https://badge.fury.io/py/supabase-py.svg)](https://badge.fury.io/py/supabase-py) diff --git a/docs/make.bat b/docs/make.bat index 2119f510..922152e9 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -1,35 +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 +@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 b74e4399c3d3def335f7c92588bf6437a3e80bfe Mon Sep 17 00:00:00 2001 From: Joel Lee Date: Fri, 23 Jul 2021 14:09:18 +0800 Subject: [PATCH 4/4] feat: add docs for query_builder and storage_bucket --- docs/conf.py | 2 +- docs/index.rst | 9 ++++++++- docs/query_builder.rst | 6 ++++++ docs/storage_bucket.rst | 6 ++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 docs/query_builder.rst create mode 100644 docs/storage_bucket.rst diff --git a/docs/conf.py b/docs/conf.py index 26c7fd8d..09622bbc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,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 = ["myst_parser"] +extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] diff --git a/docs/index.rst b/docs/index.rst index 42f4934c..ffa0c490 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,10 +6,17 @@ Welcome to supabase's documentation! ==================================== +.. automodule:: supabase_py + :members: + :show-inheritance: + .. toctree:: :maxdepth: 2 :caption: Contents: + query_builder + storage_bucket + Indices and tables @@ -24,4 +31,4 @@ Features -------- * Auth * Realtime -* Storage \ No newline at end of file +* Storage diff --git a/docs/query_builder.rst b/docs/query_builder.rst new file mode 100644 index 00000000..7b6717eb --- /dev/null +++ b/docs/query_builder.rst @@ -0,0 +1,6 @@ +Query Builder +================ + +.. automodule:: supabase_py.lib.query_builder + :members: + :show-inheritance: diff --git a/docs/storage_bucket.rst b/docs/storage_bucket.rst new file mode 100644 index 00000000..7feee821 --- /dev/null +++ b/docs/storage_bucket.rst @@ -0,0 +1,6 @@ +Storage Bucket +================ + +.. automodule:: supabase_py.lib.storage.storage_bucket_api + :members: + :show-inheritance: