You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by ch...@apache.org on 2023/07/28 00:20:07 UTC
[datasketches-cpp] 01/01: Initial docs draft
This is an automated email from the ASF dual-hosted git repository.
charlie pushed a commit to branch python-docs
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
commit 9ca1cbad61f85f6ef1f1d38a3d68aad9ac126f3f
Author: Charlie Dickens <ch...@apache.org>
AuthorDate: Thu Jul 27 17:13:29 2023 -0700
Initial docs draft
---
python/docs/Makefile | 20 +++++++++++
python/docs/make.bat | 35 +++++++++++++++++++
python/docs/source/conf.py | 41 +++++++++++++++++++++++
python/docs/source/cpc.rst | 7 ++++
python/docs/source/frequent_items.rst | 6 ++++
python/docs/source/hyper_log_log.rst | 7 ++++
python/docs/source/index.rst | 63 +++++++++++++++++++++++++++++++++++
python/docs/source/kll.rst | 19 +++++++++++
python/docs/source/theta.rst | 8 +++++
9 files changed, 206 insertions(+)
diff --git a/python/docs/Makefile b/python/docs/Makefile
new file mode 100644
index 0000000..d0c3cbf
--- /dev/null
+++ b/python/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 = source
+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/python/docs/make.bat b/python/docs/make.bat
new file mode 100644
index 0000000..747ffb7
--- /dev/null
+++ b/python/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=source
+set BUILDDIR=build
+
+%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.https://www.sphinx-doc.org/
+ exit /b 1
+)
+
+if "%1" == "" goto help
+
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+
+:end
+popd
diff --git a/python/docs/source/conf.py b/python/docs/source/conf.py
new file mode 100644
index 0000000..aedd563
--- /dev/null
+++ b/python/docs/source/conf.py
@@ -0,0 +1,41 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# For the full list of built-in configuration values, see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Project information -----------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
+
+import sys
+import os
+#PATH = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../datasketches'))
+sys.path.insert(0, os.path.abspath("../../datasketches"))
+sys.path.insert(0, os.path.abspath("../../src"))
+#print("Adding path:\n", PATH)
+print("*****")
+#sys.path.insert(0, PATH) #os.path.join(PATH, "cppyml"))
+# sys.path.insert(0, os.path.join(PATH, "cppyml"))
+# sys.path.insert(0, os.path.abspath('.'))
+for sp in sys.path:
+ print(sp)
+
+project = 'datasketches'
+copyright = '2023, charlie'
+author = 'charlie'
+release = '0.1'
+
+# -- General configuration ---------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
+
+extensions = ["sphinx.ext.autodoc","sphinx.ext.autosummary"]
+
+templates_path = ['_templates']
+exclude_patterns = []
+
+
+
+# -- Options for HTML output -------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
+
+html_theme = 'sphinx_rtd_theme'
+html_static_path = ['_static']
diff --git a/python/docs/source/cpc.rst b/python/docs/source/cpc.rst
new file mode 100644
index 0000000..ac18638
--- /dev/null
+++ b/python/docs/source/cpc.rst
@@ -0,0 +1,7 @@
+Compressed Probabilistic Counting (CPC)
+---------------------------------------
+The *Compressed Probabilistic Counting* sketch is a space-efficient method for estimating cardinalities of sets.
+
+.. autoclass:: _datasketches.cpc_sketch
+ :members:
+ :undoc-members:
diff --git a/python/docs/source/frequent_items.rst b/python/docs/source/frequent_items.rst
new file mode 100644
index 0000000..c5f40fc
--- /dev/null
+++ b/python/docs/source/frequent_items.rst
@@ -0,0 +1,6 @@
+Frequent Items
+-----------
+
+.. autoclass:: _datasketches.frequent_items_sketch
+ :members:
+ :undoc-members:
diff --git a/python/docs/source/hyper_log_log.rst b/python/docs/source/hyper_log_log.rst
new file mode 100644
index 0000000..7253d9e
--- /dev/null
+++ b/python/docs/source/hyper_log_log.rst
@@ -0,0 +1,7 @@
+HyperLogLog
+-----------
+The HyperLogLog sketch is a space-efficient method for estimating cardinalities of sets.
+
+.. autoclass:: _datasketches.hll_sketch
+ :members:
+ :undoc-members:
diff --git a/python/docs/source/index.rst b/python/docs/source/index.rst
new file mode 100644
index 0000000..ac8396c
--- /dev/null
+++ b/python/docs/source/index.rst
@@ -0,0 +1,63 @@
+.. datasketches documentation master file, created by
+ sphinx-quickstart on Tue Jul 25 11:04:59 2023.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+Apache DataSketches
+=================================================
+
+**DataSketches** are highly-efficient algorithms to analyze big data quickly.
+
+
+Distinct Counting
+#################
+..
+ maxdepth: 1 means only the heading is printed in the contents
+.. toctree::
+ :maxdepth: 1
+
+ hyper_log_log
+ cpc
+ theta
+
+Quantile Estimation
+###################
+
+.. toctree::
+ :maxdepth: 1
+
+ kll
+
+Frequent Items
+##########################
+This problem may be known as **heavy hitters** or **TopK**
+
+.. toctree::
+ :maxdepth: 1
+
+ frequent_items
+
+
+.. note::
+
+ This project is under active development.
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
+
+.. .. automodule:: datasketches
+.. :members:
+
+.. .. automodule:: _datasketches
+.. :members:
+
+..
+..
+
+.. distinct_count
diff --git a/python/docs/source/kll.rst b/python/docs/source/kll.rst
new file mode 100644
index 0000000..312fd34
--- /dev/null
+++ b/python/docs/source/kll.rst
@@ -0,0 +1,19 @@
+KLL Sketch
+----------
+
+.. autoclass:: _datasketches.kll_ints_sketch
+ :members:
+ :undoc-members:
+
+.. autoclass:: _datasketches.kll_floats_sketch
+ :members:
+ :undoc-members:
+
+.. autoclass:: _datasketches.kll_doubles_sketch
+ :members:
+ :undoc-members:
+
+.. autoclass:: _datasketches.kll_items_sketch
+ :members:
+ :undoc-members:
+
diff --git a/python/docs/source/theta.rst b/python/docs/source/theta.rst
new file mode 100644
index 0000000..bf85d9f
--- /dev/null
+++ b/python/docs/source/theta.rst
@@ -0,0 +1,8 @@
+Theta Sketch
+------------
+The *Theta Sketch* sketch is a space-efficient method for estimating cardinalities of sets.
+It can also easily handle set operations (such as union, intersection, difference) while maintaining good accuarcy.
+
+.. autoclass:: _datasketches.theta_sketch
+ :members:
+ :undoc-members:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org