|
| 1 | +name: Tutorials |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + |
| 9 | +jobs: |
| 10 | + run-tutorials: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + python-version: [3.9, "3.10", "3.11", "3.12", "3.13"] |
| 15 | + max-parallel: 5 |
| 16 | + fail-fast: true |
| 17 | + |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + - name: Set up Python |
| 21 | + uses: actions/setup-python@v5 |
| 22 | + with: |
| 23 | + python-version: ${{ matrix.python-version }} |
| 24 | + |
| 25 | + - uses: actions/cache@v4 |
| 26 | + with: |
| 27 | + path: ~/.cache/pip |
| 28 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} |
| 29 | + restore-keys: | |
| 30 | + ${{ runner.os }}-pip- |
| 31 | +
|
| 32 | + - uses: actions/cache@v4 |
| 33 | + with: |
| 34 | + path: ~/voxelwise_tutorials_data/shortclips |
| 35 | + key: shortclips-dataset |
| 36 | + |
| 37 | + - name: Install dependencies |
| 38 | + run: | |
| 39 | + pip install -U setuptools |
| 40 | + pip install -U wheel |
| 41 | + # install himalaya from source to get early testing |
| 42 | + pip install git+https://github.com/gallantlab/himalaya.git |
| 43 | + pip install -e ."[github]" |
| 44 | + # use neurodebian installer for travis |
| 45 | + bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) |
| 46 | + sudo apt-get update -qq |
| 47 | + sudo apt-get install git-annex-standalone |
| 48 | +
|
| 49 | + - name: Config git-annex |
| 50 | + run: | |
| 51 | + # add some git config for git-annex |
| 52 | + git config --global user.email "[email protected]" |
| 53 | + git config --global user.name "Github Actions" |
| 54 | +
|
| 55 | + - name: Run some tutorials |
| 56 | + run: | |
| 57 | + # run tutorials with a shortcut option to skip model fitting |
| 58 | + HIMALAYA_SKIP_FIT=True python tutorials/shortclips/00_download_shortclips.py |
| 59 | + HIMALAYA_SKIP_FIT=True python tutorials/shortclips/01_plot_explainable_variance.py |
| 60 | + HIMALAYA_SKIP_FIT=True python tutorials/shortclips/02_plot_ridge_regression.py |
| 61 | + HIMALAYA_SKIP_FIT=True python tutorials/shortclips/03_plot_wordnet_model.py |
| 62 | + HIMALAYA_SKIP_FIT=True python tutorials/shortclips/04_plot_hemodynamic_response.py |
| 63 | + HIMALAYA_SKIP_FIT=True python tutorials/shortclips/05_plot_motion_energy_model.py |
| 64 | + HIMALAYA_SKIP_FIT=True python tutorials/shortclips/06_plot_banded_ridge_model.py |
0 commit comments