update notebooks for 2024 course #33
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
name: SENSE_convml-tt | |
on: [push] | |
jobs: | |
test: | |
name: Test python ${{ matrix.python-version }} on ${{ matrix.os }} | |
defaults: | |
# for micromamba | |
run: | |
shell: bash -l {0} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
# not testing on macos since the notebook execution times out for nbval | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
channels: conda-forge | |
channel-priority: strict | |
mamba-version: "*" | |
activate-environment: convml_tt | |
auto-update-conda: false | |
python-version: ${{ matrix.python-version }} | |
- name: Set up conda environment | |
run: | | |
mamba env update --file binder/environment.yml | |
- run: conda --version | |
- run: which python | |
- name: Install test packages | |
shell: bash -l {0} | |
run: | | |
python -m pip install pytest nbval | |
- name: which python | |
shell: bash -l {0} | |
run: | | |
which python | |
- name: git info | |
run: | | |
git log --name-only -1 | cat - | |
- name: Download test data | |
shell: bash -l {0} | |
run: | | |
cd notebooks | |
mkdir data | |
cd data | |
curl https://homepages.see.leeds.ac.uk/~earlcd/ml-datasets/Nx256_s200000.0_N500study_N2000train.tgz --output Nx256_s200000.0_N500study_N2000train.tgz -k | |
tar zxvf Nx256_s200000.0_N500study_N2000train.tgz | |
curl https://homepages.see.leeds.ac.uk/~earlcd/ml-datasets/fixednorm-stage-2.tgz --output fixednorm-stage-2.tgz -k | |
tar zxvf fixednorm-stage-2.tgz | |
- name: Test with pytest | |
shell: bash -l {0} | |
run: | | |
pytest --nbval-lax |