Use more standard docs folder

This commit is contained in:
Luke Murphy
2019-11-25 11:18:48 +07:00
parent b3d2309f62
commit 2eb730a6dd
15 changed files with 3 additions and 3 deletions

12
docs/Makefile Normal file
View File

@ -0,0 +1,12 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

View File

View File

@ -0,0 +1,5 @@
*********
Changelog
*********
.. include:: ../../CHANGELOG.rst

View File

@ -0,0 +1,6 @@
.. _code-of-conduct:
Code of Conduct
***************
.. include:: ../../CODE_OF_CONDUCT.rst

8
docs/source/conf.py Normal file
View File

@ -0,0 +1,8 @@
author = 'decentral1se'
copyright = '2019, decentral1se'
html_static_path = ['_static']
html_theme = 'sphinx_rtd_theme'
master_doc = 'index'
project = 'flat-tree'
templates_path = ['_templates']
extensions = ['sphinx.ext.autodoc', 'sphinx_autodoc_typehints']

View File

@ -0,0 +1,5 @@
**********
Contribute
**********
.. include:: ../../CONTRIBUTING.rst

24
docs/source/example.rst Normal file
View File

@ -0,0 +1,24 @@
*******
Example
*******
You can represent a binary tree in a simple flat list using the following structure.
.. code-block:: python
"""
3
1 5
0 2 4 6 ...
"""
This module exposes a series of functions to help you build and maintain this data structure.
.. code-block:: python
from flat_tree import FlatTreeAccessor
tree_access = FlatTreeAccessor()
tree_access.index(1, 0) # get index @ depth: 1, offset: 0

15
docs/source/index.rst Normal file
View File

@ -0,0 +1,15 @@
.. include:: ../../README.rst
:end-before: _documentation
.. toctree::
:maxdepth: 1
:hidden:
install
upgrade
example
modules-api
other-impls
contribute
changelog
code-of-conduct

11
docs/source/install.rst Normal file
View File

@ -0,0 +1,11 @@
*******
Install
*******
.. code-block:: bash
$ pip install flat-tree
.. note::
Only Python >= 3.6 is supported.

View File

@ -0,0 +1,11 @@
.. _modules_api:
***********
Modules API
***********
.. automodule:: flat_tree.accessor
:members:
.. automodule:: flat_tree.iterator
:members:

View File

@ -0,0 +1,14 @@
.. _other-implementations:
Other Implementations
*********************
* `mafintosh/flat-tree`_
* `datrs/flat-tree`_
* `bcomnes/flattree`_
* `datcxx/flat-tree`_
.. _mafintosh/flat-tree: https://github.com/mafintosh/flat-tree
.. _datrs/flat-tree: https://github.com/datrs/flat-tree
.. _bcomnes/flattree: https://github.com/bcomnes/flattree
.. _datcxx/flat-tree: https://github.com/datcxx/flat-tree

7
docs/source/upgrade.rst Normal file
View File

@ -0,0 +1,7 @@
*******
Upgrade
*******
.. code-block:: bash
$ pip install --upgrade flat-tree