This repository was archived by the owner on Mar 10, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
93 lines (84 loc) · 2.87 KB
/
appveyor.yml
File metadata and controls
93 lines (84 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: '{build}'
image:
- macos
- Ubuntu2004
configuration: Release
platform:
- x64
for:
-
matrix:
only:
- image: macos
install:
- curl -Ls https://micromamba.snakepit.net/api/micromamba/osx-64/latest | tar -xvj bin/micromamba
- mv bin/micromamba ./micromamba
-
matrix:
only:
- image: Ubuntu2004
install:
- wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba --strip-components=1
build_script:
- ./micromamba shell init -s bash -p ~/micromamba
- source ~/.bashrc
- source ~/.bash_profile
- hash -r
- mkdir -p ~/micromamba/pkgs/
- export MAMBA_ROOT_PREFIX=~/micromamba
- export MAMBA_EXE=$(pwd)/micromamba
- . $MAMBA_ROOT_PREFIX/etc/profile.d/mamba.sh
- git submodule update --init --recursive
- git submodule update --recursive --remote
- cd xcube
- micromamba create -y -f environment.yml -c conda-forge
- micromamba activate xcube
- python setup.py develop
- cd ../xcube-cci
- python setup.py develop
- cd ../xcube-cds
- python setup.py develop
- cd ../xcube-sh
- python setup.py develop
- cd ../xcube-geodb
- python setup.py develop
- cd ..
- micromamba install -c conda-forge jupyterlab
- micromamba install -c conda-forge psycopg2
- micromamba install -c conda-forge cartopy
- micromamba install -c conda-forge ipython
- micromamba install -c conda-forge cfgrib
- micromamba install -c conda-forge python-dotenv
- micromamba install -c conda-forge cdsapi
- micromamba install -c conda-forge pydap
- micromamba install -c conda-forge graphviz
- micromamba install -c conda-forge python-graphviz
- micromamba install -c conda-forge ipyleaflet
- list_of_failing_nbs=()
- directories_with_nbs="*/examples/notebooks xcube/examples/notebooks/datastores \
xcube/examples/notebooks/* */notebooks"
- initial_wd=$(pwd)
- for dir_with_nbs in $directories_with_nbs;
do
if [[ -d $dir_with_nbs ]]; then
if ! [[ $dir_with_nbs == *"inputdata"* ]]; then
for nb in ${dir_with_nbs}/*.ipynb;
do
jupyter nbconvert --to python --ExecutePreprocessor.kernel_name=python3 $nb;
export VAR=$nb;
directory=$(dirname "${VAR}");
filename=$(basename -- "$nb");
filename="${filename%.*}";
file="${filename}.py";
echo "Testing ${file} in directory ${directory}";
cd "$directory" && ipython "$file" || list_of_failing_nbs+=( "$nb" ) && cd "$initial_wd" && continue;
done
fi
fi
done
- if [[ ${#list_of_failing_nbs[@]} -eq 0 ]]; then
echo "Hurray! No jupyter notebooks are failing!";
else
echo "The failing notebooks are ${list_of_failing_nbs[@]}, exiting with error.";
exit 1;
fi