Skip to content

Commit

Permalink
speed up building docs using autoapi
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrakenhoff committed Sep 26, 2024
1 parent 7573ab8 commit 171ba1a
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4

Expand Down
43 changes: 0 additions & 43 deletions docs/05api/index.rst

This file was deleted.

29 changes: 19 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
# import os
# import sys

project = "TimML"
copyright = "2023, Mark Bakker"
author = "Mark Bakker"

# 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.
# sys.path.insert(0, os.path.abspath("."))

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

extensions = [
"autoapi.extension",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.doctest",
# "sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
Expand All @@ -30,7 +36,7 @@
"sphinxcontrib.bibtex",
]

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

# -- Options for HTML output -------------------------------------------------
Expand Down Expand Up @@ -75,20 +81,23 @@

# -- Autodoc, autosummary, and autosectionlabel settings ------------------------------

autodoc_typehints = "description"
autodoc_typehints_format = "short"

autosummary_generate = True

autoclass_content = "class"

# autosummary_generate = True
# autoclass_content = "class"
autosectionlabel_prefix_document = True

# -- AutoAPI settings -----------------------------------------------------------------
autoapi_dirs = ['../timml']
autoapi_root = '05api'
autodoc_typehints = 'description'
autodoc_typehints_format = "short"

# -- Numpydoc settings ----------------------------------------------------------------

numpydoc_class_members_toctree = True
numpydoc_show_class_members = False

# -- Set intersphinx Directories ------------------------------------------------------

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/devdocs", None),
Expand Down
17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ maintainers = [
{ name = "Mark Bakker", email = "markbak@gmail.com" },
{ name = "Davíd Brakenhoff", email = "d.brakenhoff@artesia-water.nl" },
]
requires-python = ">= 3.7"
requires-python = ">= 3.10"
dependencies = [
"numpy>=1.17",
"scipy>=1.5",
"numba>=0.5",
"matplotlib>=3.1",
"lmfit>=1.0",
"pandas>=1.1",
"numpy",
"scipy",
"numba",
"matplotlib",
"lmfit",
"pandas",
]

keywords = ["hydrology", "groundwater", "model", "analytic element method"]
Expand Down Expand Up @@ -53,12 +53,13 @@ documentation = "http://mbakker7.github.io/timml/docs/builddocs/html/index.html"
ci = ["pytest>=4.6", "pytest-cov", "jupyter>=1.0.0", "coveralls", "shapely", "ruff"]
docs = [
"timml[ci]",
"sphinx>=3.1, <6.0",
"sphinx",
"sphinx-design",
"pydata-sphinx-theme",
"numpydoc",
"myst_nb",
"sphinxcontrib-bibtex",
"sphinx-autoapi",
]

[tool.setuptools]
Expand Down
14 changes: 7 additions & 7 deletions timml/linesink.py
Original file line number Diff line number Diff line change
Expand Up @@ -1179,13 +1179,13 @@ class LineSinkDitchString(HeadLineSinkString):
total discharge of the string
res : scalar (default is 0)
resistance of line-sinks in string
wh : scalar or str
distance over which water enters line-sink
* if 'H': (default) distance is equal to the thickness of the aquifer layer
(when flow comes mainly from one side)
* if '2H': distance is twice the thickness of the aquifer layer
(when flow comes from both sides)
* if scalar: the width of the stream that partially penetrates the aquifer layer
wh : float or str
distance over which water enters line-sink.
* if 'H': (default) distance is equal to the thickness of the aquifer
(when flow comes mainly from one side)
* if '2H': distance is twice the thickness of the aquifer layer
(when flow comes from both sides)
* if scalar: the width of the stream that partially penetrates the aquifer
order : int (default is 0)
polynomial order or inflow along each line-sink in string
layers : scalar, list or array
Expand Down

0 comments on commit 171ba1a

Please sign in to comment.