Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ cmake-build-debug/
.cache/
.DS_Store
.venv/
doc/source/api/generated/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this where the api doc is generated? I thought it would be in a separate build directory as before.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the rst files generated by toctree are, this is different from the generated HTML which is in build. So this is the conventional way to do this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we call it api/.generated/ then?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not, because this is the public link to the page (e.g. api/generated/stormpy.logic.BinaryPathFormula.html)

9 changes: 9 additions & 0 deletions doc/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ objname | escape | underline }}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:undoc-members:
:inherited-members:
:show-inheritance:
5 changes: 5 additions & 0 deletions doc/source/_templates/autosummary/function.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ objname | escape | underline }}

.. currentmodule:: {{ module }}

.. auto{{ objtype }}:: {{ objname }}
58 changes: 58 additions & 0 deletions doc/source/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{#- Only list the members that belong to this module (see filter_api_members in conf.py) -#}
{%- set attributes = filter_api_members(fullname, attributes) -%}
{%- set functions = filter_api_members(fullname, functions) -%}
{%- set classes = filter_api_members(fullname, classes) -%}
{%- set exceptions = filter_api_members(fullname, exceptions) -%}
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}

{% block attributes %}
{%- if attributes %}
.. rubric:: {{ _('Module Attributes') }}

.. autosummary::
:toctree:
{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{%- endblock %}

{%- block functions %}
{%- if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:toctree:
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{%- endblock %}

{%- block classes %}
{%- if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:toctree:
:template: autosummary/class.rst
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{%- endblock %}

{%- block exceptions %}
{%- if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
:toctree:
:template: autosummary/class.rst
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{%- endblock %}
48 changes: 30 additions & 18 deletions doc/source/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,36 @@

Work in progress!

:::{toctree}
:maxdepth: 2
:caption: Stormpy modules:
```{eval-rst}
.. autosummary::
:toctree: api/generated
:template: autosummary/module.rst
:caption: Stormpy modules:

api/core
api/info
api/exceptions
api/logic
api/storage
api/utility
stormpy
stormpy.storage
stormpy.logic
stormpy.dft
stormpy.gspn
stormpy.pars
stormpy.pomdp
stormpy.info
stormpy.exceptions
stormpy.utility
```

api/dft
api/gspn
api/pars
api/pomdp
```{eval-rst}
.. autosummary::
:toctree: api/generated
:template: autosummary/module.rst
:caption: Pycarl modules:

api/pycarl/core
api/pycarl/convert
api/pycarl/formula
api/pycarl/parse
:::
stormpy.pycarl
stormpy.pycarl.gmp
stormpy.pycarl.cln
stormpy.pycarl.formula
stormpy.pycarl.gmp.formula
stormpy.pycarl.cln.formula
stormpy.pycarl.parse
stormpy.pycarl.convert
```
8 changes: 0 additions & 8 deletions doc/source/api/core.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/source/api/dft.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/source/api/exceptions.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/source/api/gspn.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/source/api/info.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/source/api/logic.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/source/api/pars.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/source/api/pomdp.rst

This file was deleted.

12 changes: 0 additions & 12 deletions doc/source/api/pycarl/convert.rst

This file was deleted.

30 changes: 0 additions & 30 deletions doc/source/api/pycarl/core.rst

This file was deleted.

30 changes: 0 additions & 30 deletions doc/source/api/pycarl/formula.rst

This file was deleted.

30 changes: 0 additions & 30 deletions doc/source/api/pycarl/parse.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/source/api/storage.rst

This file was deleted.

8 changes: 0 additions & 8 deletions doc/source/api/utility.rst

This file was deleted.

Loading
Loading