feat: solution for task#92
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because there are two critical issues that must be fixed before the workflow will function correctly. First, setting a global working-directory: ./src in .github/workflows/python-ci.yml will cause the pip install -r requirements.txt step to fail — since requirements.txt is not located in ./src, this will result in a file-not-found error. Second, the redundant 'Run tests' step duplicates what coverage run -m pytest already does, making the workflow inefficient and unnecessarily increasing CI time. Both issues violate core functionality requirements: one breaks execution (a blocker), and the other contradicts the goal of an efficient, minimal CI setup. Please update the workflow to apply working-directory: ./src only to steps that actually need it (e.g., coverage report), and remove the standalone 'Run tests' step. Once these are addressed, the workflow will be robust and aligned with best practices.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| defaults: | ||
| run: | ||
| working-directory: ./src |
There was a problem hiding this comment.
Setting a default working-directory here will cause the 'Install dependencies' step to fail. The pip install -r requirements.txt command expects requirements.txt to be in the current directory, but this setting forces it to run inside ./src. Consider applying working-directory: ./src only to the specific steps that need it, rather than setting a global default for all run commands.
| - name: Run tests | ||
| run: python manage.py test |
There was a problem hiding this comment.
This step is redundant because the coverage run command in the next step already executes the tests. You can safely remove this 'Run tests' step to make the workflow more efficient.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The Install dependencies step in .github/workflows/python-ci.yml uses an incorrect path to requirements.txt. The task's description file specifies running pip install -r requirements.txt, which expects the file to be in the project root, but the workflow currently references src/requirements.txt. This will cause the CI job to fail with a FileNotFoundError. Please update the path to requirements.txt to be just requirements.txt (no src/ prefix) so the command matches the project setup instructions. Everything else in the workflow looks great — you've already fixed the working-directory and redundant test step correctly!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| python-version: ${{ env.PYTHON_VERSION }} | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install -r src/requirements.txt coverage flake8 |
There was a problem hiding this comment.
This path to requirements.txt appears to be incorrect. The instructions in the description file specify running pip install -r requirements.txt, which implies the file is located in the project's root directory, not within src. This step will likely fail with a 'file not found' error.
No description provided.