Skip to content

Commit

Permalink
Move new plot scripts to advanced
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatteo committed Dec 12, 2024
1 parent cab90ca commit 3275f0a
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 230 deletions.
2 changes: 1 addition & 1 deletion abipy/examples/_make_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from monty.fnmatch import WildCard


def main():
# Find (runnable) scripts.
dirpath = os.path.dirname(os.path.abspath(__file__))
Expand All @@ -26,6 +25,7 @@ def main():
if missing:
raise RuntimeError("The following script do not provide a doc string:\n" + "\n".join(missing))

print(f"{len(missing)=}")
return len(missing)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
Quasi-harmonic approximation
============================
QHA_2D method
=============
This example shows how to use the GSR.nc and PHDOS.nc files computed with different volumes
to compute thermodynamic properties within the quasi-harmonic approximation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
"""
Quasi-harmonic approximation
============================
Quasi-harmonic approximation with v-ZSISA
=========================================
This example shows how to use the GSR.nc and PHDOS.nc files computed with different volumes
to compute thermodynamic properties within the quasi-harmonic approximation.
to compute thermodynamic properties within the v-ZSISA method.
"""
import os
import abipy.data as abidata
Expand Down
5 changes: 4 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
#SPHINXOPTS = -j6
SPHINXOPTS =
#SPHINXBUILD = sphinx-build
SPHINXBUILD = sphinx-build -v
# Verbose mode
#SPHINXBUILD = sphinx-build -v
# Sphinx may treat warnings as errors, halting HTML generation.
SPHINXBUILD = sphinx-build -v -W --keep-going
PAPER =
BUILDDIR = _build

Expand Down
21 changes: 7 additions & 14 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ def load_mod(filepath):
]

# Activate build of sphinx-gallery.
with_gallery = True

if with_gallery:
if with_gallery := True:
print("sphinx-gallery will be built")
extensions.append('sphinx_gallery.gen_gallery')

# Add any Sphinx extension module names here, as strings. They can
Expand All @@ -92,12 +91,6 @@ def load_mod(filepath):
'matplotlib.sphinxext.plot_directive',
]

# Add local extensions (not available on PyPi)
#sys.path.insert(0, os.path.join(ABIPY_ROOT, "docs", "my_extensions"))
#extensions += [
# 'youtube',
#]

#########################
# Spinx Gallery Settings
#########################
Expand Down Expand Up @@ -156,12 +149,12 @@ def load_mod(filepath):
# path to your examples scripts
'examples_dirs': [
"../abipy/examples/plot",
"../abipy/examples/flows",
#"../abipy/examples/flows",
],
# path where to save gallery generated examples
'gallery_dirs': [
"gallery",
"flow_gallery",
#"flow_gallery",
],
'filename_pattern': "(/plot*|/run_*)",
'default_thumb_file': '_static/abipy_logo.png',
Expand All @@ -173,7 +166,7 @@ def load_mod(filepath):
'numpy': 'https://docs.scipy.org/doc/numpy/',
'matplotlib': 'https://matplotlib.org',
'pandas': "http://pandas.pydata.org/pandas-docs/stable/",
"pymatgen": "https://pymatgen.org/",
#"pymatgen": "https://pymatgen.org/",
},
#'image_scrapers': ('matplotlib',),
#'image_scrapers': ('matplotlib', PNGScraper()),
Expand Down Expand Up @@ -441,8 +434,8 @@ def setup(app):
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"pandas": ("http://pandas.pydata.org/pandas-docs/stable/", None),
'matplotlib': ('https://matplotlib.org/stable/', None),
"monty": ("https://pythonhosted.org/monty/", None),
"pymatgen": ("https://pymatgen.org/", None),
#"monty": ("https://pythonhosted.org/monty/", None),
#"pymatgen": ("https://pymatgen.org/", None),
'mayavi': ('http://docs.enthought.com/mayavi/mayavi', None),
}

Expand Down
Loading

0 comments on commit 3275f0a

Please sign in to comment.