Skip to content

🐛 fix installation issue of pimms on PR using colab image #49

🐛 fix installation issue of pimms on PR using colab image

🐛 fix installation issue of pimms on PR using colab image #49

name: Test that tutorial runs on latest colab image
on:
# push:
# branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 2 3 * *'
jobs:
test-tutorial-on-colab:
name: Test tutorial on latest colab image
runs-on: ubuntu-latest-4core # increase disk space
# https://console.cloud.google.com/artifacts/docker/colab-images/europe/public/runtime
container:
image: europe-docker.pkg.dev/colab-images/public/runtime:latest
defaults:
run:
shell: bash
steps:
# - uses: actions/checkout@v4
# with:
# fetch-tags: true
# fetch-depth: 0
# path: /pimms
- name: Check out the repository
run: |
git clone https://github.com/RasmussenLab/pimms.git
cd pimms
echo $GITHUB_REF
git checkout $GITHUB_REF
git merge main
- name: Install pimms-learn (from branch) and papermill
if: github.event_name == 'pull_request'
run: |
cd pimms
echo PWD: $(pwd)
python -m build .
pip install dist/pimms_learn-*.whl
pip install papermill
which papermill
which python
which pip
cd project
echo python3 -c "import pimmslearn; print(pimmslearn.__version__)"
python3 -c "import pimmslearn; print(pimmslearn.__version__)"
echo python3 -c "import pimmslearn; pimmslearn.io
python3 -c "import pimmslearn; pimmslearn.io"
echo python3 -c "import pimmslearn.io"
python3 -c "import pimmslearn.io"
python -m papermill 04_1_train_pimms_models.ipynb 04_1_train_pimms_models_output.ipynb
papermill 04_1_train_pimms_models.ipynb 04_1_train_pimms_models_output.ipynb
- name: Install pimms-learn (from PyPI) and papermill
if: github.event_name == 'schedule'
run: |
pip install pimms-learn papermill
- name: Run tutorial
run: |
cd project
which papermill
papermill 04_1_train_pimms_models.ipynb 04_1_train_pimms_models_output.ipynb
papermill 04_1_train_pimms_models.ipynb 04_1_train_pimms_models_no_val.ipynb -p sample_splits False