-
-
Notifications
You must be signed in to change notification settings - Fork 247
Add code coverage for backend tests #2056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information. |
Test Results168 tests 168 ✅ 38s ⏱️ Results for commit 2e047e4. ♻️ This comment has been updated with latest results. |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates code coverage into the backend test suite, updates CI to generate and publish coverage reports, and adds robustness improvements in task pipelines and logging.
- Add
pytest-cov
and configure.coveragerc
to collect coverage - Update GitHub Actions workflow to produce and publish coverage reports
- Enhance task code with stricter batching, better logging, and corrected comparison logic
Reviewed Changes
Copilot reviewed 13 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
pytest.ini | Enable LAUNCHBOX_API_ENABLED in test environment |
pyproject.toml | Add pytest-cov dependency |
.coveragerc | Omit migrations and tests from coverage |
.github/workflows/pytest.yml | Run pytest with coverage flags and publish reports |
backend/tasks/update_switch_titledb.py | Use strict=False in batch calls |
backend/tasks/update_launchbox_metadata.py | Add warning for missing content, annotate image lists, store last game images |
backend/endpoints/sockets/scan.py | Change __add__ handling and fix rom.id string comparison |
Comments suppressed due to low confidence (2)
backend/endpoints/sockets/scan.py:113
- The docstring mentions
metadata_sources
, but this parameter is not in the signature; update or remove this entry for accuracy.
metadata_sources (list[str], optional): List of metadata sources to be used
backend/tasks/update_switch_titledb.py:42
- The comprehension maps v['id'] without verifying its presence, which may raise a KeyError; consider filtering with
if v.get('id')
as in the index mapping.
product_map = {
Description
Explain the changes or enhancements you are proposing with this pull request.
Checklist
Please check all that apply.
Screenshots