Skip to content

Add readthedocs support #399

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "3.10"
jobs:
pre_build:
- sphinx-apidoc -fo docs/api typed_python typed_python/*test* typed_python/*/*test*


python:
install:
- requirements: docs/doc_requirements.txt
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -23,8 +23,8 @@ hedge fund in New York. If you're interested in working with us, drop us a line

## Getting started

You can read the [introductory tutorial](docs/introduction.md) for using `typed_python` or
check out the documentation [typed_python](docs/typed_python.md).
You can read the [introductory tutorial](https://github.com/APrioriInvestments/typed_python/docs/introduction.md) for using `typed_python` or
check out the documentation [here](https://typed-python.readthedocs.io/en/latest/).

## Where did this come from?

10 changes: 5 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Minimal makefile for Sphinx documentation


SHELL = /bin/bash
# SHELL = /bin/zsh
.SHELLFLAGS = -O globstar -c # enable globstar operator

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
APIBUILDDIR = api
APIBUILDDIR = api
MODULEDIR = ../typed_python

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help clean apidocs Makefile

apidocs:
@sphinx-apidoc -fo "$(APIBUILDDIR)" "$(MODULEDIR)"
@sphinx-apidoc -fo "$(APIBUILDDIR)" "$(MODULEDIR)" $(MODULEDIR)/**/*test*

clean:
-rm -rf "$(BUILDDIR)"/*
34 changes: 20 additions & 14 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -8,27 +8,33 @@
import os
import sys

project = 'typed_python'
copyright = '2022, Braxton McKee'
author = 'Braxton McKee'
release = '0.2.6'
project = "typed_python"
copyright = "2022, Braxton McKee"
author = "Braxton McKee"
release = "0.2.6"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['myst_parser',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode'
]
extensions = [
"myst_parser",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
source_suffix = {
".rst": "restructuredtext",
".md": "markdown",
}

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_book_theme'
html_static_path = ['_static']
html_theme = "sphinx_book_theme"
html_static_path = ["_static"]

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath(".."))
7 changes: 7 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -7,6 +7,13 @@ typed_python
========================================
Strong typing and an LLVM-based JIT compiler for Python.

.. include:: ../README.md
:parser: myst_parser.sphinx_


Contents
========================================

.. toctree::
:maxdepth: 1
:caption: For Users