-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation generation using Sphinx (#415)
- Loading branch information
Showing
32 changed files
with
389 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
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.https://www.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sphinx==4.2.0 | ||
sphinx-readable-theme==1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# 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('.')) | ||
|
||
# -- Imports ---------------- | ||
|
||
import sphinx_readable_theme | ||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'PyDataStructs' | ||
copyright = '2021, PyDataStructs Development Team' | ||
author = 'PyDataStructs Development Team' | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = '0.0.1' | ||
|
||
|
||
# -- 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 = [ | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.napoleon' | ||
] | ||
|
||
napoleon_numpy_docstring = True | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = [] | ||
|
||
# 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 = [] | ||
|
||
|
||
# -- 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 = 'readable' | ||
|
||
html_theme_path = [sphinx_readable_theme.get_html_theme_path()] | ||
|
||
# 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 = [] | ||
|
||
autodoc_default_options = { | ||
'member-order': 'bysource', | ||
'members': True, | ||
'undoc-members': True, | ||
'special-members': True, | ||
'exclude-members': '__new__, methods, __slots__, __dict__, __weakref__' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.. PyDataStructs documentation master file, created by | ||
sphinx-quickstart on Sun Oct 17 19:57:08 2021. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to PyDataStructs's documentation! | ||
========================================= | ||
|
||
This project aims to be a Python package for various data | ||
structures in computer science. We are also working on the | ||
development of algorithms including their parallel implementations. | ||
To the best of our knowledge, a well-designed library/package which | ||
has covered most of the data structures and algorithms doesn't exist yet. | ||
|
||
Once the software design becomes more stable after a few releases of | ||
this package in the near future, we also aim to provide APIs for the | ||
code in C++ and Java as well. | ||
|
||
.. note:: | ||
|
||
This project is under active development and contributions are welcome. | ||
|
||
Contents | ||
======== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
pydatastructs/pydatastructs.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Algorithms | ||
========== | ||
|
||
.. autofunction:: pydatastructs.breadth_first_search | ||
|
||
.. autofunction:: pydatastructs.breadth_first_search_parallel | ||
|
||
.. autofunction:: pydatastructs.minimum_spanning_tree | ||
|
||
.. autofunction:: pydatastructs.minimum_spanning_tree_parallel | ||
|
||
.. autofunction:: pydatastructs.strongly_connected_components | ||
|
||
.. autofunction:: pydatastructs.depth_first_search | ||
|
||
.. autofunction:: pydatastructs.shortest_paths | ||
|
||
.. autofunction:: pydatastructs.all_pair_shortest_paths | ||
|
||
.. autofunction:: pydatastructs.topological_sort | ||
|
||
.. autofunction:: pydatastructs.topological_sort_parallel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Graph | ||
===== | ||
|
||
.. autoclass:: pydatastructs.Graph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Graphs | ||
====== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
graph.rst | ||
algorithms.rst |
34 changes: 34 additions & 0 deletions
34
docs/source/pydatastructs/linear_data_structures/algorithms.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Algorithms | ||
========== | ||
|
||
.. autofunction:: pydatastructs.merge_sort_parallel | ||
|
||
.. autofunction:: pydatastructs.brick_sort | ||
|
||
.. autofunction:: pydatastructs.brick_sort_parallel | ||
|
||
.. autofunction:: pydatastructs.heapsort | ||
|
||
.. autofunction:: pydatastructs.matrix_multiply_parallel | ||
|
||
.. autofunction:: pydatastructs.counting_sort | ||
|
||
.. autofunction:: pydatastructs.bucket_sort | ||
|
||
.. autofunction:: pydatastructs.cocktail_shaker_sort | ||
|
||
.. autofunction:: pydatastructs.quick_sort | ||
|
||
.. autofunction:: pydatastructs.longest_common_subsequence | ||
|
||
.. autofunction:: pydatastructs.is_ordered | ||
|
||
.. autofunction:: pydatastructs.upper_bound | ||
|
||
.. autofunction:: pydatastructs.lower_bound | ||
|
||
.. autofunction:: pydatastructs.longest_increasing_subsequence | ||
|
||
.. autofunction:: pydatastructs.next_permutation | ||
|
||
.. autofunction:: pydatastructs.prev_permutation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Arrays | ||
====== | ||
|
||
.. autoclass:: pydatastructs.OneDimensionalArray | ||
|
||
.. autoclass:: pydatastructs.MultiDimensionalArray | ||
|
||
.. autoclass:: pydatastructs.DynamicOneDimensionalArray |
9 changes: 9 additions & 0 deletions
9
docs/source/pydatastructs/linear_data_structures/linear_data_structures.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Linear Data Structures | ||
====================== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
arrays.rst | ||
linked_lists.rst | ||
algorithms.rst |
12 changes: 12 additions & 0 deletions
12
docs/source/pydatastructs/linear_data_structures/linked_lists.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Linked Lists | ||
============ | ||
|
||
.. autoclass:: pydatastructs.SinglyLinkedList | ||
|
||
.. autoclass:: pydatastructs.DoublyLinkedList | ||
|
||
.. autoclass:: pydatastructs.SinglyCircularLinkedList | ||
|
||
.. autoclass:: pydatastructs.DoublyCircularLinkedList | ||
|
||
.. autoclass:: pydatastructs.SkipList |
4 changes: 4 additions & 0 deletions
4
docs/source/pydatastructs/miscellaneous_data_structures/binomial_trees.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Binomial Tree | ||
============= | ||
|
||
.. autoclass:: pydatastructs.BinomialTree |
4 changes: 4 additions & 0 deletions
4
docs/source/pydatastructs/miscellaneous_data_structures/disjoint_set.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Disjoint Set | ||
============ | ||
|
||
.. autoclass:: pydatastructs.DisjointSetForest |
10 changes: 10 additions & 0 deletions
10
...e/pydatastructs/miscellaneous_data_structures/miscellaneous_data_structures.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Miscellaneous Data Structures | ||
============================= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
stack.rst | ||
queue.rst | ||
binomial_trees.rst | ||
disjoint_set.rst |
6 changes: 6 additions & 0 deletions
6
docs/source/pydatastructs/miscellaneous_data_structures/queue.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Queues | ||
====== | ||
|
||
.. autoclass:: pydatastructs.Queue | ||
|
||
.. autoclass:: pydatastructs.PriorityQueue |
4 changes: 4 additions & 0 deletions
4
docs/source/pydatastructs/miscellaneous_data_structures/stack.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Stack | ||
===== | ||
|
||
.. autoclass:: pydatastructs.Stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Modules | ||
======= | ||
|
||
.. automodule:: pydatastructs | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
linear_data_structures/linear_data_structures.rst | ||
graphs/graphs.rst | ||
strings/strings.rst | ||
trees/trees.rst | ||
miscellaneous_data_structures/miscellaneous_data_structures.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Algorithms | ||
========== | ||
|
||
.. autofunction:: pydatastructs.find |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Strings | ||
======= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
trie.rst | ||
algorithms.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Trie | ||
==== | ||
|
||
.. autoclass:: pydatastructs.Trie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Binary Trees | ||
============ | ||
|
||
.. autoclass:: pydatastructs.BinaryTree | ||
|
||
.. autoclass:: pydatastructs.BinarySearchTree | ||
|
||
.. autoclass:: pydatastructs.AVLTree | ||
|
||
.. autoclass:: pydatastructs.BinaryIndexedTree | ||
|
||
.. autoclass:: pydatastructs.CartesianTree | ||
|
||
.. autoclass:: pydatastructs.Treap | ||
|
||
.. autoclass:: pydatastructs.SplayTree | ||
|
||
.. autoclass:: pydatastructs.RedBlackTree | ||
|
||
.. autoclass:: pydatastructs.BinaryTreeTraversal |
Oops, something went wrong.