Added Coverage Analysis for Tests of Python Package and Updated Pytest Configurations#837
Added Coverage Analysis for Tests of Python Package and Updated Pytest Configurations#837ps2181 wants to merge 2 commits intogoogle:mainfrom
Conversation
| uv run --python ${{ matrix.python-version }} pytest tests -m "not slow" --cov=src/magika --cov-report=xml --cov-report=term | ||
|
|
||
| - name: Upload coverage report to Coveralls | ||
| if: always() |
There was a problem hiding this comment.
this if should be removed?
There was a problem hiding this comment.
The" if: always()" will ensure that the coverage report is uploaded even if one test case fails. If this is not necessary for our workflow, I can remove it
There was a problem hiding this comment.
@reyammer Does this update look good, or are there any additional changes needed?
|
Thanks! Added @kralka as reviewer to double check. |
| working-directory: python | ||
| run: uv run --python ${{ matrix.python-version }} pytest tests -m "not slow" | ||
| run: | | ||
| uv run --python ${{ matrix.python-version }} pytest tests -m "not slow" --cov=src/magika --cov-report=xml --cov-report=term |
There was a problem hiding this comment.
Is this not already covered by the change in pytest.ini?
There was a problem hiding this comment.
The configuration in pytest.ini centralizes the coverage settings, but the run command ensures the CI pipeline executes pytest correctly. However, I can remove the redundant options from the YAML file to avoid duplication.
|
Hello! I guess this was closed by mistake? We are still interested in this -- apologies for the long delay in getting back to you, very busy with other aspects of the project. So, unless you found some problems and you don't think this should be reviews & merged, I would keep it open... we'll eventually get to this :-) |
|
@reyammer Thanks for restoring the PR looking forward to get the review |
e8aa08e to
45ac722
Compare
@reyammer , as per your review comment on PR #792, I have added Coverage Analysis for Tests of Python Package for issue #221 and updated pytest configurations. Kindly review the code and verify if the changes align with the requisite updates.
The following changes have been made:
Implemented coverage analysis for the Python package using pytest-cov.
Configured pytest.ini to include coverage settings.
Added coverage tracking to the CI/CD workflow.
Updated .github/workflows to upload coverage reports to Coveralls for better visibility and reporting.
Closes #221.