Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated API reference #570

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
5 changes: 0 additions & 5 deletions docs/_templates/autosummary/base.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/_templates/autosummary/class.rst

This file was deleted.

6 changes: 6 additions & 0 deletions docs/_templates/autosummary/top-level-module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "autosummary/module.rst" %}
{% block title -%}

{{ ("``" ~ fullname ~ "``") | underline('=')}}

{%- endblock %}
43 changes: 41 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import nbsphinx
import nbformat

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


os.environ["SPHINX"] = "True"
Expand Down Expand Up @@ -79,9 +79,10 @@
autodoc_default_options = {
"members": True,
"member-order": "bysource",
"inherited-members": "GufeTokenizable,BaseModel",
"inherited-members": "GufeTokenizable,BaseModel,SettingsBaseModel",
"undoc-members": True,
"special-members": "__call__",
"exclude-members": "get_defaults",
}
toc_object_entries_show_parents = "hide"

Expand All @@ -107,8 +108,45 @@
"openmmtools",
"mdtraj",
"openmmforcefields",
"netCDF4",
"py3Dmol",
]

# API docs settings
autosummary_generate = True
# Document imported items iff they're in __all__
autosummary_imported_members = False
autosummary_ignore_module_all = False
# Autosummary template configuration
autosummary_context = {
# Modules to exclude from API docs
"exclude_modules": [
"openfe.tests",
],
"show_inheritance": True,
"show_inherited_members": False,
"show_undoc_members": True,
}

autodoc_preserve_defaults = True
autodoc_inherit_docstrings = True
autodoc_typehints_format = "short"
# Fold the __init__ or __new__ methods' signature into class documentation
autoclass_content = "both"
autodoc_class_signature = "mixed"
# Workaround for autodoc_typehints_format not working for attributes
# see https://github.com/sphinx-doc/sphinx/issues/10290#issuecomment-1079740009
python_use_unqualified_type_names = True


autodoc_pydantic_model_show_json = False
autodoc_pydantic_model_show_field_summary = False
autodoc_pydantic_model_show_config_member = False
autodoc_pydantic_model_show_config_summary = False
autodoc_pydantic_model_show_validator_members = False
autodoc_pydantic_model_show_validator_summary = False
autodoc_pydantic_field_list_validators = False

# Extensions for the myst parser
myst_enable_extensions = [
"dollarmath",
Expand Down Expand Up @@ -137,6 +175,7 @@
}
],
"accent_color": "DarkGoldenYellow",
"navigation_depth": 8,
}
html_logo = "_static/Squaredcircle.svg"

Expand Down
1 change: 1 addition & 0 deletions docs/cookbook/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The typical way to use the Python API is to load a number of molecules you want
- .. container:: flowchart-sidebyside

- -

.. rst-class:: flowchart-spacer
-

Expand Down
2 changes: 1 addition & 1 deletion docs/cookbook/under_the_hood.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ If you want to implement your own atom mapper or free energy procedure, or you w
-
-
.. rst-class:: arrow-down
- :any:`executors`
- :any:`openfe.orchestration`

- :class:`ProtocolDAGResult`
A completed transformation.
Expand Down
1 change: 1 addition & 0 deletions docs/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies:
- gitpython
- tqdm
- libsass
- cinnabar
- nbsphinx
- nbsphinx-link
- myst-parser
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The **OpenFE** toolkit provides open-source frameworks for calculating alchemica
.. grid-item-card:: Relative Free Energy Protocol
:img-top: _static/Rocket.svg
:text-align: center
:link: reference/api/openmm_rfe
:link: reference/api/generated/openfe.protocols.openmm_rfe
:link-type: doc

Documentation for OpenFE's OpenMM-based Hybrid Topology Relative Free
Expand Down
41 changes: 0 additions & 41 deletions docs/reference/api/alchemical_network_planning.rst

This file was deleted.

13 changes: 0 additions & 13 deletions docs/reference/api/data.rst

This file was deleted.

47 changes: 0 additions & 47 deletions docs/reference/api/defining_and_executing_simulations.rst

This file was deleted.

30 changes: 21 additions & 9 deletions docs/reference/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,24 @@
OpenFE API Reference
====================

.. toctree::
:maxdepth: 2

data
systems_and_components
ligand_network
alchemical_network_planning
defining_and_executing_simulations
openmm_rfe
``openfe``
----------

.. automodule:: openfe
:no-members:
:noindex:

.. rubric:: Modules

.. autosummary::
:nosignatures:
:toctree: generated/
:recursive:
:template: autosummary/top-level-module.rst

setup
orchestration
analysis
protocols
storage
utils
131 changes: 0 additions & 131 deletions docs/reference/api/ligand_network.rst

This file was deleted.

Loading