-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Licence years update. * Basic sphinx setup. * Sphinx domains for docstrings. * RTD config file. * RTD Sphinx config location. * sphinxcontrib apidoc * Finished Sphinx domains for docstrings. * RTD mamba. * Single copyright year. * Fix docstring backslash linting. * Revert "Single copyright year." This reverts commit 05e4955. * Rectilinear docstring typo. * CHANGELOG moving and addition. * sphinxcontrib apidoc in setup.cfg. * More accurate docstrings. * README link to docs.
- Loading branch information
1 parent
1aa8052
commit f0e2259
Showing
16 changed files
with
454 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: mambaforge-4.10 | ||
|
||
conda: | ||
environment: requirements/dev.yml | ||
|
||
sphinx: | ||
configuration: docs/src/conf.py | ||
fail_on_warning: false | ||
|
||
python: | ||
install: | ||
- method: setuptools | ||
path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# 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 | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
""" | ||
Configuration file for the Sphinx documentation builder. | ||
Created originally using sphinx-quickstart on 2022-02-21. | ||
""" | ||
|
||
from datetime import datetime | ||
from pathlib import Path | ||
import sys | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here - **using absolute paths**. | ||
|
||
source_code_root = (Path(__file__).parents[2]).absolute() | ||
sys.path.append(str(source_code_root)) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
from esmf_regrid import __version__ as esmf_r_version | ||
|
||
copyright_years = f"2020 - {datetime.now().year}" | ||
|
||
project = "iris-esmf-regrid" | ||
copyright = f"{copyright_years}, SciTools-incubator" | ||
author = "iris-esmf-regrid Contributors" | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = esmf_r_version | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx_copybutton", | ||
"sphinx.ext.extlinks", | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.todo", | ||
"sphinx.ext.viewcode", | ||
"sphinxcontrib.apidoc", | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
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"] | ||
|
||
|
||
# -- 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 = "pydata_sphinx_theme" | ||
|
||
html_theme_options = { | ||
"github_url": "https://github.com/SciTools-incubator/iris-esmf-regrid", | ||
"show_prev_next": False, | ||
"icon_links": [ | ||
{ | ||
"name": "Support", | ||
"url": "https://github.com/SciTools-incubator/iris-esmf-regrid/discussions", | ||
"icon": "fa fa-comments fa-fw", | ||
} | ||
], | ||
} | ||
|
||
|
||
# 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 = ["_static"] | ||
|
||
|
||
# -- api generation configuration --------------------------------------------- | ||
autoclass_content = "both" | ||
autodoc_typehints = "none" | ||
modindex_common_prefix = ["esmf_regrid"] | ||
|
||
|
||
# -- copybutton extension ----------------------------------------------------- | ||
# See https://sphinx-copybutton.readthedocs.io/en/latest/ | ||
copybutton_prompt_text = r">>> |\.\.\. " | ||
copybutton_prompt_is_regexp = True | ||
copybutton_line_continuation_character = "\\" | ||
|
||
|
||
# -- extlinks extension ------------------------------------------------------- | ||
# See https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html | ||
|
||
extlinks = { | ||
"issue": ( | ||
"https://github.com/SciTools-incubator/iris-esmf-regrid/issues/%s", | ||
"Issue #", | ||
), | ||
"pull": ("https://github.com/SciTools-incubator/iris-esmf-regrid/pull/%s", "PR #"), | ||
} | ||
|
||
|
||
# -- intersphinx extension ---------------------------------------------------- | ||
# See https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html | ||
intersphinx_mapping = { | ||
"iris": ("https://scitools-iris.readthedocs.io/en/latest/", None), | ||
"cartopy": ("https://scitools.org.uk/cartopy/docs/latest/", None), | ||
"numpy": ("https://numpy.org/doc/stable/", None), | ||
"python": ("https://docs.python.org/3/", None), | ||
"scipy": ("https://docs.scipy.org/doc/scipy/", None), | ||
"ESMF": ("https://earthsystemmodeling.org/esmpy_doc/release/latest/html/", None), | ||
} | ||
|
||
|
||
# -- todo_ extension ---------------------------------------------------------- | ||
# See https://www.sphinx-doc.org/en/master/usage/extensions/todo.html | ||
todo_include_todos = True | ||
|
||
|
||
# -- apidoc extension --------------------------------------------------------- | ||
# See https://github.com/sphinx-contrib/apidoc | ||
module_dir = source_code_root / "esmf_regrid" | ||
|
||
apidoc_module_dir = str(module_dir) | ||
apidoc_output_dir = str(Path(__file__).parent / "_api_generated") | ||
apidoc_excluded_paths = [str(module_dir / "tests")] | ||
apidoc_separate_modules = True | ||
apidoc_extra_args = ["-H", "API"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
iris-esmf-regrid | ||
================ | ||
|
||
A collection of structured and unstructured ESMF_ regridding schemes for Iris_. | ||
|
||
This rendered documentation is so far limited to iris-esmf-regrid's API. Some | ||
basic examples and change logs can be found on GitHub_. | ||
|
||
:doc:`Click to view the API<_api_generated/modules>` | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
_api_generated/modules | ||
|
||
.. _Iris: https://github.com/SciTools/iris | ||
.. _ESMF: https://github.com/esmf-org/esmf | ||
.. _GitHub: https://github.com/SciTools-incubator/iris-esmf-regrid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.