Skip to content

Commit

Permalink
Battling class attributes documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
andykee committed Nov 27, 2023
1 parent e368922 commit 7d5faa0
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 299 deletions.
18 changes: 15 additions & 3 deletions docs/_static/css/lentil.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

:root {
--pst-color-secondary: #5E81AC; /* nord blue */

--sd-color-secondary: #e83e8c;
}

Expand All @@ -10,17 +11,28 @@ body {
}

pre, code {
font-family: 'IBM Plex Mono', monospace;
font-family: 'SFMono-Regular', 'Menlo', 'IBM Plex Mono', monospace;
font-size: 90%;
line-height: 150%;
--pst-color-inline-code-links: #5E81AC; /* nord blue */
--pst-color-inline-code: #e83e8c;
}

code.literal {
background-color: transparent;
border: 0px;
font-size: 95%;
font-weight: bold;
padding: 0;
font-size: 94%;
}

a:hover code{
color: #ee9040;
text-decoration: underline;
text-decoration-thickness: 1px;
}

.sig-name {
--pst-color-inline-code: #5E81AC;
}

pre {
Expand Down
13 changes: 0 additions & 13 deletions docs/_templates/autosummary/attribute.rst

This file was deleted.

17 changes: 0 additions & 17 deletions docs/_templates/autosummary/base.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
{% if attributes %}
.. HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
.. autosummary::
:toctree:
{% for item in all_attributes %}
{%- if not item.startswith('_') %}
{{ name }}.{{ item }}
Expand Down
32 changes: 0 additions & 32 deletions docs/_templates/autosummary/class2.rst

This file was deleted.

13 changes: 0 additions & 13 deletions docs/_templates/autosummary/member.rst

This file was deleted.

13 changes: 0 additions & 13 deletions docs/_templates/autosummary/method.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/_templates/autosummary/module.rst

This file was deleted.

18 changes: 15 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
'sphinx_remove_toctrees',
'sphinx_copybutton',
'sphinx_design',
'matplotlib.sphinxext.plot_directive']
'matplotlib.sphinxext.plot_directive',
'numpydoc']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'docs'
Expand Down Expand Up @@ -99,8 +100,9 @@
add_module_names = True

autodoc_default_options = {
'member-order': 'alphabetical',
'exclude-members': '__init__, __weakref__, __dict__, __module__'
'member-order': 'bysource',
'undoc-members': None
# 'exclude-members': '__init__, __weakref__, __dict__, __module__'
}

autosummary_generate = True
Expand Down Expand Up @@ -139,3 +141,13 @@
import numpy as np
np.random.seed(12345)
"""




#def fix_attributes(app, pagename, templatename, context, doctree):
# if 'generated' in pagename:
# context['body'] = context['body'].replace('Variables', 'Attributes')

#def setup(app):
# app.connect("html-page-context", fix_attributes)
Loading

0 comments on commit 7d5faa0

Please sign in to comment.