Skip to content

Report tables indent a name by markup instead of em quads - #45

Merged
Paebbels merged 1 commit into
devfrom
claude/report-indentation
Oct 17, 2026
Merged

Paebbels merged 1 commit into
devfrom
claude/report-indentation

Conversation

@pytooling-claude

Copy link
Copy Markdown

New Features

  • pyTooling.Sphinx.Node.ReportIndentation: the name of an entry in a report table, indented by the entry's depth. Attribute level holds the number of indentation steps. Registered in NODES with visitors for HTML and LaTeX:
    • HTML (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, default 1em) as a padding of an inline block.
    • LaTeX (pyTooling.Sphinx.LaTeX.translateReportIndentation): \pyToolingReportIndentation{12}, a macro of pyTooling.Sphinx.sty, which sets \leftskip to that many \pyToolingReportIndentationStep (new length, default 1em). \hangindent was tried first: it doesn't indent at all in the varwidth cells Sphinx writes.
    • In both formats, a wrapped name stays at its indentation. A format without visitors writes the name without indentation.

Changes

  • pyTooling.Sphinx.Unittest, pyTooling.Sphinx.CodeCoverage, pyTooling.Sphinx.DocCoverage: a name cell is a ReportIndentation instead 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 / _NameCell take the number of steps and the icon instead of a prefix string.
  • pyTooling.Sphinx.INDENTATION is removed. It was never released; the header File of the code coverage table writes its em quad itself.

Bug Fixes

  • An em quad isn't collapsed, but a line may break after it: in a narrow column, e.g. with the theme alabaster, a deep testcase's or file's name wrapped below its indentation, so the row was twice as tall and the name bottom-aligned. Copying a name from a table copied the em quads too.

Documentation

  • Code Coverage § Styling: the indentation, --pyTooling-report-indentation and \pyToolingReportIndentationStep; Unit Test Summary and Documentation Coverage refer to it.

Unit Tests

  • Reports: Rendering.IndentationHTML and Rendering.IndentationLaTeX check a testcase (12 steps), a file (3) and a module (2) in a build with all three tables.
  • DocCoverage: Levels.Dictionary asserts the span instead of the em quad.

Others

  • Checked by compiling the LaTeX of that build with pdflatex (emoji replaced, pdflatex has none) and rendering the PDF: every table indents as before, a long testcase name wraps at its indentation. \hspace* indents only the first line, \hangindent nothing. The HTML isn't checked in a browser here.

Related Issues and Pull-Requests

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>
@pytooling-claude
pytooling-claude Bot requested a review from Paebbels as a code owner October 17, 2026 14:38
@Paebbels Paebbels added Bug Something isn't working Enhancement New feature or request labels Oct 17, 2026
@codacy-production

codacy-production Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 3 minor

Alerts:
⚠ 3 issues (≤ 0 issues of at least minor severity)

Results:
3 new issues

Category Results
Documentation 1 minor
CodeStyle 2 minor

View in Codacy

🟢 Metrics 0 complexity · 3 duplication

Metric Results
Complexity 0
Duplication 3

View in Codacy

🟢 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

View coverage diff in Codacy

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

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.89%. Comparing base (7a41df1) to head (2d0fa19).
✅ All tests successful. No failed tests found.

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              
Flag Coverage Δ
unittests 84.89% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@Paebbels
Paebbels merged commit fd80949 into dev Oct 17, 2026
58 of 59 checks passed
@Paebbels
Paebbels deleted the claude/report-indentation branch October 17, 2026 14:56
@pytooling-claude pytooling-claude Bot mentioned this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants