Skip to content

Commit

Permalink
Merge pull request #43 from carpentries-incubator/PostTransitionFixes
Browse files Browse the repository at this point in the history
ENH: Post Workbench transition fixes
  • Loading branch information
jhlegarreta authored Feb 18, 2024
2 parents 4c66a22 + a30e9ed commit c6f337b
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 6 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/notebook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test notebooks

on:
push:
paths: ["*.ipynb", "requirements.txt", "notebook.yml"]

jobs:
test-notebooks:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- name: Checkout GitHub repository
uses: actions/checkout@v4

# Run with multiple Python versions.
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# Use a cache for the pip install to avoid reinstalling every time this is run.
- name: Cache pip install
uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ env.pythonLocation }}-
# Install all requirements to run these tests.
- name: Install requirements
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest nbval
# Download the necessary data
- name: Download data
run: |
datalad install
# Run the actual tests of all the Python Notebooks.
- name: Test Notebooks
run: |
pytest --nbval-lax -v code/*ipynb
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ To cite this lesson, please consult with [CITATION](CITATION)
[slack_channel_status]: https://img.shields.io/badge/Slack_Channel-neuroimaging-E01563.svg
[binder_url]: https://mybinder.org/v2/gh/carpentries-incubator/SDC-BIDS-IntroMRI/gh-pages?filepath=code%2F
[binder_svg]: https://mybinder.org/badge_logo.svg
[episode01]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/before-we-start/index.html
[episode02]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/scanner-to-computer/index.html
[episode03]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/anatomy-of-nifti/index.html
[episode04]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/data-organization-bids/index.html
[episode05]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/open-mri-datasets/index.html
[episode06]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/bids-derivatives/index.html
[episode01]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/before-we-start.html
[episode02]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/scanner-to-computer.html
[episode03]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/anatomy-of-nifti.html
[episode04]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/data-organization-bids.html
[episode05]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/open-mri-datasets.html
[episode06]: https://carpentries-incubator.github.io/SDC-BIDS-IntroMRI/bids-derivatives.html
[lesson-example]: https://carpentries.github.io/lesson-example
[link_issues]: https://github.com/conp-pcno-training/SDC-BIDS-IntroMRI/issues
[michael_joseph]: https://github.com/josephmje
Expand Down

0 comments on commit c6f337b

Please sign in to comment.