-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from umcu/add-docstrings
Add docstrings
- Loading branch information
Showing
39 changed files
with
2,069 additions
and
394 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,7 @@ instance/ | |
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/source/api/clinlp/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
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,12 @@ | ||
version: 2 | ||
|
||
build: | ||
os: "ubuntu-lts-latest" | ||
tools: | ||
python: "3.12" | ||
commands: | ||
- pip install poetry | ||
- poetry config virtualenvs.create false | ||
- poetry install --without dev --with docs | ||
- make build-docs | ||
- cp -r docs/_build _readthedocs |
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,8 @@ | ||
{%- if show_headings %} | ||
{{- [basename, "module"] | join(' ') | e | heading }} | ||
|
||
{% endif -%} | ||
.. automodule:: {{ qualname }} | ||
{%- for option in automodule_options %} | ||
:{{ option }}: | ||
{%- endfor %} |
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,45 @@ | ||
{%- macro automodule(modname, options) -%} | ||
.. automodule:: {{ modname }} | ||
{%- for option in options %} | ||
:{{ option }}: | ||
{%- endfor %} | ||
{%- endmacro %} | ||
|
||
{%- macro toctree(docnames) -%} | ||
.. toctree:: | ||
:maxdepth: {{ maxdepth }} | ||
{% for docname in docnames %} | ||
{{ docname }} | ||
{%- endfor %} | ||
{%- endmacro %} | ||
|
||
{%- if is_namespace %} | ||
{{- [pkgname] | join(" ") | e | heading }} | ||
{% else %} | ||
{{- [pkgname] | join(" ") | e | heading }} | ||
{% endif %} | ||
|
||
{%- if is_namespace %} | ||
.. py:module:: {{ pkgname }} | ||
{% endif %} | ||
|
||
{%- if modulefirst and not is_namespace %} | ||
{{ automodule(pkgname, automodule_options) }} | ||
{% endif %} | ||
|
||
{%- if subpackages %} | ||
{{ toctree(subpackages) }} | ||
{% endif %} | ||
|
||
{%- if submodules %} | ||
{% if separatemodules %} | ||
{{ toctree(submodules) }} | ||
{% else %} | ||
{%- for submodule in submodules %} | ||
{% if show_headings %} | ||
{{- [submodule] | join(" ") | e | heading(2) }} | ||
{% endif %} | ||
{{ automodule(submodule, automodule_options) }} | ||
{% endfor %} | ||
{%- endif %} | ||
{%- endif %} |
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,7 @@ | ||
{{ header | heading }} | ||
|
||
.. toctree:: | ||
:maxdepth: {{ maxdepth }} | ||
{% for docname in docnames %} | ||
{{ docname }} | ||
{%- endfor %} |
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,51 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
import datetime | ||
import sys | ||
from pathlib import Path | ||
|
||
import toml | ||
|
||
sys.path.append(Path(__file__).parent) | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
toml_config = toml.load("../pyproject.toml") | ||
|
||
project = toml_config["tool"]["poetry"]["name"] | ||
release = toml_config["tool"]["poetry"]["version"] | ||
|
||
copyright = f"{datetime.datetime.now().year}, clinlp" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "myst_parser"] | ||
|
||
source_suffix = { | ||
".rst": "restructuredtext", | ||
".md": "markdown", | ||
} | ||
|
||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
autodoc_default_options = { | ||
"member-order": "bysource", | ||
"special-members": "__call__", | ||
"ignore-module-all": True, | ||
} | ||
|
||
myst_heading_anchors = 3 | ||
|
||
napoleon_include_init_with_doc = True | ||
napoleon_use_rtype = False | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = "furo" |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Qualifier operational definitions | ||
|
||
It's useful to have some operational definitions of a qualifier/context, i.e. what we mean exactly when we talk about negations, hypothetical situations, etc. For now the framework we use can be found here: [qualifiers.docx](qualifiers.docx). This information will be incorporated in a separate documentation page in the near future. | ||
It's useful to have some operational definitions of a qualifier/context, i.e. what we mean exactly when we talk about negations, hypothetical situations, etc. For now the framework we use can be found here: [qualifiers.docx](qualifiers.docx). This information will be incorporated in a separate documentation page in the near future. |
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,9 @@ | ||
API | ||
=== | ||
|
||
This page contains the automatically generated ``API`` for ``clinlp``. | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
clinlp/clinlp |
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,19 @@ | ||
# clinlp documentation | ||
|
||
Welcome to the documentation pages for `clinlp`. | ||
|
||
```{toctree} | ||
:caption: Search & index | ||
:hidden: | ||
General index <genindex> | ||
Module index <modindex> | ||
``` | ||
|
||
```{toctree} | ||
:caption: Development | ||
:hidden: | ||
API <api/api> | ||
``` |
Oops, something went wrong.