Skip to content

feat: solution for task#92

Open
spridoloba wants to merge 1 commit into
mate-academy:mainfrom
spridoloba:develop
Open

feat: solution for task#92
spridoloba wants to merge 1 commit into
mate-academy:mainfrom
spridoloba:develop

Conversation

@spridoloba

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread .github/workflows/python-ci.yml Outdated
Comment on lines +20 to +22
defaults:
run:
working-directory: ./src

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/python-ci.yml Outdated
Comment on lines +36 to +37
- name: Run tests
run: python manage.py test

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: pip install -r src/requirements.txt coverage flake8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Losiev Losiev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants