Skip to content

Commit

Permalink
docs: Use furo
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Dec 14, 2021
1 parent ff065b9 commit fd48b46
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 24 deletions.
11 changes: 11 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
build:
os: ubuntu-20.04
tools:
python: "3.9"
python:
install:
- path: .
- requirements: docs/requirements.txt
sphinx:
fail_on_warning: true
41 changes: 19 additions & 22 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
import os
import sys

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath(".."))


# -- Project information -----------------------------------------------------

project = 'OCDS Kingfisher Colab'
copyright = '2019, Open Contracting Partnership'
author = 'Open Contracting Partnership'
project = "OCDS Kingfisher Colab"
copyright = "2019, Open Contracting Partnership"
author = "Open Contracting Partnership"

# The short X.Y version
version = '0.3.6'
version = "0.3.6"
# The full version, including alpha/beta/rc tags
release = version

Expand All @@ -37,26 +37,27 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
"sphinx.ext.autodoc",
"sphinx.ext.extlinks",
'sphinx.ext.viewcode',
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
html_theme = "furo"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -66,22 +67,18 @@

# -- Extension configuration -------------------------------------------------

# Needed for ReadTheDocs (Sphinx 1.8).
master_doc = 'index'

autodoc_default_options = {
'members': None,
"members": None,
"member-order": "bysource",
}
autodoc_typehints = "description"
autodoc_type_aliases = {}

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
}
autodoc_member_order = 'bysource'

extlinks = {
"ipython-sql": (
"https://github.com/catherinedevlin/ipython-sql/blob/b24ac6e9410416eafde86ae22fd8d6f34acbe05d/%s", None),
}

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
furo
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
'psycopg2-binary',
],
'docs': [
'Sphinx',
'furo',
'sphinx',
'sphinx-autobuild',
'sphinx-rtd-theme',
],
},
classifiers=[
Expand Down

0 comments on commit fd48b46

Please sign in to comment.