small fix to annotate.py

This commit is contained in:
Isaac Riley 2022-07-26 13:03:34 +02:00
parent 023fdab832
commit 29c8d204e1
5 changed files with 8 additions and 8 deletions

View File

@ -3,7 +3,7 @@ set -e
SERVICE_NAME=$1 SERVICE_NAME=$1
SERVICE_NAME_BASE=$2 SERVICE_NAME_BASE=$2
# TODO version tag on master push
python3 -m venv build_venv python3 -m venv build_venv
source build_venv/bin/activate source build_venv/bin/activate
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip

View File

@ -7,17 +7,17 @@ python3 -m venv build_venv
source build_venv/bin/activate source build_venv/bin/activate
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip
echo "dev setup for unit test and coverage"
pip install -e . pip install -e .
pip install -r requirements.txt pip install -e incl/pyinfra
pip install -r incl/pyinfra/requirements.txt
pip install -r requirements.txt
echo "DVC pull step" echo "DVC pull step"
dvc pull dvc pull
echo "coverage calculation" echo "coverage calculation"
coverage run -m pytest coverage run -m pytest test
echo "coverage report generation" echo "coverage report generation"
coverage report -m coverage report -m
coverage xml coverage xml
@ -28,7 +28,7 @@ echo "dependency-check:aggregate"
mkdir -p reports mkdir -p reports
dependency-check --enableExperimental -f JSON -f HTML -f XML \ dependency-check --enableExperimental -f JSON -f HTML -f XML \
--disableAssembly -s . -o reports --project $SERVICE_NAME --exclude ".git/**" --exclude "venv/**" \ --disableAssembly -s . -o reports --project $SERVICE_NAME --exclude ".git/**" --exclude "venv/**" \
--exclude "build_venv/**" --exclude "**/__pycache__/**" --exclude "build_venv/**" --exclude "**/__pycache__/**" --exclude "bamboo-specs/**"
if [[ -z "${bamboo_repository_pr_key}" ]] if [[ -z "${bamboo_repository_pr_key}" ]]
then then

View File

@ -8,5 +8,5 @@ webserver:
port: $SERVER_PORT|5000 # webserver port port: $SERVER_PORT|5000 # webserver port
visual_logging: visual_logging:
level: DISABLED # NOTHING > INFO > DEBUG > ALL level: DEBUG # NOTHING > INFO > DEBUG > ALL
output_folder: /tmp/debug/ output_folder: /tmp/debug/

View File

@ -27,7 +27,7 @@ def parse_args():
def annotate_page(page_image, analysis_function, drawing_function, name="tmp.png", show=True): def annotate_page(page_image, analysis_function, drawing_function, name="tmp.png", show=True):
result = analysis_function(page_image) result = analysis_function(page_image)
page_image = drawing_function(page_image, result) page_image = drawing_function(page_image, result)
vizlogger.debug(page_image, "redactions05_output.png") vizlogger.debug(page_image, name)
show_image(page_image) show_image(page_image)