Skip to content

Commit a5fa155

Browse files
authored
Merge pull request #7 from leonardbinet/ldocs
lighttree documentation
2 parents 91dc957 + 3a36149 commit a5fa155

15 files changed

+409
-6
lines changed

docs/Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Makefile for Sphinx documentation
2+
3+
# You can set these variables from the command line.
4+
SPHINXOPTS =
5+
SPHINXBUILD = sphinx-build
6+
SOURCEDIR = source
7+
BUILDDIR = build
8+
9+
# Put it first so that "make" without argument is like "make help".
10+
help:
11+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
12+
13+
clean:
14+
@rm -rf build
15+
16+
api-doc:
17+
@# T: notoc, e: separate module pages, f: rewrite, d: max-depth
18+
@sphinx-apidoc -o source/reference ../lighttree -Tfe -d 8
19+
20+
build:
21+
@mkdir -p build
22+
@sphinx-build -b html source build
23+
24+
generate: clean api-doc build
25+
@#
26+
27+
.PHONY: help Makefile
28+
29+
# Catch-all target: route all unknown targets to Sphinx using the new
30+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
31+
%: Makefile
32+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/__init__.py

Whitespace-only changes.

docs/source/CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributing to lighttree
2+
We want to make contributing to this project as easy and transparent as
3+
possible.
4+
5+
## Our Development Process
6+
We use github to host code, to track issues and feature requests, as well as accept pull requests.
7+
8+
9+
## Pull Requests
10+
We actively welcome your pull requests.
11+
12+
1. Fork the repo and create your branch from `master`.
13+
2. If you've added code that should be tested, add tests.
14+
3. If you've changed APIs, update the documentation.
15+
4. Ensure the test suite passes.
16+
5. Make sure your code lints.
17+
18+
## Any contributions you make will be under the MIT Software License
19+
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.
20+
Feel free to contact the maintainers if that's a concern.
21+
22+
## Issues
23+
We use GitHub issues to track public bugs. Please ensure your description is
24+
clear and has sufficient instructions to be able to reproduce the issue.
25+
26+
## Report bugs using Github's [issues](https://github.com/leonardbinet/lighttree/issues)
27+
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!
28+
29+
## Write bug reports with detail, background, and sample code
30+
31+
**Great Bug Reports** tend to have:
32+
33+
- A quick summary and/or background
34+
- Steps to reproduce
35+
- Be specific!
36+
- Give sample code if you can.
37+
- What you expected would happen
38+
- What actually happens
39+
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
40+
41+
42+
## License
43+
By contributing, you agree that your contributions will be licensed under its MIT License.
44+
45+
## References
46+
This document was adapted from the open-source contribution guidelines of [briandk's gist](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62)

docs/source/__init__.py

Whitespace-only changes.

docs/source/conf.py

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/master/config
8+
9+
# -- Path setup --------------------------------------------------------------
10+
11+
# If extensions (or modules to document with autodoc) are in another directory,
12+
# add these directories to sys.path here. If the directory is relative to the
13+
# documentation root, use os.path.abspath to make it absolute, like shown here.
14+
#
15+
# import os
16+
# import sys
17+
# sys.path.insert(0, os.path.abspath('.'))
18+
19+
20+
# -- Project information -----------------------------------------------------
21+
22+
project = u"lighttree"
23+
copyright = u"2020, Léonard Binet"
24+
author = u"Léonard Binet"
25+
26+
# The short X.Y version
27+
version = u""
28+
# The full version, including alpha/beta/rc tags
29+
release = u"0.1"
30+
31+
32+
# -- General configuration ---------------------------------------------------
33+
34+
# If your documentation needs a minimal Sphinx version, state it here.
35+
#
36+
# needs_sphinx = '1.0'
37+
38+
# Add any Sphinx extension module names here, as strings. They can be
39+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
40+
# ones.
41+
extensions = [
42+
"sphinx.ext.autodoc",
43+
"sphinx.ext.doctest",
44+
"sphinx.ext.intersphinx",
45+
"sphinx.ext.todo",
46+
"sphinx.ext.coverage",
47+
"sphinx.ext.viewcode",
48+
"sphinx.ext.githubpages",
49+
"recommonmark",
50+
]
51+
52+
# Add any paths that contain templates here, relative to this directory.
53+
templates_path = ["_templates"]
54+
55+
# The suffix(es) of source filenames.
56+
source_suffix = [".rst", ".md"]
57+
58+
# The master toctree document.
59+
master_doc = "index"
60+
61+
# The language for content autogenerated by Sphinx. Refer to documentation
62+
# for a list of supported languages.
63+
#
64+
# This is also used if you do content translation via gettext catalogs.
65+
# Usually you set "language" from the command line for these cases.
66+
language = None
67+
68+
# List of patterns, relative to source directory, that match files and
69+
# directories to ignore when looking for source files.
70+
# This pattern also affects html_static_path and html_extra_path.
71+
exclude_patterns = []
72+
73+
# The name of the Pygments (syntax highlighting) style to use.
74+
pygments_style = None
75+
76+
77+
# -- Options for HTML output -------------------------------------------------
78+
79+
# The theme to use for HTML and HTML Help pages. See the documentation for
80+
# a list of builtin themes.
81+
#
82+
html_theme = "sphinx_rtd_theme"
83+
84+
# Theme options are theme-specific and customize the look and feel of a theme
85+
# further. For a list of options available for each theme, see the
86+
# documentation.
87+
#
88+
# html_theme_options = {}
89+
90+
# Add any paths that contain custom static files (such as style sheets) here,
91+
# relative to this directory. They are copied after the builtin static files,
92+
# so a file named "default.css" will overwrite the builtin "default.css".
93+
html_static_path = []
94+
95+
# Custom sidebar templates, must be a dictionary that maps document names
96+
# to template names.
97+
#
98+
# The default sidebars (for documents that don't match any pattern) are
99+
# defined by theme itself. Builtin themes are using these templates by
100+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
101+
# 'searchbox.html']``.
102+
#
103+
# html_sidebars = {}
104+
105+
106+
# -- Options for HTMLHelp output ---------------------------------------------
107+
108+
# Output file base name for HTML help builder.
109+
htmlhelp_basename = "lighttreedoc"
110+
111+
112+
# -- Options for LaTeX output ------------------------------------------------
113+
114+
latex_elements = {
115+
# The paper size ('letterpaper' or 'a4paper').
116+
#
117+
# 'papersize': 'letterpaper',
118+
# The font size ('10pt', '11pt' or '12pt').
119+
#
120+
# 'pointsize': '10pt',
121+
# Additional stuff for the LaTeX preamble.
122+
#
123+
# 'preamble': '',
124+
# Latex figure (float) alignment
125+
#
126+
# 'figure_align': 'htbp',
127+
}
128+
129+
# Grouping the document tree into LaTeX files. List of tuples
130+
# (source start file, target name, title,
131+
# author, documentclass [howto, manual, or own class]).
132+
latex_documents = [
133+
(master_doc, "lighttree.tex", u"lighttree Documentation", u"Léonard Binet", "manual"),
134+
]
135+
136+
137+
# -- Options for manual page output ------------------------------------------
138+
139+
# One entry per manual page. List of tuples
140+
# (source start file, name, description, authors, manual section).
141+
man_pages = [(master_doc, "lighttree", u"lighttree Documentation", [author], 1)]
142+
143+
144+
# -- Options for Texinfo output ----------------------------------------------
145+
146+
# Grouping the document tree into Texinfo files. List of tuples
147+
# (source start file, target name, title, author,
148+
# dir menu entry, description, category)
149+
texinfo_documents = [
150+
(
151+
master_doc,
152+
"lighttree",
153+
u"lighttree Documentation",
154+
author,
155+
"lighttree",
156+
),
157+
]
158+
159+
160+
# -- Options for Epub output -------------------------------------------------
161+
162+
# Bibliographic Dublin Core info.
163+
epub_title = project
164+
165+
# The unique identifier of the text. This can be a ISBN number
166+
# or the project homepage.
167+
#
168+
# epub_identifier = ''
169+
170+
# A unique identification for the text.
171+
#
172+
# epub_uid = ''
173+
174+
# A list of files that should not be packed into the epub file.
175+
epub_exclude_files = ["search.html"]
176+
177+
178+
# -- Extension configuration -------------------------------------------------
179+
180+
# -- Options for intersphinx extension ---------------------------------------
181+
182+
# Example configuration for intersphinx: refer to the Python standard library.
183+
intersphinx_mapping = {"https://docs.python.org/": None}
184+
185+
# -- Options for todo extension ----------------------------------------------
186+
187+
# If true, `todo` and `todoList` produce output, else they produce nothing.
188+
todo_include_todos = True

docs/source/index.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
.. lighttree documentation master file
2+
3+
4+
#########
5+
lighttree
6+
#########
7+
8+
.. toctree::
9+
:hidden:
10+
:maxdepth: 4
11+
12+
user-guide
13+
API reference <reference/lighttree>
14+
Contributing <CONTRIBUTING>
15+
16+
**lighttree** is a Python package providing a simple interface to manipulate data with a tree structure.
17+
18+
**********
19+
Installing
20+
**********
21+
22+
**lighttree** can be installed with `pip <https://pip.pypa.io>`_::
23+
24+
$ pip install lighttree
25+
26+
Alternatively, you can grab the latest source code from `GitHub <https://github.com/leonardbinet/lighttree>`_::
27+
28+
$ git clone git://github.com/leonardbinet/lighttree.git
29+
$ python setup.py install
30+
31+
*****
32+
Usage
33+
*****
34+
35+
The :doc:`user-guide` is the place to go to learn how to use the library and
36+
accomplish common tasks (work in progress).
37+
38+
The :doc:`reference/lighttree` documentation provides API-level documentation.
39+
40+
*******
41+
License
42+
*******
43+
44+
lighttree is made available under the MIT License. For more details, see `LICENSE.txt <https://github.com/leonardbinet/lighttree/blob/master/LICENCE>`_.
45+
46+
************
47+
Contributing
48+
************
49+
50+
We happily welcome contributions, please see :doc:`CONTRIBUTING` for details.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lighttree.exceptions module
2+
===========================
3+
4+
.. automodule:: lighttree.exceptions
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lighttree.interactive module
2+
============================
3+
4+
.. automodule:: lighttree.interactive
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lighttree.node module
2+
=====================
3+
4+
.. automodule:: lighttree.node
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
lighttree package
2+
=================
3+
4+
Submodules
5+
----------
6+
7+
.. toctree::
8+
:maxdepth: 8
9+
10+
lighttree.exceptions
11+
lighttree.interactive
12+
lighttree.node
13+
lighttree.tree
14+
lighttree.utils
15+
16+
Module contents
17+
---------------
18+
19+
.. automodule:: lighttree
20+
:members:
21+
:undoc-members:
22+
:show-inheritance:

0 commit comments

Comments
 (0)