Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: silence pip install output #5

Merged
merged 1 commit into from
Dec 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 37 additions & 17 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,26 @@
echo "Creating virtual environment: $2"
python3 -m venv $2
echo "Activating virtual environment: $2"
echo ""
source $2/bin/activate
pip install -U pip
pip install -U -q pip

echo "Commencing tool run"
echo ""

# Run the autoformatters first.
if [ "$3" = true ] ; then

echo Running: black --check ${33} $1

pip install black$4
pip install -q black$4

black --check ${33} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "Black ok"
echo ""
else
echo "Black error"
exit $exit_code
Expand All @@ -80,13 +85,14 @@ if [ "$5" = true ]; then

echo Running: yapf ${34} $1

pip install yapf$6
pip install -q yapf$6

yapf ${34} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "yapf ok"
echo ""
else
echo "yapf error"
exit $exit_code
Expand All @@ -98,15 +104,16 @@ if [ "$7" = true ] ; then

echo Running: isort ${35} $1 -c --diff

pip install isort$8
pip install -q isort$8

isort ${35} $1 -c --diff
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "isort ok"
echo ""
else
echo "isort error $exit_code"
echo "isort error"
exit $exit_code
fi

Expand All @@ -116,15 +123,17 @@ if [ "$9" = true ] ; then

echo Running: docformatter -c --recursive ${36} $1

pip install docformatter${10}
pip install -q docformatter${10}

docformatter -c --recursive ${36} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "docformatter ok"
echo ""
elif [ "$exit_code" = "3" ]; then
echo "docformatter wants to format one or more files"
echo ""
else
echo "docformatter error"
echo $exit_code
Expand All @@ -136,13 +145,14 @@ if [ "${11}" = true ] ; then

echo Running: pycodestyle ${37} $1

pip install pycodestyle${12}
pip install -q pycodestyle${12}

pycodestyle ${37} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "pycodestyle ok"
echo ""
else
echo "pycodestyle error"
exit $exit_code
Expand All @@ -154,13 +164,14 @@ if [ "${13}" = true ] ; then

echo Running: autopep8 ${38} $1

pip install autopep8${14}
pip install -q autopep8${14}

autopep8 ${38} $1
exit_code=$?

if [ "$exit_code" = 0 ]; then
echo "autopep8 ok"
echo ""
else
echo "autopep8 error"
echo $exit_code
Expand All @@ -172,13 +183,14 @@ if [ "${15}" = true ] ; then

echo Running: pydocstyle ${39} $1

pip install pydocstyle${16}
pip install -q pydocstyle${16}

pydocstyle ${39} $1
exit_code=$?

if [ "$exit_code" = 0 ]; then
echo "pydocstyle ok"
echo ""
else
echo "pydocstyle error"
exit $exit_code
Expand All @@ -190,13 +202,14 @@ if [ "${17}" = true ] ; then

echo Running: mypy ${40} $1

pip install mypy${18}
pip install -q mypy${18}

mypy ${40} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "mypy ok"
echo ""
else
echo "mypy error"
exit $exit_code
Expand All @@ -209,13 +222,14 @@ if [ "${19}" = true ] ; then

echo Running: pylint ${41} $1

pip install pylint${20}
pip install -q pylint${20}

pylint ${41} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "Pylint ok"
echo ""
else
echo "Pylint error"
exit $exit_code
Expand All @@ -227,13 +241,14 @@ if [ "${21}" = true ] ; then

echo Running: flake8 ${42} $1

pip install flake8${22}
pip install -q flake8${22}

flake8 ${42} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "Flake8 ok"
echo ""
else
echo "Flake8 error"
exit $exit_code
Expand All @@ -246,13 +261,14 @@ if [ "${23}" = true ]; then

echo Running: mccabe ${43} $1

pip install mccabe${24}
pip install -q mccabe${24}

python -m mccabe ${43} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "mccabe complexity ok"
echo ""
else
echo "mccabe error"
exit $exit_code
Expand All @@ -263,13 +279,14 @@ if [ "${25}" = true ]; then

echo Running: radon ${44} $1

pip install radon${26}
pip install -q radon${26}

radon ${44} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "radon ok"
echo ""
else
echo "radon error"
exit $exit_code
Expand All @@ -281,13 +298,14 @@ if [ "${27}" = true ]; then

echo Running: rstcheck ${45} $1

pip install rstcheck${28}
pip install -q rstcheck${28}

rstcheck ${45} $1
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "Rstcheck ok"
echo ""
else
echo "Rstcheck error"
exit $exit_code
Expand All @@ -299,13 +317,14 @@ if [ "${29}" = true ]; then

echo Running: check-manifest ${46} .

pip install check-manifest${30}
pip install -q check-manifest${30}

check-manifest ${46} .
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "Check-manifest ok"
echo ""
else
echo "Check-manifest error"
exit $exit_code
Expand All @@ -316,13 +335,14 @@ if [ "${31}" = true ]; then

echo Running: pyroma ${47} .

pip install pyroma${32}
pip install -q pyroma${32}

pyroma ${47} .
exit_code=$?

if [ "$exit_code" = "0" ]; then
echo "Pyroma ok"
echo ""
else
echo "Pyroma error"
exit $exit_code
Expand Down