Repository navigation
Report broken requirements in dependency tables as Sphinx warnings - #31
Conversation
A requirements file is read inside a 'WarningCollector'; each 'BrokenRequirementWarning' (a line that can't be parsed) is reported through the Sphinx logger, naming the entrypoint, file and line. The file's other requirements are still read. 'DependencyCollector.Details' reports every collected warning other than 'UnknownLicenseWarning' through the logger, e.g. a 'BrokenRequirementWarning' for a requirement whose marker names no declared extra. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
| Duplication | 0 |
🟢 Coverage 100.00% diff coverage · +0.05% coverage variation
Metric Results Coverage variation ✅ +0.05% coverage variation (-1.00%) Diff coverage ✅ 100.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (1185e3e) 3212 2632 81.94% Head commit (5534015) 3221 (+9) 2641 (+9) 81.99% (+0.05%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#31) 10 10 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #31 +/- ##
==========================================
+ Coverage 79.35% 79.44% +0.08%
==========================================
Files 19 19
Lines 3212 3221 +9
Branches 485 486 +1
==========================================
+ Hits 2549 2559 +10
Misses 580 580
+ Partials 83 82 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Bug Fixes
pyTooling.Sphinx.DependencyTable:pyTooling_Dependency_Requirementswas read without aWarningCollector. A line that can't be parsed (pyTooling'sBrokenRequirementWarning) was dropped from the dependency table without any message. It is now reported as a Sphinx warning naming the entrypoint, the file and the line number; the file's other requirements are still read. This also covers files included with-r.DependencyCollector.Detailscollected the warnings ofRelease.DownloadDetails, but kept onlyUnknownLicenseWarning. ABrokenRequirementWarning(a requirement whose marker names no extra the release declares) was discarded. Every collected warning other thanUnknownLicenseWarningis now reported as a Sphinx warning, including its notes.Documentation
DependencyCollector.Detailsand of the requirements file reader name the warnings reported as Sphinx warnings.Unit Tests
Entrypoints.File_BrokenRequirement: a broken line between two requirements is logged with entrypoint, file and line; both requirements are read.Entrypoints.File_Included_BrokenRequirement: a broken line in a file included with-ris logged with the included file's path.BrokenRequirementReport.BrokenRequirement:DependencyCollector.Detailslogs aBrokenRequirementWarningwith its note, still returns the release and records no unresolved license.tests/unit: 221 passed (3 new; they fail without the fix).