Skip to content

Commit e767429

Browse files
authored
Merge pull request #3 from 4n4nd/dev
Add Sphinx Documentation configuration
2 parents d9d1136 + 30735cd commit e767429

File tree

7 files changed

+349
-67
lines changed

7 files changed

+349
-67
lines changed

docs/Makefile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SOURCEDIR = .
8+
BUILDDIR = _build
9+
10+
# Put it first so that "make" without argument is like "make help".
11+
help:
12+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13+
14+
.PHONY: help Makefile
15+
16+
# Catch-all target: route all unknown targets to Sphinx using the new
17+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18+
%: Makefile
19+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

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

docs/index.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. Prometheus Client API Python documentation master file, created by
2+
sphinx-quickstart on Thu Mar 21 15:35:17 2019.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to Prometheus Client API Python's documentation!
7+
========================================================
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
13+
14+
15+
Indices and tables
16+
==================
17+
18+
* :ref:`genindex`
19+
* :ref:`modindex`
20+
* :ref:`search`

docs/make.bat

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33+
34+
:end
35+
popd

docs/source/modules.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
prometheus_api_client
2+
=====================
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
prometheus_api_client

docs/source/prometheus_api_client.rst

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
prometheus\_api\_client package
2+
===============================
3+
4+
Submodules
5+
----------
6+
7+
prometheus\_api\_client.prometheus\_connect module
8+
--------------------------------------------------
9+
10+
.. automodule:: prometheus_api_client.prometheus_connect
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
16+
Module contents
17+
---------------
18+
19+
.. automodule:: prometheus_api_client
20+
:members:
21+
:undoc-members:
22+
:show-inheritance:

0 commit comments

Comments
 (0)