Skip to content

Commit

Permalink
add run_first script
Browse files Browse the repository at this point in the history
  • Loading branch information
mfschubert committed Jul 11, 2024
1 parent fcd2d0a commit 87d3eb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
pip install ".[tests,dev,docs]"
- name: docs
run: jb build docs
run: |
python docs/run_first.py
jb build docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
8 changes: 8 additions & 0 deletions docs/run_first.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Some dependencies of the gym print the first time they are imported, e.g. the
# `refractiveindex` project. In the docs github workflow, running this script
# before any of the notebooks avoids these print statements showing up in the
# output of the notebooks.
from invrs_gym import challenges as challenges

if __name__ == "__main__":
pass

0 comments on commit 87d3eb7

Please sign in to comment.