Skip to content

Commit

Permalink
Handle the new chemiscope sphinx module + fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sofiia-chorna committed Jun 4, 2024
1 parent f34507d commit c3e7aaf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ docs/src/examples/
*egg-info/

.nox/
examples/_chemiscope_sphinx_data
4 changes: 3 additions & 1 deletion developer/get_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
def get_examples():
"""The current list of examples, determined from the directories on disk"""
return [
os.path.basename(os.path.normpath(file)) for file in glob.glob(f"{EXAMPLES}/*")
os.path.basename(os.path.normpath(file))
for file in glob.glob(f"{EXAMPLES}/*")
if os.path.isdir(file) and os.path.basename(file) != "_chemiscope_sphinx_data"
]


Expand Down
2 changes: 2 additions & 0 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os
from datetime import datetime

from chemiscope.sphinx import ChemiscopeScraper


ROOT = os.path.abspath(os.path.join("..", ".."))

# Add any Sphinx extension module names here, as strings.
Expand Down
2 changes: 1 addition & 1 deletion examples/dos-align/README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Optimizing the energy reference of the DOS during training
==============================================
==========================================================

This example illustrates how one can optimize the energy reference of the
DOS during model training. The dataset consists 104 Silicon diamond structures.
Expand Down
3 changes: 2 additions & 1 deletion generate-gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import shutil
import sys

import chemiscope # noqa: F401
import sphinx_gallery.gen_gallery
import chemiscope
from chemiscope.sphinx import ChemiscopeScraper


HERE = os.path.realpath(os.path.dirname(__file__))


Expand Down

0 comments on commit c3e7aaf

Please sign in to comment.