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
3030new_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'
3636new_text = new_text .replace ('DefDAP Example notebook' , r'How to use' )
3737new_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
4343nbsphinx_allow_errors = True
5858# -----------------------------------------------------------------------------
5959
6060project = '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'
6262author = 'Michael D. Atkinson, Rhys Thomas, João Quinta da Fonseca'
6363
6464def 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
100101napoleon_use_param = True
@@ -178,6 +179,7 @@ def get_version():
178179autodoc_member_order = 'bysource'
179180autodoc_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