Skip to content

Commit 2dbdac7

Browse files
authored
CI for notebooks (#174)
* Update example notebooks to write under examples/data/ * Update example notebooks for TileDB-Cloud * Run notebook examples on CI Github action * Set num_workers based on available #cores in example notebooks
1 parent 9ae80a4 commit 2dbdac7

11 files changed

+1121
-1005
lines changed

.github/workflows/ci.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
timeout-minutes: 30
9-
defaults:
10-
run:
11-
shell: bash -l {0}
129
strategy:
1310
fail-fast: false
1411
matrix:
@@ -48,6 +45,16 @@ jobs:
4845
mypyenv/bin/mypy .
4946
rm -rf mypyenv
5047
48+
- name: Run notebook examples
49+
if: ${{ github.ref == 'refs/heads/master' }}
50+
run: |
51+
pip install pytest-xdist nbmake matplotlib torchvision idx2numpy
52+
pytest --disable-warnings --nbmake examples/{models,readers}
53+
# Run tiledb-cloud in parallel
54+
if [[ "${{ secrets.TILEDB_API_TOKEN }}" != "" ]]; then
55+
TILEDB_API_TOKEN="${{ secrets.TILEDB_API_TOKEN }}" pytest --disable-warnings --nbmake -n3 examples/cloud
56+
fi
57+
5158
- name: Run tests
5259
if: ${{ !fromJSON(env.run_coverage) }}
5360
run: pytest --disable-warnings tests/

0 commit comments

Comments
 (0)