forked from SignalOceanSdk/SignalSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-docker-pr.sh
41 lines (31 loc) · 1000 Bytes
/
build-docker-pr.sh
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
#!/bin/bash -e
set -euxo pipefail
echo 'Upgrading pip...'
python3.8 -m pip install --upgrade pip
echo 'Installing dependencies...'
pip install -r ./requirements.txt
echo 'Running type checks...'
mypy --strict --implicit-reexport signal_ocean
echo 'Running code analysis...'
flake8 signal_ocean
echo 'Running tests...'
pytest
echo 'Analyzing docstrings...'
pydocstyle --match='(?!_[^_]).*\.py' --convention=google signal_ocean
echo 'Building dist...'
rm -rf dist/*
python3.8 ./setup.py sdist bdist_wheel
echo 'Installing SDK...'
pip install -e .
echo 'Installing dependencies...'
pip install notebook jupyter matplotlib openpyxl seaborn folium sqlalchemy pandas strictly_typed_pandas --upgrade
echo 'Running notebooks...'
ls -LR | grep .ipynb | while read filename
do
if [ -z "${SIGNAL_OCEAN_API_KEY}" ]
then echo 'Error: SIGNAL_OCEAN_API_KEY has not been defined'
exit 1
fi
echo "$filename"
jupyter nbconvert --execute --clear-output docs/examples/jupyter/*/"$filename"
done