Skip to content

Commit a032709

Browse files
committed
Docs started
1 parent adc20c5 commit a032709

17 files changed

+632
-11
lines changed

.readthedocs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
3+
build:
4+
image: latest
5+
6+
python:
7+
version: 3.6

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ script:
2020
- poetry run flake8 dry_monads tests docs
2121
- poetry run mypy dry_monads tests/**/*.py
2222
- poetry run pytest
23-
# TODO: add docs and enable
24-
# - poetry run doc8 -q docs
23+
- poetry run doc8 -q docs
2524
- poetry check
2625
- pip check
2726
- safety check --bare --full-report

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Version history
2+
3+
We follow Semantic Versions since the `0.1.0` release.
4+
5+
6+
## Version 0.1.0
7+
8+
Initial release. Featuring only `Result` and `do_notation`.

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,3 @@ This module is heavily based on:
2020
- [dry-rb/dry-monads](https://github.com/dry-rb/dry-monads)
2121
- [Ø](https://github.com/dbrattli/OSlash)
2222
- [pymonad](https://bitbucket.org/jason_delaat/pymonad)
23-
24-
25-
## License
26-
27-
MIT

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
SPHINXPROJ = dotenv-linter
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/_static/.gitkeep

Whitespace-only changes.

docs/_templates/moreinfo.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<h3>
2+
Links
3+
</h3>
4+
<ul>
5+
<li>
6+
<a href="https://github.com/sobolevn/dry-monads">GitHub</a>
7+
</li>
8+
<li>
9+
<a href="https://pypi.python.org/pypi/dry-monads">PyPI</a>
10+
</li>
11+
<li>
12+
<a href="https://travis-ci.org/sobolevn/dry-monads">Travis CI</a>
13+
</li>
14+
<li>
15+
<a href="https://coveralls.io/github/sobolevn/dry-monads?branch=master">Coverage</a>
16+
</li>
17+
</ul>

docs/conf.py

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
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+
def _get_project_meta():
23+
import tomlkit
24+
25+
with open('../pyproject.toml') as pyproject:
26+
contents = pyproject.read()
27+
28+
return tomlkit.parse(contents)['tool']['poetry']
29+
30+
31+
pkg_meta = _get_project_meta()
32+
project = pkg_meta['name']
33+
copyright = '2019, wemake.services'
34+
author = 'wemake.services'
35+
36+
# The short X.Y version
37+
version = pkg_meta['version']
38+
# The full version, including alpha/beta/rc tags
39+
release = version
40+
41+
42+
# -- General configuration ---------------------------------------------------
43+
44+
# If your documentation needs a minimal Sphinx version, state it here.
45+
#
46+
# needs_sphinx = '1.0'
47+
48+
# Add any Sphinx extension module names here, as strings. They can be
49+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
50+
# ones.
51+
extensions = [
52+
'sphinx.ext.autodoc',
53+
'sphinx.ext.doctest',
54+
'sphinx.ext.todo',
55+
'sphinx.ext.coverage',
56+
'sphinx.ext.viewcode',
57+
'sphinx.ext.autosummary',
58+
'sphinx.ext.napoleon',
59+
60+
# Used to include .md files:
61+
'm2r',
62+
63+
# Used to insert typehints into the final docs:
64+
'sphinx_autodoc_typehints',
65+
66+
# Used to build graphs:
67+
'sphinxcontrib.mermaid',
68+
]
69+
70+
autoclass_content = 'class'
71+
autodoc_member_order = 'bysource'
72+
73+
autodoc_member_order = 'bysource'
74+
autodoc_default_flags = {
75+
'members': '',
76+
'undoc-members': 'code,error_template',
77+
'exclude-members': '__dict__,__weakref__',
78+
}
79+
80+
# Add any paths that contain templates here, relative to this directory.
81+
templates_path = ['_templates']
82+
83+
# The suffix(es) of source filenames.
84+
# You can specify multiple suffix as a list of string:
85+
86+
source_suffix = ['.rst', '.md']
87+
88+
# The master toctree document.
89+
master_doc = 'index'
90+
91+
# The language for content autogenerated by Sphinx. Refer to documentation
92+
# for a list of supported languages.
93+
#
94+
# This is also used if you do content translation via gettext catalogs.
95+
# Usually you set "language" from the command line for these cases.
96+
language = None
97+
98+
# List of patterns, relative to source directory, that match files and
99+
# directories to ignore when looking for source files.
100+
# This pattern also affects html_static_path and html_extra_path .
101+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
102+
103+
# The name of the Pygments (syntax highlighting) style to use.
104+
pygments_style = 'sphinx'
105+
106+
add_module_names = False
107+
108+
autodoc_default_options = {
109+
'show-inheritance': True,
110+
}
111+
112+
113+
# -- Options for HTML output -------------------------------------------------
114+
115+
# The theme to use for HTML and HTML Help pages. See the documentation for
116+
# a list of builtin themes.
117+
#
118+
html_theme = 'sphinx_typlog_theme'
119+
120+
# Theme options are theme-specific and customize the look and feel of a theme
121+
# further. For a list of options available for each theme, see the
122+
# documentation.
123+
html_theme_options = {
124+
'logo_name': 'dry-monads',
125+
'description': 'Monads for python made simple and safe',
126+
'github_user': 'sobolevn',
127+
'github_repo': 'dry-monads',
128+
}
129+
130+
# Add any paths that contain custom static files (such as style sheets) here,
131+
# relative to this directory. They are copied after the builtin static files,
132+
# so a file named "default.css" will overwrite the builtin "default.css".
133+
html_static_path = ['_static']
134+
135+
# Custom sidebar templates, must be a dictionary that maps document names
136+
# to template names.
137+
html_sidebars = {
138+
'**': [
139+
'logo.html',
140+
'globaltoc.html',
141+
'github.html',
142+
'searchbox.html',
143+
'moreinfo.html',
144+
]
145+
}
146+
147+
148+
# -- Extension configuration -------------------------------------------------
149+
150+
napoleon_numpy_docstring = False
151+
152+
# -- Options for todo extension ----------------------------------------------
153+
154+
# If true, `todo` and `todoList` produce output, else they produce nothing.
155+
todo_include_todos = True

docs/index.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.. mdinclude:: ../README.md
2+
3+
Contents
4+
--------
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
:caption: Userguide
9+
10+
pages/either.rst
11+
pages/do-notation.rst
12+
13+
.. toctree::
14+
:maxdepth: 1
15+
:caption: Changelog
16+
17+
pages/changelog.rst
18+
19+
20+
Indices and tables
21+
==================
22+
23+
* :ref:`genindex`
24+
* :ref:`modindex`
25+
* :ref:`search`

docs/make.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
set SPHINXPROJ=dotenv-linter
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

0 commit comments

Comments
 (0)