Skip to content

Commit a9899df

Browse files
committed
Clean up the output text and add a SIG.
I like how you can tell what *we’ve* printed out vs what has been printed out by code execution.
1 parent c57b6d4 commit a9899df

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

circle/setup.sh

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,44 @@
11
#!/bin/bash
22

3-
echo "running setup routine with python versions:"
3+
SIG="☁☀☂"
4+
5+
echo "${SIG} Running setup routine with Python versions:"
46
for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do
5-
echo " ${version}"
7+
echo "${SIG} ${version}"
68
done
79

810
PROGNAME=$(basename $0)
911
function error_exit
1012
{
11-
echo -e "${PROGNAME}: ${1:-"Unknown Error"}\n" 1>&2
13+
echo -e "${SIG} ${PROGNAME}: ${1:-"Unknown Error"}\n" 1>&2
1214
exit 1
1315
}
1416

1517
# PYENV shims need to be infront of the rest of the path to work!
16-
echo "adding pyenv shims to the beginning of the path in this shell"
18+
echo "${SIG} Adding pyenv shims to the beginning of the path in this shell."
1719
export PATH="/home/ubuntu/.pyenv/shims:$PATH"
1820

1921
# for each version we want, setup a functional virtual environment
2022
for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do
21-
echo Setting up Python ${version}
23+
echo "${SIG} Setting up Python ${version}"
2224

2325
# exporting this variable (in this scope) chooses the python version
2426
export PYENV_VERSION=${version}
25-
echo "Using pyenv version $(pyenv version)"
27+
echo "${SIG} Using pyenv version $(pyenv version)"
2628

2729
# this was a major issue previously, sanity check that we're using the
2830
# version we *think* we're using (that pyenv is pointing to)
29-
echo "python -c 'import sys; print(sys.version)'"
31+
echo "${SIG} python -c 'import sys; print(sys.version)'"
3032
python -c 'import sys; print(sys.version)'
3133

3234
# install core requirements all versions need
3335
pip install -r ${PLOTLY_CORE_REQUIREMENTS_FILE} ||
34-
error_exit "${LINENO}: can't install core reqs for Python ${version}"
36+
error_exit "${SIG} ${LINENO}: can't install core reqs for Python ${version}."
3537

3638
pip install -r ${PLOTLY_OPTIONAL_REQUIREMENTS_FILE} ||
37-
error_exit "${LINENO}: can't install optional for Python ${version}"
39+
error_exit "${SIG} ${LINENO}: can't install optional for Python ${version}."
3840

3941
# install some test tools
4042
pip install nose coverage ||
41-
error_exit "${LINENO}: can't install test tools for Python ${version}"
43+
error_exit "${SIG} ${LINENO}: can't install test tools for Python ${version}."
4244
done

circle/test.sh

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
#!/bin/bash
22

3-
echo "running test routine with python versions:"
3+
SIG="☁☀☂"
4+
5+
echo "${SIG} Running test routine with python versions:"
46
for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do
5-
echo " ${version}"
7+
echo "${SIG} ${version}"
68
done
79

810
PROGNAME=$(basename $0)
911
function error_exit
1012
{
11-
echo -e "${PROGNAME}: ${1:-"Unknown Error"}\n" 1>&2
13+
echo -e "${SIG} ${PROGNAME}: ${1:-"Unknown Error"}\n" 1>&2
1214
exit 1
1315
}
1416

1517
# PYENV shims need to be infront of the rest of the path to work!
16-
echo "adding pyenv shims to the beginning of the path in this shell"
18+
echo "${SIG} Adding pyenv shims to the beginning of the path in this shell."
1719
export PATH="/home/ubuntu/.pyenv/shims:$PATH"
1820

1921
# for each version we want, setup a functional virtual environment
2022
for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do
21-
echo Testing Python ${version}
23+
echo "${SIG} Testing Python ${version}"
2224

2325
# exporting this variable (in this scope) chooses the python version
2426
export PYENV_VERSION=${version}
25-
echo "Using pyenv version $(pyenv version)"
27+
echo "${SIG} Using pyenv version $(pyenv version)."
2628

2729
# this was a major issue previously, sanity check that we're using the
2830
# version we *think* we're using (that pyenv is pointing to)
29-
echo "Running: python -c 'import sys; print(sys.version)'. We've got:"
31+
echo "${SIG} Running: python -c 'import sys; print(sys.version)'. We've got:"
3032
python -c 'import sys; print(sys.version)'
3133

3234

33-
echo "install plotly (ignoring possibly cached versions)"
35+
echo "${SIG} Install plotly (ignoring possibly cached versions)."
3436
pip install -I ${PLOTLY_PACKAGE_ROOT} >/dev/null ||
35-
error_exit "${LINENO}: can't install plotly package from project root"
37+
error_exit "${SIG} ${LINENO}: can't install plotly package from project root"
3638

37-
echo "import plotly to create .plotly dir if DNE"
39+
echo "${SIG} Import plotly to create .plotly dir if DNE."
3840
python -c 'import plotly' >/dev/null ||
39-
error_exit "${LINENO}: can't import plotly package"
41+
error_exit "${SIG} ${LINENO}: can't import plotly package"
4042

41-
echo "running tests for Python ${version} as user '$(whoami)'"
43+
echo "${SIG} Running tests for Python ${version} as user '$(whoami)'."
4244
nosetests -x plotly/tests ||
43-
error_exit "${LINENO}: test suite failed for Python ${version}"
45+
error_exit "${SIG} ${LINENO}: test suite failed for Python ${version}"
4446

4547
done

0 commit comments

Comments
 (0)