Skip to content

Commit 7959350

Browse files
committed
Added cache clearing in developer setup/testing
1 parent b394aa0 commit 7959350

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

setup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ done
2323

2424
python -m pip install $mode .
2525
rm -rf stumpy.egg-info build dist __pycache__
26+
27+
site_pkgs=$(python -c 'import site; print(site.getsitepackages()[0])')
28+
if [ -d "$site_pkgs/stumpy/__pycache__" ]; then
29+
rm -rf $site_pkgs/stumpy/__pycache__/*nb*
30+
fi

test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ test_mode="all"
44
print_mode="verbose"
55
custom_testfiles=()
66
max_iter=10
7+
site_pkgs=$(python -c 'import site; print(site.getsitepackages()[0])')
78

89
# Parse command line arguments
910
for var in "$@"
@@ -223,6 +224,9 @@ clean_up()
223224
echo "Cleaning Up"
224225
rm -rf "dask-worker-space"
225226
rm -rf "stumpy/__pycache__/"
227+
if [ -d "$site_pkgs/stumpy/__pycache__" ]; then
228+
rm -rf $site_pkgs/stumpy/__pycache__/*nb*
229+
fi
226230
}
227231

228232
###########

0 commit comments

Comments
 (0)