-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aba2d9d
commit ffc6853
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Convert examples | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
convert_examples: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Checkout repository content" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Set up Python 3.x" | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.10 | ||
|
||
- name: "Install Linux system dependencies" | ||
run: | | ||
sudo apt-get update | ||
- name: "Install Python dependencies" | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install sphinx sphinx-gallery | ||
- name: "Convert to notebooks" | ||
run: | | ||
# mkdir pynest/notebooks | ||
sphx_glr_python_to_jupyter.py $(find copies/examples/ -iname "*.py") | ||
# mv pynest/examples/* pynest/notebooks | ||
grep -rl '"display_name": "Python 3"' pynest/notebooks | xargs sed -i 's/"display_name": "Python 3"/"display_name": "EBRAINS-23.09"/g' | ||
grep -rl '"name": "python3"' pynest/notebooks | xargs sed -i 's/"name": "python3"/"name": "ebrains-23.09"/g' | ||