Skip to content

Commit

Permalink
Merge pull request #223 from facebookresearch/security-fix
Browse files Browse the repository at this point in the history
Security fix, cicd fix
  • Loading branch information
hjessmith committed Sep 8, 2023
2 parents c5c3bc7 + 3466433 commit 4795771
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: push
jobs:
build:

runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand All @@ -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
4 changes: 2 additions & 2 deletions examples/image_to_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 4795771

Please sign in to comment.