Skip to content

Commit

Permalink
Simplify autodoc derectives
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Roberts committed Mar 31, 2024
1 parent 384e2fe commit bcfe045
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

primary_domain = 'mat'
matlab_src_dir = '../toolbox'
matlab_keep_package_prefix = False
matlab_auto_link = 'basic'

autodoc_default_options = {
Expand Down
7 changes: 1 addition & 6 deletions docs/generate_problem_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
stream.write(f'''
{problem_name}
================================================================================
.. automodule:: +otp.{problem.parent.name}
.. module:: +otp.{problem.parent.name}
.. autoclass:: {problem.stem}
:members:
Expand All @@ -28,10 +28,5 @@
Presets
--------------------------------------------------------------------------------
.. automodule:: +otp.{problem.parent.name}.+presets
''')

for preset in sorted(problem.parent.glob('+presets/*.m')):
stream.write(f'''
.. autoclass:: {preset.stem}
:members:
''')
3 changes: 1 addition & 2 deletions docs/structure/parameters.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Parameters
================================================================================

.. automodule:: +otp
.. autoclass:: Parameters
.. autoclass:: +otp.Parameters
:members:
3 changes: 1 addition & 2 deletions docs/structure/problem.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Problem
================================================================================

.. automodule:: +otp
.. autoclass:: Problem
.. autoclass:: +otp.Problem
:members:
3 changes: 1 addition & 2 deletions docs/structure/rhs.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
RHS
================================================================================

.. automodule:: +otp
.. autoclass:: RHS
.. autoclass:: +otp.RHS
:members:

0 comments on commit bcfe045

Please sign in to comment.