Skip to content

Testing the examples on mybinder.org #19

Testing the examples on mybinder.org

Testing the examples on mybinder.org #19

---
name: Convert examples
on: [push, pull_request]
permissions:
contents: write
jobs:
convert_examples:
runs-on: ubuntu-latest
steps:
- name: "Checkout repository content"
uses: actions/checkout@v4
- name: "Set up Python 3.x"
uses: actions/setup-python@v5
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")
grep -rl '"display_name": "Python 3"' copies/examples | xargs sed -i 's/"display_name": "Python 3"/"display_name": "EBRAINS-23.09"/g'
grep -rl '"name": "python3"' copies/examples | xargs sed -i 's/"name": "python3"/"name": "ebrains-23.09"/g'
git config --global user.name "jessica-mitchell"
git config --global user.email "[email protected]"
git add .
git commit -m "create notebooks"
git push