Skip to content

GeneratedPages: pages generated for a model of any domain - #67

Merged
Paebbels merged 3 commits into
devfrom
claude/generated-pages
Oct 22, 2026
Merged

Paebbels merged 3 commits into
devfrom
claude/generated-pages

Conversation

@pytooling-claude

Copy link
Copy Markdown

New Features

  • pyTooling.Sphinx.Pages:
    • New base-class GeneratedPages: pages generated for a model of any domain - what ReportPages had that doesn't depend on reports or domain report: the document names, Register, Generate, TableOfContents, and HasPages/GetPages/GenerateAll/HideSource over the class' registry _pages; new DocName(entity) and PagesID.
    • GeneratedPages._DOMAIN: the domain of the pages' objects, a class variable (report for ReportPages).
    • GeneratedPages._Registered(domain, docName, roleName, entity): registers an object in that domain after its page was generated; ReportPages adds the object's ReportEntry to domain report.
    • GeneratedPages._Fill(sphinxApplication, document, docName, roleName, entity): adds a page's content, by default the section of _Page. A domain writing its pages as reStructuredText overrides it and parses the text with GeneratedPages._ParseReST: the reST parser with the directives and roles of every domain, the document completed with the parser's defaults and Sphinx' docutils settings, and the transforms of Sphinx' reading applied (labels attach to sections) except the one emitting doctree-read, which Generate emits.
  • pyTooling.Sphinx.ReportEntry.anchor: an object shown by a part of a page; references, :any: and the inventory point to the anchor (a line anchor of a target, as in :cov:, still wins).

Changes

  • pyTooling.Sphinx.Pages.ReportPages derives from GeneratedPages; its API is unchanged: ReportID, Entry, CreateReference (now a classmethod using _DOMAIN), _Reference, _Title.
  • pyTooling.Sphinx.UnittestPages, pyTooling.Sphinx.CodeCoveragePages, pyTooling.Sphinx.DocCoverage: the registry of the report pages is _pages (was _reportPages, private).
  • The warning about a qualified name used twice names the pages (Pages '<ID>': ...) instead of the report.

Unit Tests

  • tests/unit/GeneratedPages.py: pages for a tree of dictionaries in domain py, built as nodes and written as reStructuredText - document names, navigation, a label and a py:function of a generated page referenced from another document - and the registry per derived class.
  • tests/unit/UnittestPages.py: a reference to an entry with an anchor, and its inventory entry.

Related Issues and Pull-Requests

  • Decision D5 of the VHDLDomain restart (Patrick): generalize ReportPages for any domain (domain as class variable, entries with anchors) in pyTooling.Sphinx first.
  • Consumer: Generated pages: a page per library and design unit VHDL/VHDLDomain#26 generates a page per library and design unit with it, written as reStructuredText, so the VHDL directives describe them. VHDLDomain needs a release with this pull-request (0.1.0rc7).

claude-code and others added 2 commits October 22, 2026 17:42
ReportPages split (Patrick, decision D5 of the VHDLDomain restart): GeneratedPages holds what doesn't depend on reports
or domain 'report' - the document names, Register, Generate, the tables of contents, HasPages/GetPages/GenerateAll/
HideSource over the class' registry '_pages' (was '_reportPages'), DocName(entity), PagesID. ReportPages derives from
it and keeps the report parts: ReportEntry per object, ReportID, Entry, CreateReference, _Reference, _Title.

- The domain of the pages' objects is the class variable '_DOMAIN' ('report' for ReportPages); after a page is
  generated, '_Registered(domain, ...)' registers its object (ReportPages: ReportDomain.AddEntry).
- '_Fill(...)' adds a page's content to its document, by default the section of '_Page'. A domain whose pages are
  written as reStructuredText - the VHDL domain's, running its directives - overrides it and parses the text with
  '_ParseReST': the reST parser with the directives and roles of every domain (sphinx_domains), the document completed
  with the parser's default settings and Sphinx' docutils settings, and the transforms of Sphinx' reading applied except
  DoctreeReadEvent (Generate emits 'doctree-read' itself).

Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
A reference, the ':any:' role and the inventory point to the entry's anchor, if it has one; a line anchor of a target
(':cov:`file#12`') still wins.

Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
@codacy-production

codacy-production Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 5 minor

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

Results:
5 new issues

Category Results
Documentation 3 minor
CodeStyle 2 minor

View in Codacy

🟢 Metrics 20 complexity · 0 duplication

Metric Results
Complexity 20
Duplication 0

View in Codacy

🟢 Coverage 96.64% diff coverage

Metric Results
Coverage variation Report missing for bc9296a1
Diff coverage ✅ 96.64% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (bc9296a) Report Missing Report Missing Report Missing
Head commit (23a59de) 4898 4303 87.85%

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 (#67) 119 115 96.64%

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%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

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 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.14563% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.62%. Comparing base (151a8b3) to head (4ce3540).
⚠️ Report is 7 commits behind head on dev.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
pyTooling/Sphinx/Pages.py 95.40% 3 Missing and 1 partial ⚠️
pyTooling/Sphinx/__init__.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #67      +/-   ##
==========================================
+ Coverage   85.51%   85.62%   +0.10%     
==========================================
  Files          24       24              
  Lines        4854     4898      +44     
  Branches      776      779       +3     
==========================================
+ Hits         4151     4194      +43     
- Misses        594      595       +1     
  Partials      109      109              
Flag Coverage Δ
unittests 85.62% <95.14%> (+0.10%) ⬆️

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.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread pyTooling/Sphinx/Pages.py Resolved
…phinx.domains in order.

Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
@Paebbels
Paebbels merged commit f856e78 into dev Oct 22, 2026
40 of 41 checks passed
@Paebbels
Paebbels deleted the claude/generated-pages branch October 22, 2026 19:17
@vhdl-claude vhdl-claude Bot mentioned this pull request Oct 23, 2026
@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

Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants