Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Makefile for Sphinx documentation

# You can set these variables from the command line.
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)

clean:
@rm -rf build

api-doc:
@# T: notoc, e: separate module pages, f: rewrite, d: max-depth
@sphinx-apidoc -o source/reference ../lighttree -Tfe -d 8

build:
@mkdir -p build
@sphinx-build -b html source build

generate: clean api-doc build
@#

.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)
Empty file added docs/__init__.py
Empty file.
46 changes: 46 additions & 0 deletions docs/source/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing to lighttree
We want to make contributing to this project as easy and transparent as
possible.

## Our Development Process
We use github to host code, to track issues and feature requests, as well as accept pull requests.


## Pull Requests
We actively welcome your pull requests.

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.

## Any contributions you make will be under the MIT Software License
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project.
Feel free to contact the maintainers if that's a concern.

## Issues
We use GitHub issues to track public bugs. Please ensure your description is
clear and has sufficient instructions to be able to reproduce the issue.

## Report bugs using Github's [issues](https://github.com/leonardbinet/lighttree/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/leonardbinet/lighttree/issues/new); it's that easy!

## Write bug reports with detail, background, and sample code

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)


## License
By contributing, you agree that your contributions will be licensed under its MIT License.

## References
This document was adapted from the open-source contribution guidelines of [briandk's gist](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62)
Empty file added docs/source/__init__.py
Empty file.
188 changes: 188 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- 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 = u"lighttree"
copyright = u"2020, Léonard Binet"
author = u"Léonard Binet"

# The short X.Y version
version = u""
# The full version, including alpha/beta/rc tags
release = u"0.1"


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# 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.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"recommonmark",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix(es) of source filenames.
source_suffix = [".rst", ".md"]

# The master toctree document.
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# 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 = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None


# -- 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 = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# 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 = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = "lighttreedoc"


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "lighttree.tex", u"lighttree Documentation", u"Léonard Binet", "manual"),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "lighttree", u"lighttree Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
"lighttree",
u"lighttree Documentation",
author,
"lighttree",
),
]


# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"]


# -- Extension configuration -------------------------------------------------

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}

# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
50 changes: 50 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. lighttree documentation master file


#########
lighttree
#########

.. toctree::
:hidden:
:maxdepth: 4

user-guide
API reference <reference/lighttree>
Contributing <CONTRIBUTING>

**lighttree** is a Python package providing a simple interface to manipulate data with a tree structure.

**********
Installing
**********

**lighttree** can be installed with `pip <https://pip.pypa.io>`_::

$ pip install lighttree

Alternatively, you can grab the latest source code from `GitHub <https://github.com/leonardbinet/lighttree>`_::

$ git clone git://github.com/leonardbinet/lighttree.git
$ python setup.py install

*****
Usage
*****

The :doc:`user-guide` is the place to go to learn how to use the library and
accomplish common tasks (work in progress).

The :doc:`reference/lighttree` documentation provides API-level documentation.

*******
License
*******

lighttree is made available under the MIT License. For more details, see `LICENSE.txt <https://github.com/leonardbinet/lighttree/blob/master/LICENCE>`_.

************
Contributing
************

We happily welcome contributions, please see :doc:`CONTRIBUTING` for details.
7 changes: 7 additions & 0 deletions docs/source/reference/lighttree.exceptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lighttree.exceptions module
===========================

.. automodule:: lighttree.exceptions
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/lighttree.interactive.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lighttree.interactive module
============================

.. automodule:: lighttree.interactive
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/lighttree.node.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lighttree.node module
=====================

.. automodule:: lighttree.node
:members:
:undoc-members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/source/reference/lighttree.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
lighttree package
=================

Submodules
----------

.. toctree::
:maxdepth: 8

lighttree.exceptions
lighttree.interactive
lighttree.node
lighttree.tree
lighttree.utils

Module contents
---------------

.. automodule:: lighttree
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/lighttree.tree.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lighttree.tree module
=====================

.. automodule:: lighttree.tree
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/lighttree.utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lighttree.utils module
======================

.. automodule:: lighttree.utils
:members:
:undoc-members:
:show-inheritance:
2 changes: 2 additions & 0 deletions docs/source/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recommonmark
sphinx_rtd_theme
Loading