Skip to content

Commit 2cc6325

Browse files
committed
Add minimal docs, RTD configuration
1 parent 074da24 commit 2cc6325

8 files changed

+80
-1
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ instance/
7070
.scrapy
7171

7272
# Sphinx documentation
73-
docs/_build/
73+
doc/_build/
7474

7575
# PyBuilder
7676
target/

.readthedocs.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3"
7+
8+
python:
9+
install:
10+
- method: pip
11+
path: .
12+
extras: docs

doc/Makefile

+20
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, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
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)

doc/_static/css/custom.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.navbar-brand .logo__image {
2+
max-width: 70%;
3+
}

doc/_static/logo.png

1.67 KB
Loading

doc/conf.py

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
8+
project = "TDC tools"
9+
copyright = "2023, Transport Data Commons Initiative"
10+
author = "Transport Data Commons Initiative"
11+
12+
# -- General configuration -------------------------------------------------------------
13+
14+
extensions = []
15+
16+
templates_path = ["_templates"]
17+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
18+
19+
# -- Options for HTML output -----------------------------------------------------------
20+
21+
html_theme = "sphinx_book_theme"
22+
html_static_path = ["_static"]
23+
html_logo = "_static/logo.png"
24+
25+
html_theme_options = {"logo": {"text": project}}
26+
27+
html_css_files = ["css/custom.css"]

doc/index.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Transport Data Commons tools
2+
****************************
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
:caption: Contents:
7+
8+
Indices and tables
9+
==================
10+
11+
* :ref:`genindex`
12+
* :ref:`modindex`
13+
* :ref:`search`

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ dependencies = [
3131
]
3232

3333
[project.optional-dependencies]
34+
docs = [
35+
"Sphinx",
36+
"sphinx-book-theme",
37+
]
3438
tests = [
3539
"pytest",
3640
"pytest-cov",

0 commit comments

Comments
 (0)