Repository navigation
Report tables indent a name by markup instead of em quads - #45
Conversation
Node 'ReportIndentation' wraps a name with its number of indentation steps. HTML writes a span setting '--pyTooling-report-level', indented by a CSS padding of '--pyTooling-report-indentation' per step; LaTeX writes '\pyToolingReportIndentation', which sets '\leftskip' by '\pyToolingReportIndentationStep' per step. A wrapped name stays at its indentation. The em quads were a line-break opportunity, so a name wrapped below its indentation in a narrow column, and they were copied with the name. Constant 'INDENTATION' is removed; the code coverage table's header writes its em quad itself. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 1 minor |
| CodeStyle | 2 minor |
🟢 Metrics 0 complexity · 3 duplication
Metric Results Complexity 0 Duplication 3
🟢 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 (7a41df1) 4859 4233 87.12% Head commit (2d0fa19) 4879 (+20) 4253 (+20) 87.17% (+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 (#45) 46 46 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 #45 +/- ##
==========================================
+ Coverage 84.83% 84.89% +0.06%
==========================================
Files 24 24
Lines 4859 4879 +20
Branches 785 785
==========================================
+ Hits 4122 4142 +20
Misses 626 626
Partials 111 111
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
New Features
pyTooling.Sphinx.Node.ReportIndentation: the name of an entry in a report table, indented by the entry's depth. Attributelevelholds the number of indentation steps. Registered inNODESwith visitors for HTML and LaTeX:pyTooling.Sphinx.HTML.translateReportIndentation):<span class="report-indentation" style="--pyTooling-report-level: 12">. The stylesheet indents it by--pyTooling-report-level×--pyTooling-report-indentation(new custom property, default1em) as a padding of an inline block.pyTooling.Sphinx.LaTeX.translateReportIndentation):\pyToolingReportIndentation{12}, a macro ofpyTooling.Sphinx.sty, which sets\leftskipto that many\pyToolingReportIndentationStep(new length, default1em).\hangindentwas tried first: it doesn't indent at all in thevarwidthcells Sphinx writes.Changes
pyTooling.Sphinx.Unittest,pyTooling.Sphinx.CodeCoverage,pyTooling.Sphinx.DocCoverage: a name cell is aReportIndentationinstead of a text starting with em quads (U+2001). The widths are unchanged: two steps per level in the unit test summary, one per level in the code and documentation coverage tables, a module two steps below its package._NameEntry/_NameCelltake the number of steps and the icon instead of a prefix string.pyTooling.Sphinx.INDENTATIONis removed. It was never released; the header File of the code coverage table writes its em quad itself.Bug Fixes
Documentation
--pyTooling-report-indentationand\pyToolingReportIndentationStep; Unit Test Summary and Documentation Coverage refer to it.Unit Tests
Reports:Rendering.IndentationHTMLandRendering.IndentationLaTeXcheck a testcase (12 steps), a file (3) and a module (2) in a build with all three tables.DocCoverage:Levels.Dictionaryasserts the span instead of the em quad.Others
\hspace*indents only the first line,\hangindentnothing. The HTML isn't checked in a browser here.Related Issues and Pull-Requests
white-space: nowrapon the first column), closed as agreed with @Paebbels.