From 893a6dc4e694dd15b497929d6b24162d1e0e964a Mon Sep 17 00:00:00 2001 From: Jesse Smith Date: Fri, 8 Sep 2023 11:01:48 -0700 Subject: [PATCH 1/3] fixed security issue --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 632a3ce5..15a547e9 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ python_requires='>=3.8.13', install_requires=[ 'numpy== 1.23.3', - 'scipy==1.9.3', + 'scipy==1.10.0', 'scikit-image==0.19.3', 'scikit-learn==1.1.2', 'shapely==1.8.5.post1', From a6005c28d06dc92b36095623376fbfeb14c74c2a Mon Sep 17 00:00:00 2001 From: Jesse Smith Date: Fri, 8 Sep 2023 11:03:01 -0700 Subject: [PATCH 2/3] updated cicd ubuntu version to github supported version --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0f45e676..2b135665 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -5,7 +5,7 @@ on: push jobs: build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: From 34664337a246b98684e84427e8934a0518bb98f6 Mon Sep 17 00:00:00 2001 From: Jesse Smith Date: Fri, 8 Sep 2023 11:06:45 -0700 Subject: [PATCH 3/3] fixed linter issues --- .github/workflows/python-package.yml | 2 +- examples/image_to_annotations.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2b135665..51be3796 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -29,7 +29,7 @@ jobs: # stop the build if there are Python syntax errors or undefined names # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - flake8 . --ignore=E222,E402,E226,E241,E203,E202,E271,E201,E221 --count --max-complexity=10 --max-line-length=200 --statistics + flake8 . --ignore=E222,E402,E226,E241,E203,E202,E271,E201,E221,C901 --count --max-complexity=10 --max-line-length=200 --statistics - name: Test with pytest run: | IS_CI_RUNNER=True pytest diff --git a/examples/image_to_annotations.py b/examples/image_to_annotations.py index 6103daa0..1051b861 100644 --- a/examples/image_to_annotations.py +++ b/examples/image_to_annotations.py @@ -55,7 +55,7 @@ def image_to_annotations(img_fn: str, out_dir: str) -> None: detection_results = json.loads(resp.content) # error check detection_results - if type(detection_results) == dict and 'code' in detection_results.keys() and detection_results['code'] == 404: + if isinstance(detection_results, dict) and 'code' in detection_results.keys() and detection_results['code'] == 404: assert False, f'Error performing detection. Check that drawn_humanoid_detector.mar was properly downloaded. Response: {detection_results}' # order results by score, descending @@ -99,7 +99,7 @@ def image_to_annotations(img_fn: str, out_dir: str) -> None: pose_results = json.loads(resp.content) # error check pose_results - if type(pose_results) == dict and 'code' in pose_results.keys() and pose_results['code'] == 404: + if isinstance(pose_results, dict) and 'code' in pose_results.keys() and pose_results['code'] == 404: assert False, f'Error performing pose estimation. Check that drawn_humanoid_pose_estimator.mar was properly downloaded. Response: {pose_results}' # if more than one skeleton detected, abort