Skip to content

Commit 5901bc7

Browse files
author
Sherin Thomas
authored
Documentation update (#34)
* docs setup * docs done * review fixes
1 parent d457162 commit 5901bc7

File tree

12 files changed

+592
-313
lines changed

12 files changed

+592
-313
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ redisai.egg-info
77
.mypy_cache/
88
build/
99
dist/
10+
docs/_build/

README.md

-231
This file was deleted.

README.rst

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
==========
2+
redisai-py
3+
==========
4+
5+
.. image:: https://img.shields.io/github/license/RedisAI/redisai-py.svg
6+
:target: https://github.com/RedisAI/redisai-py
7+
8+
.. image:: https://badge.fury.io/py/redisai.svg
9+
:target: https://badge.fury.io/py/redisai
10+
11+
.. image:: https://circleci.com/gh/RedisAI/redisai-py/tree/master.svg?style=svg
12+
:target: https://circleci.com/gh/RedisAI/redisai-py/tree/master
13+
14+
.. image:: https://img.shields.io/github/release/RedisAI/redisai-py.svg
15+
:target: https://github.com/RedisAI/redisai-py/releases/latest
16+
17+
.. image:: https://codecov.io/gh/RedisAI/redisai-py/branch/master/graph/badge.svg
18+
:target: https://codecov.io/gh/RedisAI/redisai-py
19+
20+
21+
redisai-py is the Python client for RedisAI. Checkout the
22+
`documentation <https://redisai-py.readthedocs.io/en/latest/>`_ for API details and examples
23+
24+
Installation
25+
------------
26+
27+
1. Install Redis 5.0 or above
28+
2. Install `RedisAI <http://redisai.io>`_
29+
3. Install the Python client
30+
31+
.. code-block:: bash
32+
33+
$ pip install redisai
34+
35+
36+
4. Install serialization-deserialization utility (optional)
37+
38+
.. code-block:: bash
39+
40+
$ pip install ml2rt
41+
42+
43+
`RedisAI example repo <https://github.com/RedisAI/redisai-examples>`_ shows few examples
44+
made using redisai-py under `python_client` folder. Also, checkout
45+
`ml2rt <https://github.com/hhsecond/ml2rt>`_ for convenient functions those might help in
46+
converting models (sparkml, sklearn, xgboost to ONNX), serializing models to disk, loading
47+
it back to redisai-py etc.

docs/Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/api.rst

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _ref-api:
2+
3+
API Documentation
4+
=================
5+
This page hosts the documentation of all user-facing APIs. The only entrypoint the users
6+
should be using is the ``Client`` class. It exposes all the RedisAI commands as methods
7+
8+
9+
Client Class
10+
------------
11+
.. autoclass:: redisai.Client
12+
:members:

docs/conf.py

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import redisai
2+
3+
project = 'redisai-py'
4+
copyright = '2020, RedisLabs'
5+
author = 'RedisLabs'
6+
release = redisai.__version__
7+
extensions = ['sphinx.ext.autodoc',
8+
'sphinx.ext.autosummary',
9+
'sphinx.ext.extlinks',
10+
'sphinx.ext.napoleon',
11+
'sphinx.ext.todo',
12+
'sphinx.ext.intersphinx',
13+
"sphinx_rtd_theme"]
14+
templates_path = ['_templates']
15+
source_suffix = '.rst'
16+
master_doc = 'index'
17+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
18+
html_theme = 'sphinx_rtd_theme'
19+
html_use_smartypants = True
20+
html_last_updated_fmt = '%b %d, %Y'
21+
html_split_index = False
22+
html_sidebars = {
23+
'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
24+
}
25+
html_short_title = '%s-%s' % (project, release)
26+
27+
napoleon_use_ivar = True
28+
napoleon_use_rtype = True
29+
napoleon_use_param = True
30+
napoleon_include_init_with_doc = True
31+
32+
add_module_names = False
33+
doctest_test_doctest_blocks = None
34+
autoclass_content = 'class'

docs/index.rst

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Welcome to redisai-py's documentation!
2+
======================================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
:caption: Contents:
7+
8+
readme
9+
api
10+
11+
12+
Indices and tables
13+
==================
14+
15+
* :ref:`genindex`
16+
* :ref:`modindex`
17+
* :ref:`search`

0 commit comments

Comments
 (0)