bump (#80)
* bump Signed-off-by: Jess Frazelle <github@jessfraz.com> * some fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * YOYO NEW API SPEC! * reformat Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * for now force true Signed-off-by: Jess Frazelle <github@jessfraz.com> * run the tests on generations Signed-off-by: Jess Frazelle <github@jessfraz.com> * add tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * update Signed-off-by: Jess Frazelle <github@jessfraz.com> * update Signed-off-by: Jess Frazelle <github@jessfraz.com> * update Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * update Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix some types Signed-off-by: Jess Frazelle <github@jessfraz.com> * float to top Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix mypy Signed-off-by: Jess Frazelle <github@jessfraz.com> * more noqa Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * ruff pass Signed-off-by: Jess Frazelle <github@jessfraz.com> * add docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * even less mypy errors Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * add test Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * new path Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes for mypy Signed-off-by: Jess Frazelle <github@jessfraz.com> * skip tests Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
126
docs/conf.py
126
docs/conf.py
@ -4,36 +4,39 @@
|
||||
# list see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
import datetime
|
||||
import os
|
||||
import pathlib
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
import toml
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
# Get the version from the pyproject file.
|
||||
|
||||
ROOT = pathlib.Path(__file__).parent.parent
|
||||
PACKAGE_SRC = ROOT / "kittycad"
|
||||
|
||||
sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.append(os.path.abspath('../kittycad'))
|
||||
|
||||
sys.path.append(os.path.abspath("../kittycad"))
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'kittycad'
|
||||
author = 'KittyCAD Team Members'
|
||||
copyright = author
|
||||
project = "kittycad"
|
||||
author = "KittyCAD Team Members"
|
||||
year = datetime.date.today().year
|
||||
copyright = str(year) + ", " + author
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
# Get the version from the poetry file.
|
||||
import toml
|
||||
|
||||
with open(os.path.abspath('../pyproject.toml'), 'r') as f:
|
||||
with open(os.path.abspath("../pyproject.toml"), "r") as f:
|
||||
parsed_toml = toml.load(f)
|
||||
version = parsed_toml['tool']['poetry']['version']
|
||||
version = 'v'+version
|
||||
version = parsed_toml["tool"]["poetry"]["version"]
|
||||
version = "v" + version
|
||||
|
||||
|
||||
release = version
|
||||
language = "en"
|
||||
default_role = "any"
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
@ -42,25 +45,34 @@ release = version
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx_autodoc_typehints',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.linkcode',
|
||||
'sphinx_automodapi.automodapi',
|
||||
'sphinx_rtd_theme'
|
||||
"autoclasstoc",
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.autosectionlabel",
|
||||
"sphinx.ext.autosummary",
|
||||
"sphinx.ext.coverage",
|
||||
"sphinx.ext.doctest",
|
||||
"sphinx.ext.graphviz",
|
||||
"sphinx.ext.imgconverter",
|
||||
"sphinx.ext.intersphinx",
|
||||
"sphinx.ext.linkcode",
|
||||
"sphinx.ext.mathjax",
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinx.ext.viewcode",
|
||||
"sphinx_autodoc_typehints",
|
||||
"sphinx_rtd_theme",
|
||||
"sphinx_copybutton",
|
||||
"sphinxext.opengraph",
|
||||
]
|
||||
|
||||
numpydoc_show_class_members = False
|
||||
|
||||
automodapi_inheritance_diagram = False
|
||||
|
||||
# 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 -------------------------------------------------
|
||||
@ -68,35 +80,61 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = [
|
||||
]
|
||||
html_theme_path: List[str] = []
|
||||
|
||||
# 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,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = []
|
||||
html_static_path: List[str] = []
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'trac'
|
||||
pygments_style = "trac"
|
||||
|
||||
# pygments_style = "lovelace"
|
||||
# pygments_dark_style = "one-dark"
|
||||
|
||||
# -- autodoc --
|
||||
|
||||
autodoc_default_options = {
|
||||
"members": True,
|
||||
"special-members": True,
|
||||
"private-members": True,
|
||||
"inherited-members": True,
|
||||
"undoc-members": True,
|
||||
"exclude-members": "__weakref__",
|
||||
}
|
||||
|
||||
autodoc_inherit_docstrings = True
|
||||
|
||||
# -- autosummary --
|
||||
|
||||
autosummary_generate = True
|
||||
autoclass_content = "both"
|
||||
html_show_sourcelink = False
|
||||
set_type_checking_flag = True
|
||||
|
||||
# -- autosectionlabel --
|
||||
|
||||
autosectionlabel_prefix_document = True
|
||||
|
||||
# -- intersphinx --
|
||||
|
||||
# Intersphinx configuration.
|
||||
# FROM: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#module-sphinx.ext.intersphinx
|
||||
intersphinx_mapping = {
|
||||
'python': ('https://python.readthedocs.io/en/latest/', None),
|
||||
"python": ("https://docs.python.org/3", None),
|
||||
}
|
||||
|
||||
# This is a function linkcode_resolve(domain, info), which should return the URL
|
||||
# to source code corresponding to the object in given domain with given information.
|
||||
# FROM: https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html
|
||||
def linkcode_resolve(domain, info):
|
||||
if domain != 'py':
|
||||
if domain != "py":
|
||||
return None
|
||||
if not info['module']:
|
||||
if not info["module"]:
|
||||
return None
|
||||
filename = info['module'].replace('.', '/')
|
||||
filename = info["module"].replace(".", "/")
|
||||
return "https://github.com/kittycad/kittycad.py/%s.py" % filename
|
||||
|
||||
|
||||
@ -104,10 +142,10 @@ def linkcode_resolve(domain, info):
|
||||
try:
|
||||
import enchant # noqa # pylint: disable=unused-import
|
||||
except ImportError as ex:
|
||||
print("enchant module import failed:\n"
|
||||
"{0}\n"
|
||||
"Spell checking disabled.".format(ex),
|
||||
file=sys.stderr)
|
||||
print(
|
||||
"enchant module import failed:\n" "{0}\n" "Spell checking disabled.".format(ex),
|
||||
file=sys.stderr,
|
||||
)
|
||||
else:
|
||||
extensions.append('sphinxcontrib.spelling')
|
||||
extensions.append("sphinxcontrib.spelling")
|
||||
spelling_show_suggestions = True
|
||||
|
||||
Reference in New Issue
Block a user