-
Notifications
You must be signed in to change notification settings - Fork 8.2k
ci(lfx): add coverage generation and Codecov reporting #10266
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
…rting - Refined dependency markers for several packages to improve compatibility with Python 3.12 and specific platforms. - Added pytest-cov to development dependencies for enhanced test coverage reporting. - Updated dependencies for pyobjc frameworks to include platform-specific markers for better compatibility.
- Updated the lfx_tests target in the Makefile to include coverage reporting options for pytest. - Added coverage metrics output in XML, HTML, and terminal formats to improve test visibility and analysis.
- Added LFX coverage target and threshold to the codecov.yml file. - Defined separate coverage flags for frontend, backend, and LFX components. - Updated ignore patterns to exclude LFX test and component directories from coverage reports.
- Implemented steps to upload coverage reports to Codecov for Python 3.10. - Added artifact upload for coverage reports, retaining them for 30 days.
- Increased the LFX coverage target from 40% to 60% to encourage aspirational improvement. - Clarified the allowable drop in coverage threshold from 44% to 39% without failing the status check.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughAdds LFX-specific test coverage generation and reporting: pytest now produces XML/HTML coverage for src/lfx; GitHub Actions uploads LFX coverage to Codecov and as artifacts on Python 3.10; Codecov config gains an lfx component with targets/flags; dev deps and coverage settings added in src/lfx/pyproject.toml. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant GH as GitHub Actions (lfx-tests)
participant PyTest as pytest + pytest-cov
participant FS as Workspace (src/lfx/)
participant CC as Codecov
participant Art as Artifacts
Dev->>GH: Push/PR triggers workflow
GH->>PyTest: Run lfx_tests (pytest with coverage)
PyTest->>FS: Generate coverage.xml & htmlcov
Note over FS: src/lfx/coverage.xml<br/>src/lfx/htmlcov/
GH->>CC: Upload coverage (flag=lfx, files from src/lfx/)
GH->>Art: Upload artifacts (lfx-coverage-report)
CC-->>GH: Acknowledge upload
Art-->>GH: Artifact stored (retention=30d)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (48.68%) is below the target coverage (55.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #10266 +/- ##
==========================================
+ Coverage 24.69% 29.72% +5.03%
==========================================
Files 1116 1304 +188
Lines 40267 59156 +18889
Branches 5550 8834 +3284
==========================================
+ Hits 9944 17586 +7642
- Misses 30152 40753 +10601
- Partials 171 817 +646
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
Makefile (1)
172-175: Make dev deps explicit and add branch coverage (optional).
- Ensure pytest/pytest-cov are installed: make uv sync include dev group.
- Consider branch coverage for better signal.
@cd src/lfx && \ -uv sync && \ -uv run pytest tests/unit -v --cov=src/lfx --cov-report=xml --cov-report=html --cov-report=term-missing $(args) +uv sync --group dev && \ +uv run pytest tests/unit -v --cov=src/lfx --cov-branch --cov-report=xml --cov-report=html --cov-report=term-missing $(args)If your CI/local uv already installs dev by default, this is a no-op; making it explicit avoids drift. Please confirm uv’s default behavior in this repo.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
.github/workflows/python_test.yml(1 hunks)Makefile(1 hunks)codecov.yml(5 hunks)src/lfx/pyproject.toml(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
{src/backend/**/*.py,tests/**/*.py,Makefile}
📄 CodeRabbit inference engine (.cursor/rules/backend_development.mdc)
{src/backend/**/*.py,tests/**/*.py,Makefile}: Run make format_backend to format Python code before linting or committing changes
Run make lint to perform linting checks on backend Python code
Files:
Makefile
{tests/**/*.py,Makefile}
📄 CodeRabbit inference engine (.cursor/rules/backend_development.mdc)
Run make unit_tests to execute backend unit tests
Files:
Makefile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Lint Backend / Run Mypy (3.11)
- GitHub Check: Lint Backend / Run Mypy (3.10)
- GitHub Check: Lint Backend / Run Mypy (3.13)
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 3
- GitHub Check: Lint Backend / Run Mypy (3.12)
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 1
- GitHub Check: Run Backend Tests / Integration Tests - Python 3.10
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 4
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 5
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 2
- GitHub Check: Test Starter Templates
🔇 Additional comments (5)
src/lfx/pyproject.toml (1)
128-130: pytest-cov addition LGTM.Dev deps clearly include pytest-cov; aligns with Makefile/CI.
.github/workflows/python_test.yml (1)
171-191: LFX coverage upload wiring looks correct.Flags/paths align with codecov.yml and Makefile outputs; scoped to py3.10 to avoid duplicates. Please confirm Codecov sees the report under src/lfx/ with the lfx flag.
codecov.yml (3)
39-49: LFX project status target/threshold make sense.Aspirational 60% with 5% threshold is consistent with the PR goals.
65-79: LFX flag config matches workflow upload.paths and carryforward true align with the action’s lfx flag usage.
96-115: Ignore rules for LFX are consistent.Ignoring tests, migrations, and components mirrors local coverage omit. Good separation of “core” vs integrations.
erichare
left a comment
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.
LGTM!
- Enabled branch coverage in the coverage run configuration. - Fixed a typo in the main module check to ensure proper execution.
|
* chore: update dependency markers and add pytest-cov for coverage reporting - Refined dependency markers for several packages to improve compatibility with Python 3.12 and specific platforms. - Added pytest-cov to development dependencies for enhanced test coverage reporting. - Updated dependencies for pyobjc frameworks to include platform-specific markers for better compatibility. * chore: enhance lfx_tests command with coverage reporting - Updated the lfx_tests target in the Makefile to include coverage reporting options for pytest. - Added coverage metrics output in XML, HTML, and terminal formats to improve test visibility and analysis. * chore: update codecov configuration for LFX coverage tracking - Added LFX coverage target and threshold to the codecov.yml file. - Defined separate coverage flags for frontend, backend, and LFX components. - Updated ignore patterns to exclude LFX test and component directories from coverage reports. * chore: add coverage upload steps to Python CI workflow - Implemented steps to upload coverage reports to Codecov for Python 3.10. - Added artifact upload for coverage reports, retaining them for 30 days. * chore: update LFX coverage target in codecov configuration - Increased the LFX coverage target from 40% to 60% to encourage aspirational improvement. - Clarified the allowable drop in coverage threshold from 44% to 39% without failing the status check. * chore: update coverage configuration in pyproject.toml - Enabled branch coverage in the coverage run configuration. - Fixed a typo in the main module check to ensure proper execution.
…0266) * chore: update dependency markers and add pytest-cov for coverage reporting - Refined dependency markers for several packages to improve compatibility with Python 3.12 and specific platforms. - Added pytest-cov to development dependencies for enhanced test coverage reporting. - Updated dependencies for pyobjc frameworks to include platform-specific markers for better compatibility. * chore: enhance lfx_tests command with coverage reporting - Updated the lfx_tests target in the Makefile to include coverage reporting options for pytest. - Added coverage metrics output in XML, HTML, and terminal formats to improve test visibility and analysis. * chore: update codecov configuration for LFX coverage tracking - Added LFX coverage target and threshold to the codecov.yml file. - Defined separate coverage flags for frontend, backend, and LFX components. - Updated ignore patterns to exclude LFX test and component directories from coverage reports. * chore: add coverage upload steps to Python CI workflow - Implemented steps to upload coverage reports to Codecov for Python 3.10. - Added artifact upload for coverage reports, retaining them for 30 days. * chore: update LFX coverage target in codecov configuration - Increased the LFX coverage target from 40% to 60% to encourage aspirational improvement. - Clarified the allowable drop in coverage threshold from 44% to 39% without failing the status check. * chore: update coverage configuration in pyproject.toml - Enabled branch coverage in the coverage run configuration. - Fixed a typo in the main module check to ensure proper execution.
…0266) * chore: update dependency markers and add pytest-cov for coverage reporting - Refined dependency markers for several packages to improve compatibility with Python 3.12 and specific platforms. - Added pytest-cov to development dependencies for enhanced test coverage reporting. - Updated dependencies for pyobjc frameworks to include platform-specific markers for better compatibility. * chore: enhance lfx_tests command with coverage reporting - Updated the lfx_tests target in the Makefile to include coverage reporting options for pytest. - Added coverage metrics output in XML, HTML, and terminal formats to improve test visibility and analysis. * chore: update codecov configuration for LFX coverage tracking - Added LFX coverage target and threshold to the codecov.yml file. - Defined separate coverage flags for frontend, backend, and LFX components. - Updated ignore patterns to exclude LFX test and component directories from coverage reports. * chore: add coverage upload steps to Python CI workflow - Implemented steps to upload coverage reports to Codecov for Python 3.10. - Added artifact upload for coverage reports, retaining them for 30 days. * chore: update LFX coverage target in codecov configuration - Increased the LFX coverage target from 40% to 60% to encourage aspirational improvement. - Clarified the allowable drop in coverage threshold from 44% to 39% without failing the status check. * chore: update coverage configuration in pyproject.toml - Enabled branch coverage in the coverage run configuration. - Fixed a typo in the main module check to ensure proper execution.
…0266) * chore: update dependency markers and add pytest-cov for coverage reporting - Refined dependency markers for several packages to improve compatibility with Python 3.12 and specific platforms. - Added pytest-cov to development dependencies for enhanced test coverage reporting. - Updated dependencies for pyobjc frameworks to include platform-specific markers for better compatibility. * chore: enhance lfx_tests command with coverage reporting - Updated the lfx_tests target in the Makefile to include coverage reporting options for pytest. - Added coverage metrics output in XML, HTML, and terminal formats to improve test visibility and analysis. * chore: update codecov configuration for LFX coverage tracking - Added LFX coverage target and threshold to the codecov.yml file. - Defined separate coverage flags for frontend, backend, and LFX components. - Updated ignore patterns to exclude LFX test and component directories from coverage reports. * chore: add coverage upload steps to Python CI workflow - Implemented steps to upload coverage reports to Codecov for Python 3.10. - Added artifact upload for coverage reports, retaining them for 30 days. * chore: update LFX coverage target in codecov configuration - Increased the LFX coverage target from 40% to 60% to encourage aspirational improvement. - Clarified the allowable drop in coverage threshold from 44% to 39% without failing the status check. * chore: update coverage configuration in pyproject.toml - Enabled branch coverage in the coverage run configuration. - Fixed a typo in the main module check to ensure proper execution.
…0266) * chore: update dependency markers and add pytest-cov for coverage reporting - Refined dependency markers for several packages to improve compatibility with Python 3.12 and specific platforms. - Added pytest-cov to development dependencies for enhanced test coverage reporting. - Updated dependencies for pyobjc frameworks to include platform-specific markers for better compatibility. * chore: enhance lfx_tests command with coverage reporting - Updated the lfx_tests target in the Makefile to include coverage reporting options for pytest. - Added coverage metrics output in XML, HTML, and terminal formats to improve test visibility and analysis. * chore: update codecov configuration for LFX coverage tracking - Added LFX coverage target and threshold to the codecov.yml file. - Defined separate coverage flags for frontend, backend, and LFX components. - Updated ignore patterns to exclude LFX test and component directories from coverage reports. * chore: add coverage upload steps to Python CI workflow - Implemented steps to upload coverage reports to Codecov for Python 3.10. - Added artifact upload for coverage reports, retaining them for 30 days. * chore: update LFX coverage target in codecov configuration - Increased the LFX coverage target from 40% to 60% to encourage aspirational improvement. - Clarified the allowable drop in coverage threshold from 44% to 39% without failing the status check. * chore: update coverage configuration in pyproject.toml - Enabled branch coverage in the coverage run configuration. - Fixed a typo in the main module check to ensure proper execution.



Add lfx coverage reporting
Summary by CodeRabbit