diff --git a/docs/_autoapi_templates/python/class.rst b/docs/_autoapi_templates/python/class.rst deleted file mode 100644 index 5fa91e1d03..0000000000 --- a/docs/_autoapi_templates/python/class.rst +++ /dev/null @@ -1,96 +0,0 @@ -{# Adapted from sphinx-autoapi https://github.com/readthedocs/sphinx-autoapi #} -{% if obj.display %} - {% if is_own_page %} -{{ obj.id }} -{{ "=" * obj.id | length }} - {% endif %} - {% set visible_children = obj.children|selectattr("display")|list %} - {% set own_page_children = visible_children|selectattr("type", "in", own_page_types)|list %} - {% if is_own_page and own_page_children %} -.. toctree:: - :hidden: - {% for child in own_page_children %} - {{ child.include_path }} - {% endfor %} - {% endif %} -.. py:{{ obj.type }}:: {% if is_own_page %}{{ obj.id }}{% else %}{{ obj.short_name }}{% endif %}{% if obj.args %}({{ obj.args }}){% endif %} - - {% for (args, return_annotation) in obj.overloads %} - {{ " " * (obj.type | length) }} {{ obj.short_name }}{% if args %}({{ args }}){% endif %} - - {% endfor %} - {% if obj.bases %} - {% if "show-inheritance" in autoapi_options %} - - Bases: {% for base in obj.bases %}{{ base|link_objs }}{% if not loop.last %}, {% endif %}{% endfor %} - {% endif %} - {% if "show-inheritance-diagram" in autoapi_options and obj.bases != ["object"] %} - .. autoapi-inheritance-diagram:: {{ obj.obj["full_name"] }} - :parts: 1 - {% if "private-members" in autoapi_options %} - :private-bases: - {% endif %} - - {% endif %} - {% endif %} - {% if obj.docstring %} - {{ obj.docstring|indent(3) }} - {% endif %} - {% for obj_item in visible_children %} - {% if obj_item.type not in own_page_types %} -{{ obj_item.render()|indent(3) }} - {% endif %} - {% endfor %} - {% if is_own_page and own_page_children %} - {% set visible_methods = visible_children|selectattr("type", "equalto", "method")|list %} - {% if visible_methods %} -Methods -------- - -.. autoapisummary:: - - {% for method in visible_methods %} - {{ method.id }} - {% endfor %} - - - {% endif %} - {% set visible_attributes = visible_children|selectattr("type", "equalto", "attribute")|list %} - {% if visible_attributes %} -Attributes ----------- - -.. autoapisummary:: - - {% for attribute in visible_attributes %} - {{ attribute.id }} - {% endfor %} - - - {% endif %} - {% set visible_exceptions = own_page_children|selectattr("type", "equalto", "exception")|list %} - {% if visible_exceptions %} -Exceptions ----------- - -.. autoapisummary:: - - {% for exception in visible_exceptions %} - {{ exception.id }} - {% endfor %} - - - {% endif %} - {% set visible_classes = own_page_children|selectattr("type", "equalto", "class")|list %} - {% if visible_classes %} -Classes -------- - -.. autoapisummary:: - - {% for klass in visible_classes %} - {{ klass.id }} - {% endfor %} - {% endif %} - {% endif %} -{% endif %} diff --git a/docs/_autoapi_templates/python/module.rst b/docs/_autoapi_templates/python/module.rst deleted file mode 100644 index 659cfa6384..0000000000 --- a/docs/_autoapi_templates/python/module.rst +++ /dev/null @@ -1,152 +0,0 @@ -{# Adapted from sphinx-autoapi https://github.com/readthedocs/sphinx-autoapi #} -{% if obj.display %} - {% if is_own_page %} -{{ obj.id }} -{{ "=" * obj.id|length }} - -.. py:module:: {{ obj.name }} - - {% if obj.docstring %} -.. autoapi-nested-parse:: - - {{ obj.docstring|indent(3) }} - - {% endif %} - - {% block content %} - {% set visible_children = obj.children|selectattr("display")|list %} - {% if visible_children %} - {% set visible_classes = visible_children|selectattr("type", "equalto", "class")|list %} - {% if visible_classes %} - {% if "class" in own_page_types or "show-module-summary" in autoapi_options %} -Classes -------- - - {% if "class" in own_page_types %} -.. toctree:: - :hidden: - :caption: Classes - - {% for klass in visible_classes %} - {{ klass.include_path }} - {% endfor %} - - {% endif %} -.. autoapisummary:: - - {% for klass in visible_classes %} - {{ klass.id }} - {% endfor %} - {% endif %} - - - {% endif %} - {% set visible_exceptions = visible_children|selectattr("type", "equalto", "exception")|list %} - {% if visible_exceptions %} - {% if "exception" in own_page_types or "show-module-summary" in autoapi_options %} -Exceptions ----------- - - {% if "exception" in own_page_types %} -.. toctree:: - :hidden: - - {% for exception in visible_exceptions %} - {{ exception.include_path }} - {% endfor %} - - {% endif %} -.. autoapisummary:: - - {% for exception in visible_exceptions %} - {{ exception.id }} - {% endfor %} - {% endif %} - - - {% endif %} - {% set visible_attributes = visible_children|selectattr("type", "equalto", "data")|list %} - {% if visible_attributes %} - {% if "attribute" in own_page_types or "show-module-summary" in autoapi_options %} -Attributes ----------- - - {% if "attribute" in own_page_types %} -.. toctree:: - :hidden: - - {% for attribute in visible_attributes %} - {{ attribute.include_path }} - {% endfor %} - - {% endif %} -.. autoapisummary:: - - {% for attribute in visible_attributes %} - {{ attribute.id }} - {% endfor %} - {% endif %} - - - {% endif %} - {% set visible_functions = visible_children|selectattr("type", "equalto", "function")|list %} - {% if visible_functions %} - {% if "function" in own_page_types or "show-module-summary" in autoapi_options %} -Functions ---------- - - {% if "function" in own_page_types %} -.. toctree:: - :hidden: - - {% for function in visible_functions %} - {{ function.include_path }} - {% endfor %} - - {% endif %} -.. autoapisummary:: - - {% for function in visible_functions %} - {{ function.id }} - {% endfor %} - {% endif %} - - - {% endif %} - {% set visible_subpackages = obj.subpackages|selectattr("display")|list %} - {% set visible_submodules = obj.submodules|selectattr("display")|list %} - {% set visible_submodules = (visible_subpackages + visible_submodules)|sort %} - {% if visible_submodules %} -.. toctree:: - :caption: Submodules - :maxdepth: 1 - - {% for submodule in visible_submodules %} - {{ submodule.include_path }} - {% endfor %} - {% endif %} - {% set this_page_children = visible_children|rejectattr("type", "in", own_page_types)|list %} - {% if this_page_children %} -{{ obj.type|title }} Contents -{{ "-" * obj.type|length }}--------- - - {% for obj_item in this_page_children %} -{{ obj_item.render()|indent(0) }} - {% endfor %} - {% endif %} - {% endif %} - {% endblock %} - {% else %} -.. py:module:: {{ obj.name }} - - {% if obj.docstring %} - .. autoapi-nested-parse:: - - {{ obj.docstring|indent(6) }} - - {% endif %} - {% for obj_item in visible_children %} - {{ obj_item.render()|indent(3) }} - {% endfor %} - {% endif %} -{% endif %} diff --git a/docs/conf.py b/docs/conf.py index debbc39b15..6d044def40 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -116,7 +116,6 @@ # directories to ignore when looking for source files. exclude_patterns = [ "_build", - "_autoapi_templates", "jupyter_execute", "**.ipynb_checkpoints", "user_guide/examples_v3", @@ -544,5 +543,4 @@ def linkcode_resolve(domain, info): ] autoapi_member_order = "bysource" autodoc_typehints = "none" -autoapi_template_dir = "_autoapi_templates" autoapi_own_page_level = "class" diff --git a/docs/getting_started/tutorial_quickstart.md b/docs/getting_started/tutorial_quickstart.md index 30cbe082b2..b843ea9df5 100644 --- a/docs/getting_started/tutorial_quickstart.md +++ b/docs/getting_started/tutorial_quickstart.md @@ -42,7 +42,7 @@ As we can see, the reanalysis dataset contains eastward velocity `uo`, northward (`thetao`) and salinity (`so`) fields. These hydrodynamic fields need to be stored in a {py:obj}`parcels.FieldSet` object. Parcels provides tooling to parse many types -of models or observations into such a `parcels.FieldSet` object. Here, we use {py:obj}`FieldSet.from_copernicusmarine()`, which +of models or observations into such a `parcels.FieldSet` object. Here, we use {py:func}`parcels.FieldSet.from_copernicusmarine()`, which recognizes the standard names of a velocity field: ```{code-cell}