-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
85a57a8
commit fb6296a
Showing
2 changed files
with
10 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,4 @@ | ||
#!/bin/bash | ||
# WF 2020-03-25 | ||
os=$(uname -a) | ||
useroption="" | ||
#useroption="--user" | ||
|
||
# | ||
# autoinstall the package for the given command | ||
# | ||
autoinstall() { | ||
local l_cmd="$1" | ||
local l_package="$2" | ||
echo "checking whether $l_cmd is installed ..." | ||
which $l_cmd | ||
if [ $? -ne 0 ] | ||
then | ||
echo "installing $l_cmd from package $l_package ..." | ||
$install $l_package | ||
fi | ||
} | ||
case $os in | ||
Darwin*) | ||
pip="pip3" | ||
install="sudo port install" | ||
;; | ||
*) | ||
pip="pip3" | ||
if [ "$USER" = "travis" ] | ||
then | ||
# https://stackoverflow.com/a/20621143/1497139 | ||
echo "environment is travis with python version $TRAVIS_PYTHON_VERSION" | ||
pip="pip" | ||
useroption="" | ||
fi | ||
install="sudo apt-get install" | ||
;; | ||
esac | ||
while [ "$1" != "" ] | ||
do | ||
option="$1" | ||
case $option in | ||
-d|--debug) | ||
# show environment for debugging | ||
env | ||
;; | ||
-p|--python) | ||
shift | ||
pip="$1 -m pip" | ||
;; | ||
esac | ||
shift | ||
done | ||
#$install python3-pip | ||
#autoinstall jq jq | ||
$pip --version | ||
echo "installing required python modules with $pip install $useroption" | ||
if [ -f requirements.txt ]; then $pip install $useroption -r requirements.txt; fi | ||
# WF 2023-07-19 | ||
# simple install via pyproject.toml | ||
pip install . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
#!/bin/bash | ||
# WF 2020-06-03 | ||
python="python3" | ||
while [ "$1" != "" ] | ||
do | ||
option="$1" | ||
case $option in | ||
-d|--debug) | ||
# show environment for debugging | ||
env | ||
;; | ||
-p|--python) | ||
shift | ||
python="$1" | ||
;; | ||
esac | ||
shift | ||
done | ||
$python -m unittest discover | ||
#python3 -m unittest discover | ||
pip list | egrep "^green " | ||
if [ $? -ne 0 ] | ||
then | ||
pip install green | ||
fi | ||
green tests -s 1 |