Skip to content

Commit

Permalink
Merge branch 'main' into brendt/dev-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Mar 15, 2023
2 parents 10518ec + e3fcc5e commit d2e3dac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/isbin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,32 @@ size_threshold=65536

SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
OS=$(uname -a | cut -d ' ' -f 1)

for f in $@; do
echo $f
size=$(stat --format %s $f)
case "$OS" in
Linux) size=$(stat --format "%s" $f);;
Darwin) size=$(stat -f "%z" $f);;
*) echo "Error: unsupported operating system $OS" >&2; exit 1;;
esac
if [ $size -gt $size_threshold ]; then
echo "file exceeds maximum allowable size"
echo "raw data and ipynb files should go in scico-data"
exit 1
echo "file exceeds maximum allowable size of $size_threshold bytes"
echo "raw data and ipynb files should go in scico-data"
exit 2
fi
charset=$(file -b --mime $f | sed -e 's/.*charset=//')
if [ ! -L "$f" ] && [ "$charset" = "binary" ]; then
echo "binary files cannot be commited to the repository"
echo "raw data and ipynb files should go in scico-data"
exit 2
echo "binary files cannot be commited to the repository"
echo "raw data and ipynb files should go in scico-data"
exit 3
fi
basename=$(basename -- "$f")
ext="${basename##*.}"
if [ "$ext" = "ipynb" ]; then
echo "ipynb files cannot be commited to the repository"
echo "raw data and ipynb files should go in scico-data"
exit 3
echo "ipynb files cannot be commited to the repository"
echo "raw data and ipynb files should go in scico-data"
exit 4
fi
done

Expand Down
Binary file modified docs/source/_static/scico.ico
Binary file not shown.

0 comments on commit d2e3dac

Please sign in to comment.