Skip to content

Commit b3a95f2

Browse files
William Grantbraxtonmckee
authored andcommitted
sphinx docs working draft
1 parent 919473f commit b3a95f2

File tree

5 files changed

+95
-1
lines changed

5 files changed

+95
-1
lines changed

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_build/

docs/Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Minimal makefile for Sphinx documentation
2+
3+
4+
5+
# You can set these variables from the command line, and also
6+
# from the environment for the first two.
7+
SPHINXOPTS ?=
8+
SPHINXBUILD ?= sphinx-build
9+
SOURCEDIR = .
10+
BUILDDIR = _build
11+
12+
# Put it first so that "make" without argument is like "make help".
13+
help:
14+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
15+
16+
.PHONY: help Makefile
17+
18+
show:
19+
@echo "Showing generated html"
20+
21+
22+
# Catch-all target: route all unknown targets to Sphinx using the new
23+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
24+
25+
# make sure to rebuild API reference with
26+
#sphinx-apidoc -o . ../typed_python -f
27+
# if required
28+
%: Makefile
29+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
import os
9+
import sys
10+
11+
project = 'typed_python'
12+
copyright = '2022, Braxton McKee'
13+
author = 'Braxton McKee'
14+
release = '0.2.6'
15+
16+
# -- General configuration ---------------------------------------------------
17+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
18+
19+
extensions = ['myst_parser',
20+
'sphinx.ext.autodoc',
21+
'sphinx.ext.napoleon',
22+
'sphinx.ext.viewcode'
23+
]
24+
25+
templates_path = ['_templates']
26+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
27+
28+
# -- Options for HTML output -------------------------------------------------
29+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
30+
31+
html_theme = 'alabaster'
32+
html_static_path = ['_static']
33+
34+
sys.path.insert(0, os.path.abspath('..'))

docs/index.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. typed_python documentation master file, created by
2+
3+
sphinx-quickstart on Tue Sep 20 12:56:07 2022.
4+
You can adapt this file completely to your liking, but it should at least
5+
contain the root `toctree` directive.
6+
7+
Welcome to typed_python's documentation!
8+
========================================
9+
10+
.. toctree::
11+
:maxdepth: 2
12+
:caption: Contents:
13+
14+
introduction.md
15+
intro_2.md
16+
modules
17+
18+
This is some stub documentation, which will one day be an API reference + a User Guide/Zoo + Developer's Guide.
19+
20+
21+
22+
23+
Indices and tables
24+
==================
25+
26+
* :ref:`genindex`
27+
* :ref:`modindex`
28+
* :ref:`search`

docs/typed_python.md renamed to docs/intro_2.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Typed Python
1+
# Typed Python
22

33
`typed_python` is a library for describing strongly and semi-strongly typed
44
data-structures in Python. `typed_python` types look and feel like their
@@ -19,6 +19,8 @@ It's important to note that `typed_python` is a Python module, not a separate
1919
Python implementation. This means you can use it as much or as little as you
2020
want in a project without affecting other code.
2121

22+
## Type Annotations
23+
2224
### Container Types
2325

2426
Each core python type (`set`, `list`, `dict`, `tuple`) has a corresponding

0 commit comments

Comments
 (0)