Skip to content

Commit

Permalink
add TWS notebook example, moved core functionality in dedicated subfo…
Browse files Browse the repository at this point in the history
…lder, wrote a wrapper for TWS conversion, changed API documenation layout
  • Loading branch information
strawpants committed Feb 9, 2024
1 parent ef4c89e commit 8448656
Show file tree
Hide file tree
Showing 37 changed files with 1,202 additions and 207 deletions.
5 changes: 0 additions & 5 deletions docs/source/_templates/module.rst_t

This file was deleted.

19 changes: 18 additions & 1 deletion docs/source/_templates/package.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
{%- endfor %}
{%- endmacro %}

{{- "API Reference" | e | heading }}
{%- if is_namespace %}
{{- [pkgname, "namespace"] | join(" ") | e | heading }}
{% else %}
{{- pkgname | e | heading }}
{% endif %}

{%- if is_namespace %}
.. py:module:: {{ pkgname }}
Expand All @@ -23,11 +27,24 @@
{{ automodule(pkgname, automodule_options) }}
{% endif %}

{{ toctree(subpackages) }}

{%- if submodules %}
{% if separatemodules %}
{{ toctree(submodules) }}
{% else %}
{%- for submodule in submodules %}
{% if show_headings %}
{{- submodule | e | heading(2) }}
{% endif %}
{{ automodule(submodule, automodule_options) }}
{% endfor %}
{%- endif %}
{%- endif %}

{%- if not modulefirst and not is_namespace %}
Module contents
---------------

{{ automodule(pkgname, automodule_options) }}
{% endif %}
8 changes: 0 additions & 8 deletions docs/source/_templates/toc.rst_t

This file was deleted.

7 changes: 7 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Python API Reference
====================

.. toctree::
:maxdepth: 2

references/shxarray.rst
15 changes: 2 additions & 13 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,17 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
from datetime import datetime
import sys
import os

project = 'shxarray'
copyright = str(datetime.now().year)+', Roelof Rietbroek'
author = 'Roelof Rietbroek'

release = 'alpha'

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


#add shxarray to sys path
# sys.path.insert(0, os.path.abspath('../../src'))
extensions = ['nbsphinx', 'sphinxcontrib.apidoc', 'sphinx.ext.autodoc','sphinx.ext.napoleon']
# extensions = [
# 'sphinxcontrib.apidoc',
# 'sphinx.ext.viewcode',
# 'sphinx.ext.githubpages',
# 'sphinxcontrib.autoprogram',
# 'nbsphinx','sphinx.ext.napoleon',
# ]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store','**.ipynb_checkpoints']
Expand All @@ -37,10 +25,11 @@
#figure out the actual installation directory
import shxarray
apidoc_module_dir=os.path.dirname(shxarray.__file__)

apidoc_output_dir = 'references'
apidoc_separate_modules = False
apidoc_module_first=True

apidoc_toc_file=False

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Welcome to shxarray's documentation!
introduction.rst
installation.rst
tutorial.rst
references/shxarray.rst
api.rst

Indices and tables
==================
Expand Down
Loading

0 comments on commit 8448656

Please sign in to comment.