Skip to content

Commit e32b38c

Browse files
committed
feat: Rearrange docs
1 parent 061cd64 commit e32b38c

File tree

6 files changed

+53
-1538
lines changed

6 files changed

+53
-1538
lines changed

docs/source/conf.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@
2020
# -----------------------------------------------------------------------------
2121

2222
# Copy the example notebook into the docs source
23-
shutil.copyfile('../../notebooks/example_notebook.ipynb', 'howtouse.ipynb')
23+
shutil.copyfile('../../notebooks/example_notebook.ipynb', 'userguide/howtouse.ipynb')
2424

2525
# Open file
26-
with open('howtouse.ipynb') as f:
26+
with open('userguide/howtouse.ipynb') as f:
2727
old_text = f.read()
2828

2929
# change %matplotlib to inline
3030
new_text = old_text.replace('%matplotlib tk', r'%matplotlib inline')
3131

3232
# change directory so that paths still work
33-
new_text = new_text.replace('../tests/data/', r'../../tests/data/')
33+
new_text = new_text.replace('../tests/data/', r'../../../tests/data/')
3434

3535
# Change title to 'How to use'
3636
new_text = new_text.replace('DefDAP Example notebook', r'How to use')
3737
new_text = new_text.replace('This notebook', r'These pages')
3838

3939
# Write back to notebook
40-
with open('howtouse.ipynb', "w") as f:
40+
with open('userguide/howtouse.ipynb', "w") as f:
4141
f.write(new_text)
4242

4343
nbsphinx_allow_errors = True
@@ -58,7 +58,7 @@
5858
# -----------------------------------------------------------------------------
5959

6060
project = 'DefDAP'
61-
copyright = '2023, Mechanics of Microstructures Group at The University of Manchester'
61+
copyright = '2026, Mechanics of Microstructures Group at The University of Manchester'
6262
author = 'Michael D. Atkinson, Rhys Thomas, João Quinta da Fonseca'
6363

6464
def get_version():
@@ -94,7 +94,8 @@ def get_version():
9494
'sphinx.ext.autosummary',
9595
'sphinx_autodoc_typehints',
9696
'pydata_sphinx_theme',
97-
'nbsphinx'
97+
'nbsphinx',
98+
'sphinx_design'
9899
]
99100

100101
napoleon_use_param = True
@@ -178,6 +179,7 @@ def get_version():
178179
autodoc_member_order = 'bysource'
179180
autodoc_default_options = {
180181
'inherited-members': True,
182+
'exclude_patterns': ['*base*'],
181183
}
182184

183185
# -----------------------------------------------------------------------------
@@ -188,6 +190,7 @@ def get_version():
188190
{
189191
'path': '../../defdap',
190192
'destination': 'defdap',
193+
'exclude_patterns': ['*base*'],
191194
'separate_modules': True,
192195
'module_first': False,
193196
'automodule_options': {'members', 'show-inheritance', 'undoc-members'}

0 commit comments

Comments
 (0)