Skip to content

Commit

Permalink
remove tests from pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ak8000 committed May 1, 2024
1 parent bdc27ed commit fee0862
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,31 @@ jobs:
with:
python-version: '3.8'

# Install and test dependencies for the Machine Learning Client
# Install dependencies for the Machine Learning Client
- name: Install dependencies for ML client
run: |
cd machine-learning-client
pip install -r requirements.txt
pip install pytest
# pip install pytest
- name: Run unit tests for ML client
run: |
cd machine-learning-client
pytest
# Run unit tests for ML client
# - name: Run unit tests for ML client
# run: |
# cd machine-learning-client
# pytest

# Install and test dependencies for the Web App
# Install dependencies for the Web App
- name: Install dependencies for Web App
run: |
cd web-app
pip install -r requirements.txt
pip install pytest
# pip install pytest
- name: Run unit tests for Web App
run: |
cd web-app
pytest
# Run unit tests for Web App
# - name: Run unit tests for Web App
# run: |
# cd web-app
# pytest

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand Down
11 changes: 3 additions & 8 deletions machine-learning-client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ def analyze_image(img_path):
result = DeepFace.analyze(img_path=img_path, actions=["age", "gender", "emotion", "race"])
logging.info("Analysis result: %s", result)
# Updated to access dictionary values directly
return [
result["age"],
result["dominant_gender"],
result["dominant_emotion"],
result["dominant_race"]
]
return [result[0]["age"], result[0]["dominant_gender"], result[0]["dominant_emotion"], result[0]["dominant_race"]]
except Exception as e:
logging.error("An error occurred during image analysis: %s", e)
raise
logging.error("An error occurred during image analysis: %s", e)
raise

0 comments on commit fee0862

Please sign in to comment.