-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFR] Docs restructured #53
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,15 +65,12 @@ coverage: ## check code coverage quickly with the default Python | |
coverage html | ||
$(BROWSER) htmlcov/index.html | ||
|
||
docs: ## generate Sphinx HTML documentation, including API docs | ||
rm -f docs/disruption_generator.rst | ||
rm -f docs/modules.rst | ||
sphinx-apidoc -o docs/ disruption_generator | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we are ready to have auto-generated API docs. They actually look like mess and there's not much of them anyway. We can easily re-activate this later once we actually have some docstrings. |
||
docs: ## generate Sphinx HTML documentation | ||
$(MAKE) -C docs clean | ||
$(MAKE) -C docs html | ||
$(BROWSER) docs/_build/html/index.html | ||
$(BROWSER) docs/build/html/index.html | ||
|
||
servedocs: docs ## compile the docs watching for changes | ||
servedocs: docs ## Build docs dynamically while making changes on them | ||
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D . | ||
|
||
docker: ## generate docker container | ||
|
@@ -89,7 +86,7 @@ dist: clean ## builds source and wheel package | |
|
||
install: clean ## install the package to the active Python's site-packages | ||
pip install pipenv | ||
PIPENV_IGNORE_VIRTUALENVS=1 pipenv install --dev | ||
PIPENV_IGNORE_VIRTUALENVS=1 pipenv install --dev --skip-lock | ||
pipenv run python setup.py install | ||
|
||
init: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,12 @@ def main(experiments_path, ssh_host_key): | |
|
||
|
||
async def execute(experiments_path, ssh_host_key): | ||
"""Find, parse and execute experiments. | ||
|
||
:param experiments_path: Path to directory with definitions of experiments. | ||
:return: 0 on success, else 1. | ||
:rtype: int | ||
""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just an example of how docstring should look like for autodoc make proper use of it. |
||
ssh_host_key = ssh_host_key or [ssh_host_key] | ||
_files = [] | ||
for (dirpath, dirnames, filenames) in walk(experiments_path): | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. include:: ../../AUTHORS.rst |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,45 @@ | ||
#!/usr/bin/env python | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has been built automatically by sphinx-quickstart, but I believe all the params are correct there. |
||
# -*- coding: utf-8 -*- | ||
# | ||
# disruption_generator documentation build configuration file, created by | ||
# sphinx-quickstart on Fri Jun 9 13:47:02 2017. | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file is execfile()d with the current directory set to its | ||
# containing dir. | ||
# | ||
# Note that not all possible configuration values are present in this | ||
# autogenerated file. | ||
# | ||
# All configuration values have a default; values that are commented out | ||
# serve to show the default. | ||
# 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/stable/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. | ||
# 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("..")) | ||
sys.path.insert(0, os.path.abspath("../..")) | ||
|
||
import disruption_generator | ||
|
||
# -- General configuration --------------------------------------------- | ||
# -- Project information ----------------------------------------------------- | ||
|
||
project = "Disruption Generator" | ||
copyright = "2018, Gonzalo Rafuls" | ||
author = "Gonzalo Rafuls" | ||
|
||
# The short X.Y version | ||
version = disruption_generator.__version__ | ||
# The full version, including alpha/beta/rc tags | ||
release = disruption_generator.__version__ | ||
|
||
|
||
# -- 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 coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
|
@@ -47,20 +54,6 @@ | |
# The master toctree document. | ||
master_doc = "index" | ||
|
||
# General information about the project. | ||
project = u"Disruption Generator" | ||
copyright = u"2018, Gonzalo Rafuls" | ||
author = u"Gonzalo Rafuls" | ||
|
||
# The version info for the project you're documenting, acts as replacement | ||
# for |version| and |release|, also used in various other places throughout | ||
# the built documents. | ||
# | ||
# The short X.Y version. | ||
version = disruption_generator.__version__ | ||
# The full version, including alpha/beta/rc tags. | ||
release = disruption_generator.__version__ | ||
|
||
# The language for content autogenerated by Sphinx. Refer to documentation | ||
# for a list of supported languages. | ||
# | ||
|
@@ -70,25 +63,22 @@ | |
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This patterns also effect to html_static_path and html_extra_path | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
# This pattern also affects html_static_path and html_extra_path . | ||
exclude_patterns = ["../build"] | ||
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = "sphinx" | ||
|
||
# If true, `todo` and `todoList` produce output, else they produce nothing. | ||
todo_include_todos = False | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------- | ||
# -- 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 = "alabaster" | ||
|
||
# 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 | ||
# 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 = {} | ||
|
@@ -98,14 +88,24 @@ | |
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ["_static"] | ||
|
||
# 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 --------------------------------------- | ||
# -- Options for HTMLHelp output --------------------------------------------- | ||
|
||
# Output file base name for HTML help builder. | ||
htmlhelp_basename = "disruption_generatordoc" | ||
|
||
|
||
# -- Options for LaTeX output ------------------------------------------ | ||
# -- Options for LaTeX output ------------------------------------------------ | ||
|
||
latex_elements = { | ||
# The paper size ('letterpaper' or 'a4paper'). | ||
|
@@ -123,35 +123,35 @@ | |
} | ||
|
||
# Grouping the document tree into LaTeX files. List of tuples | ||
# (source start file, target name, title, author, documentclass | ||
# [howto, manual, or own class]). | ||
# (source start file, target name, title, | ||
# author, documentclass [howto, manual, or own class]). | ||
latex_documents = [ | ||
( | ||
master_doc, | ||
"disruption_generator.tex", | ||
u"Disruption Generator Documentation", | ||
u"Gonzalo Rafuls", | ||
"Disruption Generator Documentation", | ||
"Gonzalo Rafuls", | ||
"manual", | ||
) | ||
) | ||
] | ||
|
||
|
||
# -- Options for manual page output ------------------------------------ | ||
# -- 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, | ||
"disruption_generator", | ||
u"Disruption Generator Documentation", | ||
"Disruption Generator Documentation", | ||
[author], | ||
1, | ||
) | ||
] | ||
|
||
|
||
# -- Options for Texinfo output ---------------------------------------- | ||
# -- Options for Texinfo output ---------------------------------------------- | ||
|
||
# Grouping the document tree into Texinfo files. List of tuples | ||
# (source start file, target name, title, author, | ||
|
@@ -160,10 +160,13 @@ | |
( | ||
master_doc, | ||
"disruption_generator", | ||
u"Disruption Generator Documentation", | ||
"Disruption Generator Documentation", | ||
author, | ||
"disruption_generator", | ||
"One line description of project.", | ||
"Miscellaneous", | ||
) | ||
] | ||
|
||
|
||
# -- Extension configuration ------------------------------------------------- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. include:: ../../CONTRIBUTING.rst |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.. highlight:: shell | ||
|
||
========================== | ||
Frequently Asked Questions | ||
========================== | ||
|
||
**Question:** How can I simulate "dummy" log filling if I just want to try something out? | ||
|
||
**Answer:** You can use our development utility fake_logger. More info on its usage can be found in | ||
`disruption_generator/utils/fake_logger.py`. You can run it for example like this:: | ||
|
||
python fake_logger.py --log-file dummy.log --append --max-interval 2 --randomize --target-msg "FINISH" --seconds 0 | ||
|
||
------------ | ||
|
||
**Question:** How can I configure logging levels of `disruption_generator`? | ||
|
||
**Answer:** Generally speaking by creating a file called `custom_logging.yaml` in `disruption_generator` directory and | ||
overriding default values in it. More info on this process can be found in `disruption_generator/default_logging.yaml`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. include:: ../../HISTORY.rst |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. include:: ../../README.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generated dynamically