Repository navigation
Conversation
An entrypoint '{"pyproject": "../pyproject.toml"}' stands for the build
requirements of the file's '[build-system]' table (PEP 518), read by
pyTooling's PyProjectFile.Parse (pyTooling 10.1.0). The file is read while
conf.py is processed, like a requirements file: a missing or invalid file
ends the build with a message naming the entrypoint, an unparsable
requirement is a Sphinx warning, a file without '[build-system]' has no
build requirements. The field takes one path; a project has one
pyproject.toml file, so it has no plural form.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Packaging lists the build requirements of pyproject.toml through the new 'pyproject' entrypoint, Publishing the requirements of dist/requirements.txt, as on pyTooling's dependencies page. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
…dencyError pyTooling 10.0.0 renamed the extra 'pypi' to 'dependencies'. Three MissingDependencyError raises (requests, packaging) still advised 'pyTooling[pypi]', which installs nothing; #86 fixed only the aiohttp message. The directive page's attention box and a doc-string named the old extra too. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
…None
New configuration value 'pyTooling_ProjectRoot': the project's root
directory, relative to conf.py. Unset, it is the parent of conf.py's
directory, so 'doc/conf.py' needs no setting and 'docs/sphinx/conf.py'
sets '../..'.
The field 'pyproject' takes:
* True: 'pyproject.toml' in the project root;
* a path relative to the project root, e.g. 'package/pyproject.toml'
(an absolute path as it is);
* None: a project without such a file - nothing is read, the table is
empty.
False, an empty string and other types end the build with a message
naming the accepted values. readEntrypoints() takes the project root as
a third parameter; prepareEntrypoints() computes it.
The documentation's own entrypoint 'packaging' is '{"pyproject": True}'.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
…aging and Publishing sections (#88)
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
New directive options: * ':duplicates: Expanded | Collapsed | Reference' (default Collapsed): how a tree shows the dependencies of a duplicate - a package whose dependencies an earlier line of the table already shows. Collapsed folds them below a marker '... 17 dependencies, listed at sphinx' linking to that line; HTML unfolds them on a click (<details>, new nodes FoldedDependencies/FoldedSummary). Reference shows the marker alone. LaTeX, text, man and Texinfo get the marker without link (post-transform ReplaceFoldedDependencies). * ':duplicate-match: Exact | Subset | Name' (default Subset): same release and extras / same release and the original's extras or fewer / any. Every first-level row is an original, so a dependency listed in a row of its own links to that row; otherwise the first line in reading order is the original, also for a package two trees share further down. A line whose dependencies the depth limit cut off is no original. A duplicate keeps its own line (version constraint, license). A package is shown with its requirement's extras, sorted: 'pyTooling[dependencies]'. Several statements of a package in one entrypoint (files, '-r' includes, published packages, pyproject.toml) keep the last statement's constraint with the extras of all of them, as pip does. pyTooling.Sphinx's own documentation folds 16 duplicates; every link has a target. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
…items * DuplicateFormat and DuplicateMatch are StringEnums with DEFAULT (Collapsed, Subset), read by their Parse as option converters, like LegendPosition. The option values are lower case: ':duplicates: collapsed', ':duplicate-match: subset'. DEFAULT_DUPLICATE_FORMAT/-MATCH are gone. * Every bullet list of a dependency tree is marked 'compact'. docutils makes a list 'simple' only if each item is a paragraph and at most one list; an item with folded dependencies (paragraph + <details>) made the whole list non-simple, so the theme kept the paragraph margins of every line in it - the gaps around the fold and before the nested lists of its siblings. pyTooling.Sphinx's dependency page: all 27 trees are 'simple' now. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
The marker of a duplicate reads '… same 4 dependencies as listed at requests' (was '… 4 dependencies, listed at requests'), so it says these are the same dependencies as at the linked line. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
* An original's anchor is a readable ID on its whole table row or list
item: 'dependency-<entrypoint>-<package>' with the extras, e.g.
'#dependency-documentation-requests' (was a counted 'id7' on the text
line). It reads well in a URL and doesn't change when something earlier on
the page adds an ID. A second original of the same name gets '-2'; the ID
is registered with the document, which keeps it unique on the page.
* pyTooling.css: the row or list item a marker links to ('tr:target > td',
'li:target') is highlighted after the jump: its background fades from
Sphinx' highlight yellow to its own in 2.5 s (no 'to' keyframe, so a
theme's row stripe comes back). With 'prefers-reduced-motion: reduce' the
highlight stays. Custom property '--pyTooling-table-target-color'.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| UnusedCode | 1 minor |
| Documentation | 2 minor |
| CodeStyle | 6 minor |
| Complexity | 2 medium 1 minor |
🟢 Metrics 82 complexity · 0 duplication
Metric Results Complexity 82 Duplication 0
🟢 Coverage 87.79% diff coverage · +0.31% coverage variation
Metric Results Coverage variation ✅ +0.31% coverage variation (-1.00%) Diff coverage ✅ 87.79% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (1619c37) 5047 4477 88.71% Head commit (0fabb17) 5197 (+150) 4626 (+149) 89.01% (+0.31%) 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 (#89) 262 230 87.79% 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.
Like DuplicateFormat, DuplicateMatch and LegendPosition: a StringEnum with
DEFAULT, whose Parse is the option converter. A document writes the values in
lower case with dashes:
:version-format: major | major-minor (default) | major-minor-patch | all
:dependency-format: package | package-version | package-license |
package-version-license (default)
The member names (MajorMinor, PackageVersionLicense) were accepted before,
case-insensitive; no project here uses the two options outside this
documentation. DependencyTable._ParseFormatOption, its TypeVar and the module
constants DEFAULT_VERSION_FORMAT and DEFAULT_DEPENDENCY_FORMAT are removed;
the enums' __str__ returning the member name is gone, a member is its value.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
LegendStyle was a Flag (Table, Horizontal, Vertical and the combinations horizontal_table/vertical_table), read by BaseDirective._ParseEnumOption, which lower-cased the value and turned dashes into underscores. Only the two combinations were ever chosen, so it is a StringEnum now, like the other option enumerations: HorizontalTable = "horizontal-table" (DEFAULT), VerticalTable = "vertical-table". Its Parse is the option converter of report:code-coverage-legend and report:doc-coverage-legend; documents keep writing ':style: vertical-table'. The directives compare the member instead of testing bits. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Its only callers were the two coverage legends, which read LegendStyle with its Parse as option converter now. No other repository uses it. The TypeVar _EnumType and the imports of Enum, Flag and TypeVar go with it. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
==========================================
+ Coverage 86.72% 87.14% +0.42%
==========================================
Files 24 24
Lines 5047 5197 +150
Branches 804 833 +29
==========================================
+ Hits 4377 4529 +152
- Misses 570 571 +1
+ Partials 100 97 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The package's classifier changes from "3 - Alpha" to "5 - Production/Stable" for the v1.0.0 release. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
The extra required 'pyEDAA.Reports ~= 0.20.0rc1'; the unit tests and the documentation installed pyEDAA.Reports from its 'dev' branch. All three name the release v1.0.0 now, and the message of a missing pyEDAA.Reports when reading a code coverage report asks for '>= 1.0'. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
The News section is 'Version 1.x (2026)' (as pyTooling's News) with the topic v1.0.0, the first and stable release; release candidates aren't named. It names the requirements pyTooling 10.1 and, for the extra 'reports', pyEDAA.Reports 1.0. The wheel names on the installation page carry the version 1.0.0. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Note
The first release of pyTooling.Sphinx, a stable one (development status Production/Stable); these notes describe the whole release. It requires pyTooling v10.1.0 and, for the extra
reports, pyEDAA.Reports v1.0.0.First release of pyTooling.Sphinx: the Sphinx extension of the pyTooling family as a package of its own, with its repository infrastructure and pipeline. It was developed in pyTooling's
devbranch and moved here before any pyTooling release contained it; the domainreportcomes from sphinx-reports v0.11.2.New Features
The Sphinx extension moved from pyTooling's
pyTooling.Documentation.Sphinx(#2), code unchanged apart from import paths; everything else is new in this repository. Grouped by module of the namespace packagepyTooling.Sphinx:pyTooling.Sphinx(the extension'ssetup()and shared code):BaseDirective,SphinxExtensionError,strip(),stripAndNormalize()andextendProlog(), which appends the substitutions torst_prolog(Transfer the Sphinx extension from pyTooling #2).setup()installs the static files ofpyTooling.Sphinx.Resources(installStaticFiles(), unicode-table: icons with their Unicode names, code points and copy buttons #34) and, for LaTeX, the packagepyTooling.Sphinx.sty(installLaTeXPackage(), GitHub-flavoured Markdown converted into docutils nodes #38); it loadssphinx.ext.graphvizandsphinx.ext.imgconverter(GitHub-flavoured Markdown converted into docutils nodes #38).report, transferred from sphinx-reports v0.11.2 (Transfer the 'report' domain from sphinx-reports into pyTooling.Sphinx #20):ReportDomain,ReportExtensionError,ReportsPackageMissingError,LegendStyle- aStringEnum(HorizontalTable,VerticalTable) instead of sphinx-reports'Flag, documents keep writing:style: horizontal-table | vertical-table(Option enumerations as StringEnum: VersionFormat, DependencyFormat, LegendStyle #91); configuration values renamed topyTooling_Unittest_Testsuites,pyTooling_CodeCoverage_Packages,pyTooling_CodeCoverage_Levels,pyTooling_DocCoverage_Packages,pyTooling_DocCoverage_Levels. The new extrareportsinstallspyEDAA.Reports; it is imported only when a report is read, and its absence is reported with an install hint. Fixes the legends'NameErrorin stylehorizontal-tableand the empty message of an invalidlevels.reportserves any role referring to objects of reports with pages (Share the page machinery of the unit test reports with other reports #25):ReportEntry,ReportRole,REPORT_ROLES,AddEntry()/FindEntries(); it takes part in a parallel build (sphinx-build -j N):ReportDomain.merge_domaindata(Let the report domain take part in a parallel build #24).NODES, as sphinx-reports registersLandscape(Draw a hierarchy as a tree with the 'tree' directive #18).setLaTeXDefaults()(LaTeX defaults: table style 'booktabs' and a list depth of 10 #43): setslatex_table_style = ["booktabs"](Sphinx' default addscolorrows, which stops a PDF build with MiKTeX in the first table) andlatex_elements["maxlistdepth"] = "10"(atreedeeper than LaTeX' 4 list levels), unlessconf.pyor-Dsets them.pyTooling.Sphinx.Abbreviation(List abbreviations with the 'abbreviations' directive, and refer to them like LaTeX' acro #19): directiveabbreviationsand roles:acs:,:acl:,:acf:and their plurals, named as in LaTeX'acro- a list of abbreviations with long form, plurals and an optional description; a role writes the form it names and links to the list. In HTML, a short form shows its long form - optionally the description's summary (pyTooling_Abbreviation_ShowSummary) - in a box on hover. The list is sorted alphabetically unless:ordered: no. Domainabbreviationcollects the lists of all documents.pyTooling.Sphinx.CodeCoverage: directivesreport:code-coverageandreport:code-coverage-legend(Transfer the 'report' domain from sphinx-reports into pyTooling.Sphinx #20).report:code-coveragereads Cobertura XML or coverage.py's JSON through pyEDAA.Reports' format models;report:file-coveragereplaces the prototypereport:module-coverage(Code coverage pages per directory and source file, with a highlighted listing and the role ':cov:' #26). A package'slevelsmay be a palette of its own, a dictionary checked like the palettes inpyTooling_CodeCoverage_Levels(Coverage levels declared as a dictionary per package #42).pyTooling.Sphinx.CodeCoveragePages(Code coverage pages per directory and source file, with a highlighted listing and the role ':cov:' #26): a report declared withpagesandsourcesgets a page per directory (coverage, tables of its directories and files) and per file (coverage, missed lines, and the source as a listing highlighted by Pygments, each line marked covered, partial, uncovered or excluded, in HTML and LaTeX); the role:cov:links a file or directory page.pyTooling.Sphinx.CondensedClass: directivecondensed-class(CondensedClass, Transfer the Sphinx extension from pyTooling #2).pyTooling.Sphinx.CondensedSource(Documentation coverage: a page per package and module, with a condensed listing #35): the condensed listing of a source file for the documentation coverage pages, each declaration marked by its documentation state - also fields, module variables, protected and private names, and assignments insideif/try(Documentation coverage on pyEDAA.Reports' language-neutral model #39).pyTooling.Sphinx.DependencyTable: directivedependency-table(DependencyTable, Transfer the Sphinx extension from pyTooling #2).DependencyCollector.UnresolvedLicensesis keyed by the canonical package name, so a package whose license needs an override is reported once, under the key the override file is looked up by (Report a package needing a license override once, by its canonical name #15).:depth:says so (Mark a dependency tree the depth limit cut off #28): a package whose own dependencies the limit cuts off gets a line … N more dependencies not expanded.-r, and every warning of a release's details other than an unknown license are reported as Sphinx warnings with entrypoint, file and line (Report broken requirements in dependency tables as Sphinx warnings #31).UnsupportedVersionWarningfor a release version it can't parse, are collected and reported as Sphinx warnings[dependency-table](DependencyTable: warnings from loading a project are reported, not raised #52).RequirementsFile.Parse(path)(Dependency: 'RequirementsFile.Parse' reads a requirements file pyTooling#585);RequirementsFile(path)builds an empty requirements file (DependencyTable: requirements files are read by 'RequirementsFile.Parse' #53).DependencyCollector.Seconds) are read from pyTooling'sStopwatch.DurationInSecondsandStopwatch.ActivityInSeconds, as pyTooling v10.0.0-rc4 makesStopwatch.Durationatimedelta(DependencyTable: read stopwatch durations as float or timedelta #58, DependencyTable: durations from the InSeconds properties #61).Resolver(Dependency: a Resolver resolves requirements into the releases to install pyTooling#598, Dependency: the resolver evaluates markers and reads requirements files and packages pyTooling#599, Resolver: the current Timeout limits a resolution pyTooling#606) with the eager strategy (DependencyTable: requirements are resolved by pyTooling's Resolver #62)::depth:is the resolver's limit (0, the default, is unlimited), and every level is downloaded in parallel before the table is rendered. A dependency closing a cycle isn't listed, dependencies below the limit become the marker, and a requirement not resolved to a release shows not evaluated. A requirement naming extras lists their requirements too, as an installer installs them. A package entrypoint ({"package": "pyTooling[yaml]"}) is read withResolver.ResolvePackages.DependencyCollector.Resolve()andPublishedRequirements();ResolutionCountcounts the resolutions against the package index. AnUnknownLicenseWarningnames its project since pyTooling v10.0.0-rc5 (ProjectName, Dependency: release warnings carry the project name and version pyTooling#608), whichUnresolvedLicensesis keyed by.pyTooling_Dependency_PackageOverrides) is read with pyTooling'syamlextra; without it, the build ends with aSphinxExtensionErrorthat namespip install pyTooling[yaml](A license override file needs pyTooling's 'yaml' extra #76).dependencies(pyTooling 10.0.0 renamedpypi); without its clientaiohttp, the build ends with aSphinxExtensionErrorthat namespip install pyTooling[dependencies](Require pyTooling 10.0.0 and adapt to it #85, Dependency table: name pyTooling's extra 'dependencies' #86); withoutrequestsorpackaging, theMissingDependencyErrornames the same extra (dependency-table: entrypoint 'pyproject' for build requirements; Packaging and Publishing sections #88). EveryUnknownLicenseWarningis reported with its project, which pyTooling 10.0.0 requires (Require pyTooling 10.0.0 and adapt to it #85).pyproject(dependency-table: entrypoint 'pyproject' for build requirements; Packaging and Publishing sections #88): the build requirements of apyproject.tomlfile's[build-system]table (PEP 518), read by pyTooling'sPyProjectFile.Parsewhileconf.pyis processed.Truereadspyproject.tomlin the project's root directory, a string is a path relative to that directory,Nonedeclares a project without such a file (an empty table). The root is the new configuration valuepyTooling_ProjectRoot, relative toconf.py; unset, it is the parent ofconf.py's directory. A missing or invalid file ends the build with a message naming the entrypoint; an unparsable requirement is a Sphinx warning.:duplicates: expanded | collapsed | reference(defaultcollapsed) shows its dependencies again, folds them below a marker … same 17 dependencies as listed at sphinx (HTML unfolds them on a click), or shows the marker alone. Option:duplicate-match: exact | subset | name(defaultsubset) decides when a line is a duplicate: same release and extras, same release and the earlier line's extras or fewer, or any. Every package of the first column is an original, otherwise the first line in reading order; a line whose dependencies:depth:cut off is none. The marker links to a readable ID on the original's row or list item,#dependency-<entrypoint>-<package>; HTML highlights the target after the jump, fading from Sphinx' highlight yellow (--pyTooling-table-target-color), static with reduced motion. LaTeX, text, manual pages and Texinfo show the marker as text.:version-format: major | major-minor | major-minor-patch | all(defaultmajor-minor) and:dependency-format: package | package-version | package-license | package-version-license(defaultpackage-version-license), read by theStringEnumsVersionFormatandDependencyFormat; an unknown value is an invalid option value with the allowed values listed (Option enumerations as StringEnum: VersionFormat, DependencyFormat, LegendStyle #91).pyTooling[dependencies]. Several statements of one package in an entrypoint keep the last statement's constraint with the extras of all of them, as pip does (dependency-table: fold duplicate dependencies; show and merge extras #90).pyTooling.Sphinx.DocCoverage: directivesreport:doc-coverageandreport:doc-coverage-legend(Transfer the 'report' domain from sphinx-reports into pyTooling.Sphinx #20).pagesgets a page per package and module with a condensed listing of the source; role:doccov:;DocCoverageReportPages(Documentation coverage on pyEDAA.Reports' language-neutral model #39).levelsmay be a palette of its own, checked like the palettes inpyTooling_DocCoverage_Levels(Coverage levels declared as a dictionary per package #42).pyTooling.Sphinx.ExternalLink(External link icons #36): an icon behind each external link in HTML, chosen by its host - GitHub, GitLab, Python (also PyPI), NumPy, PyPy, pytest, Pydantic, Read the Docs, Sphinx -, an envelope for an e-mail address, a square with an arrow otherwise; a:download:link gets a download icon, an archive (.zip,.tar.gz,.tar.zst, …) a zipper icon. Links open in a new tab; download links show their size, other sites' files only from an allow-list (pyTooling_ExternalLink_*); sphinx_rtd_theme's own download glyph is hidden.pyTooling.Sphinx.GitHubMarkdownandpyTooling.Sphinx.Markdown(GitHub-flavoured Markdown converted into docutils nodes #38): GitHub-flavoured Markdown converted into docutils nodes -GitHubMarkdown(owner, repository, ...)with markdown-it-py and the GFM plugin: headings as topics, GitHub alerts as admonitions, task lists, tables, footnotes, raw HTML converted (never passed through), every line break a break as in release notes; GitHub references (#123,owner/repo#123,@user, commit hashes) linked byParse; emoji shortcodes and characters asEmojinodes from github/gemoji's table (MIT); shields.io badges fetched as PNG in LaTeX, other SVG images converted bysphinx.ext.imgconverter(ImageMagick).pyTooling.Sphinx.Node,pyTooling.Sphinx.HTML,pyTooling.Sphinx.LaTeX: node classes (RegisteredNode,visitFunc,departFunc) and their visitors per output format (Draw a hierarchy as a tree with the 'tree' directive #18).Landscape(LaTeXlandscapeenvironment, Transfer the 'report' domain from sphinx-reports into pyTooling.Sphinx #20); the tree's nodes (Draw a hierarchy as a tree with the 'tree' directive #18, tree: descriptions in a second column #29, tree: a legend explaining the icons #32);CopyButton(unicode-table: icons with their Unicode names, code points and copy buttons #34);CoverageListing(Code coverage pages per directory and source file, with a highlighted listing and the role ':cov:' #26),DocCoverageListing(Documentation coverage: a page per package and module, with a condensed listing #35);Emoji,TaskListCheckbox,LineBreak(GitHub-flavoured Markdown converted into docutils nodes #38).ReportIndentation(Report tables indent a name by markup instead of em quads #45): a report table indents a name by markup - in HTML a padding of--pyTooling-report-indentationper step (CSS custom property, default1em), in LaTeX\pyToolingReportIndentation, which sets\leftskipby\pyToolingReportIndentationStepper step; a wrapped name stays at its indentation. The em quads before a name (sphinx-reports' indentation) were a line-break opportunity, so a deep name wrapped below its indentation in a narrow column, and they were copied with the name.pyTooling.Sphinx.Pages(Share the page machinery of the unit test reports with other reports #25, GeneratedPages: pages generated for a model of any domain #67, GeneratedPages is generic in the type of its objects #72):GeneratedPages, the page machinery for a model of any domain - document names, registration, generation, navigation,HasPages()/GetPages(),DocName(); the domain of the pages' objects as class variable_DOMAIN, registration by_Registered(), and pages written as reStructuredText by_Fill()and_ParseReST()(the directives and roles of every domain, Sphinx' reading transforms).ReportPagesderives from it: aReportEntryper object,CreateReference(). Both are generic in the type of the model's objects (type variableEntityType): a derived class names it as the type argument, e.g.GeneratedPages[Library | DesignUnit]; the pages of the unit test, code coverage and documentation coverage reports name theirs (GeneratedPages is generic in the type of its objects #72).pyTooling.Sphinx.ReportEntry.anchor(GeneratedPages: pages generated for a model of any domain #67): an object shown by a part of a page; references and the inventory point to the anchor.pyTooling.Sphinx.Resources: the stylesheetpyTooling.css(Transfer the Sphinx extension from pyTooling #2), the scriptpyTooling.jsof the copy buttons (unicode-table: icons with their Unicode names, code points and copy buttons #34), the LaTeX packagepyTooling.Sphinx.styfor:strike:/:underline:and the report indentation (GitHub-flavoured Markdown converted into docutils nodes #38, Report tables indent a name by markup instead of em quads #45), GitHub's emoji tableGitHubEmoji.txt(GitHub-flavoured Markdown converted into docutils nodes #38).pyTooling.Sphinx.Roles: the style and break roles (Transfer the Sphinx extension from pyTooling #2).pyTooling.Sphinx.SchemaGraphandpyTooling.Sphinx.XMLSchemaGraph: directivexmlschema-graph(XMLSchemaGraph, on the language-neutralSchemaGraph, Rename the directive xsd-graph to xmlschema-graph #7; option:package:draws a package's resource file, Draw a schema shipped in a package with 'xmlschema-graph' #23).DotGraphis apyTooling.Graph.GraphViz.Graphwith the shared look,AddRecord()andGetOrAddNode()(Build the schema graph on pyTooling.Graph.GraphViz #4).pyTooling.Sphinx.Shields: directiveshields(Shields, Transfer the Sphinx extension from pyTooling #2, Escape '-' and '_' in the 'github' badge #22).pyTooling.Sphinx.Tree: directivetree(Tree, Draw a hierarchy as a tree with the 'tree' directive #18) - a hierarchy written as an indented list, drawn as a tree. An entry's text is inline ReST, so roles link; markers choose an icon per entry (-by kind: root, node, leaf; more declared by:icons:);:expanded-levels:sets what is expanded initially. HTML draws each entry with children as a foldable<details>element, and the stylesheet draws the lines; other builders write a nested bullet list. An entry may have a description behind|, drawn as a second, aligned column (tree: descriptions in a second column #29). Legend (tree: a legend explaining the icons #32): an icon option takes a text behind|;:legend:(LegendPosition:top,bottom- default -,hidden) draws a legend of the icons above or below the tree; formats drawing no icons get none (RemoveTreeLegends).pyTooling.Sphinx.UnicodeTable(unicode-table: icons with their Unicode names, code points and copy buttons #34): directiveunicode-table- icons with their Unicode names and code points, each with a copy button in HTML;CodePointandCodePointType; LaTeX writes the table without the icons' column (RemoveUnicodeGlyphs).pyTooling.Sphinx.Unittest: directivereport:unittest-summary(Transfer the 'report' domain from sphinx-reports into pyTooling.Sphinx #20). Reports in pyTooling's XML format (<TestReport>) are read besides JUnit XML (Pages per testsuite and testcase, and the roles ':tc:' and ':ts:' #21).Column,ColumnGroup), the base-classUnittestSummaryBasefor a derived table - e.g. pyEDAA.OSVVM's build summary - and its pages, and roles of a derived domain.:legend: top | bottom | none, also for derived tables.pyTooling.Sphinx.UnittestPages(Pages per testsuite and testcase, and the roles ':tc:' and ':ts:' #21): a unit test report declared withpagesgets a page per testsuite and testcase, generated without source files: status, counts, duration, the message and details of a failure, the captured standard output and standard error, and a pyTooling report's title, summary and description. The summary table links to them, and they are in the navigation below the summary's document.UnittestReportPagesderives fromReportPages(Share the page machinery of the unit test reports with other reports #25). Roles:tc:and:ts:(also:report:tc:,:report:ts:) refer to a testcase or testsuite by qualified name, a unique suffix of it, and an optional report ID.pyTooling.Sphinx.Workaround:FixLatexTableWidths, so LaTeX keeps the column widths a report table states (Transfer the 'report' domain from sphinx-reports into pyTooling.Sphinx #20).setup.py,pyproject.toml) as for pyEDAA.Reports, a namespace package next to pyTooling: Python 3.12 to 3.15 (Sphinx 9.1 requires Python 3.12; Python 3.15 and pyTooling/Actions@r9 #40), development status Production/Stable (Prepare v1.0.0: Production/Stable, pyEDAA.Reports ~= 1.0, News #96), classifiersFramework :: Sphinx :: DomainandFramework :: Sphinx :: Extension(Classifiers for the Sphinx domain #63), requirementspyTooling[dependencies] >= 10.1.0, < 11.0(DependencyTable: requirements files are read by 'RequirementsFile.Parse' #53, DependencyTable: requirements are resolved by pyTooling's Resolver #62, Requires pyTooling v10.0.0-rc6 #64, Require pyTooling 10.0.0 and adapt to it #85, Require pyTooling 10.1 #87),sphinx >= 9.1,xmlschema ~= 4.3; extrareports:pyEDAA.Reports ~= 1.0(Prepare v1.0.0: Production/Stable, pyEDAA.Reports ~= 1.0, News #96); extramarkdown:markdown-it-py ~= 4.2,mdit-py-plugins ~= 0.6(GitHub-flavoured Markdown converted into docutils nodes #38) (all from PyPI; Requirements from PyPI for the v0.1.0rc1 release #37, Documentation coverage on pyEDAA.Reports' language-neutral model #39). The wheel has nopyTooling/__init__.py, so thepyToolingnamespace stays open for pyTooling and its sibling distributions.pyTooling/Sphinx/__init__.py:__version__ = "1.0.0", author, copyright, license, keywords and project URLs.Breaking Changes
Warning
Migrating from sphinx-reports v0.11.2: pyTooling.Sphinx takes over its domain
report(#20). These items break a documentation set up for sphinx-reports; a project new to pyTooling.Sphinx isn't affected.pip install sphinx-reports→pip install pyTooling.Sphinx[reports];extensions = ["sphinx_reports"]→extensions = ["pyTooling.Sphinx"].conf.py:report_unittest_testsuites→pyTooling_Unittest_Testsuites,report_codecov_packages→pyTooling_CodeCoverage_Packages,report_codecov_levels→pyTooling_CodeCoverage_Levels,report_doccov_packages→pyTooling_DocCoverage_Packages,report_doccov_levels→pyTooling_DocCoverage_Levels(Transfer the 'report' domain from sphinx-reports into pyTooling.Sphinx #20).report:module-coverage→report:file-coverage(Code coverage pages per directory and source file, with a highlighted listing and the role ':cov:' #26).report:dependency-tableis removed; the directivedependency-table(Transfer the Sphinx extension from pyTooling #2) renders an entrypoint's requirements, configured inconf.py.LegendStyleis aStringEnumwith the membersHorizontalTableandVerticalTable, no longer aFlagwithhorizontal_tableandvertical_table; code using its members uses the new names. Documents keep:style: horizontal-table | vertical-table(Option enumerations as StringEnum: VersionFormat, DependencyFormat, LegendStyle #91).Documentation
reportsandmarkdownare rendered bydependency-tablefrom the package index; the sentence above each table says what its packages are used for. The tables show the extras of the latest release on PyPI. New sections Packaging, the build requirements ofpyproject.toml(entrypointpyproject), and Publishing,dist/requirements.txt(dependency-table: entrypoint 'pyproject' for build requirements; Packaging and Publishing sections #88).NOTICE.md(NOTICE.md: content of other projects and their licenses #41): content of other projects with source and license - GitHub's emoji table from github/gemoji (MIT) in the package, release notes of GHDL, OSVVM and pyTooling as test data; the README's License section links it, anddoc/Dependency.rstlists the bundled data under the extramarkdownand the test data under the test dependencies (rubric Test Data). Dependency page: the extramarkdownand image conversion with ImageMagick (GitHub-flavoured Markdown converted into docutils nodes #38).levelsas a dictionary (Coverage levels declared as a dictionary per package #42).doc/(Restructure the documentation #8): a landing page with the badges (including Codacy's), the Python 3.12 requirement, the setup inconf.py, an overview of the roles and directives, contributors and license; News, Installation, Dependencies (rendered withdependency-table), Competing Solutions (Move the competing solutions to a page of their own #9); a page per role group and per directive (jsonschema-graphas planned); the class reference and the reports of unit tests, code and documentation coverage and static type checking; Glossary and TODOs. The documentation uses its own roles and directives.FEATURES, as in pyTooling.GitHub and pyEDAA.CLITool (Label the roles and directives 'FEATURES' #12).--pyTooling-report-indentationand\pyToolingReportIndentationStep(Report tables indent a name by markup instead of em quads #45).attentionbox, and the reader-facing items of these notes.ghactions(Name pyTooling.GitHub's Sphinx domain 'ghactions' #13).ghrole (Link GitHub repositories with the 'gh' role #17).treedirective, with examples, the content rules, the options and the CSS custom properties (Draw a hierarchy as a tree with the 'tree' directive #18); descriptions, with the code coverage data model as example (tree: descriptions in a second column #29).abbreviationsdirective and its roles, with rendered examples, the configuration value and the CSS custom properties (List abbreviations with the 'abbreviations' directive, and refer to them like LaTeX' acro #19).:tc:/:ts:, with a JUnit and a pyTooling example report rendered with pages; the navigation has no depth limit (Pages per testsuite and testcase, and the roles ':tc:' and ':ts:' #21).sourcesandpages, the listing's states, the role,report:file-coverage, examples rendered from coverage.py and VHDL fixtures; the documentation's own code coverage report gets pages (Code coverage pages per directory and source file, with a highlighted listing and the role ':cov:' #26).dependency-table: the:depth:option describes the marker (Mark a dependency tree the depth limit cut off #28); how the requirements are resolved - newest matching release, pre-releases, extras, cycles, parallel downloads (DependencyTable: requirements are resolved by pyTooling's Resolver #62); reading the license override file needs pyTooling'syamlextra (A license override file needs pyTooling's 'yaml' extra #76).doc/requirements.txtrequiresruamel.yaml ~= 0.19for the documentation's own override file (A license override file needs pyTooling's 'yaml' extra #76). The entrypoint fieldpyprojectand the configuration valuepyTooling_ProjectRoot(dependency-table: entrypoint 'pyproject' for build requirements; Packaging and Publishing sections #88). The options:duplicates:and:duplicate-match:, the anchors and the highlight; extras (dependency-table: fold duplicate dependencies; show and merge extras #90).DIR/UnittestSummary/Deriving: a derived directive, the base-class, the page hooks, a derived domain; Unit test summary: column definitions, a base-class for derived tables and pages, roles of derived domains #80) and Legend (labelDIR/UnittestSummary/Legend: the symbols and their statuses, optionlegend, the legend's CSS classes in Styling; Unit test summary: a legend of the status symbols #81); News items for both.pyTooling.Sphinx.DependencyTable: a comment and five:raises MissingDependencyError:fields name the extradependencies(Dependency table: name pyTooling's extra 'dependencies' #86).treelegend (tree: a legend explaining the icons #32), theunicode-tabledirective with the icons a tree commonly uses (unicode-table: icons with their Unicode names, code points and copy buttons #34), the documentation coverage pages (Documentation coverage: a page per package and module, with a condensed listing #35) and the external link icons (External link icons #36); the documentation uses all of them, intersphinx links included.doc/Dependency.PackageOverrides.yaml: docutils isBSD-2-Clause AND BSD-3-Clause; the eLyXer-derived files were relicensed as BSD-2-Clause (Correct docutils' license in the override file #16). The entry for sphinx-reports is removed: no table lists it any more (sphinx-reports: last mentions outside the release notes #77).pyTooling.Sphinx.DependencyTable's module doc-string compares the declaration of entrypoints with this package's domainreportinstead ofsphinx_reports.run.ps1(from pyTooling; builds the documentation withsphinx.cmd.builddirectly, so there is nodoc/make.bat).README.mdfollows the landing page - summary, requirements, setup, roles and directives, consumers (Align the README with the landing page #11) - with the Codacy badges;LICENSE.md(Apache 2.0).Unit Tests
tests/unit/Extension.py: smoke tests of the metadata, the roles, directives and nodessetup()registers, the substitutions, the style roles and the stylesheet;treebuilt as HTML and LaTeX (Draw a hierarchy as a tree with the 'tree' directive #18).tests/unit/GeneratedPages.py: pages of another domain, built as nodes and written as reStructuredText - labels and objects of a generated page referenced from another document (GeneratedPages: pages generated for a model of any domain #67); the test project's pages derive fromGeneratedPages[dict](GeneratedPages is generic in the type of its objects #72).tests/unit/Tree.py: thetreedirective's content parser and icon options (Draw a hierarchy as a tree with the 'tree' directive #18), and its descriptions (tree: descriptions in a second column #29).tests/unit/Abbreviation.pyandtests/unit/Extension.py: the abbreviation forms, the domain, and built lists and roles in HTML and LaTeX (List abbreviations with the 'abbreviations' directive, and refer to them like LaTeX' acro #19).tests/unit/CodeCoverage.py,Unittest.py,Reports.py: the configuration checks, and builds in HTML and LaTeX, also withoutpyEDAA.Reportsinstalled (Transfer the 'report' domain from sphinx-reports into pyTooling.Sphinx #20).tests/unit/UnittestPages.py: the generated pages, the navigation, the roles, the domain data and a LaTeX build (Pages per testsuite and testcase, and the roles ':tc:' and ':ts:' #21).tests/unit/CodeCoveragePages.py: document names, compacted directories, file and directory pages, navigation, LaTeX and the role:cov:; fixtures intests/data/CodeCoverage/(Code coverage pages per directory and source file, with a highlighted listing and the role ':cov:' #26).tests/unit/SchemaGraph.py: the schema graph and thexmlschema-graphrendering (Build the schema graph on pyTooling.Graph.GraphViz #4).tests/unit/DependencyTable.pyandtests/unit/Shields.py: pyTooling's testcases ofDependencyTableandShields, moved (Move pyTooling's testcases of DependencyTable and Shields #5).@testsuite/@testcase, with a title and a doc-string of what and how it checks (Mark the testcases with @testsuite and @testcase #6).tests/unit/DependencyTable.py: broken requirement lines and warnings of a release's details (Report broken requirements in dependency tables as Sphinx warnings #31); warnings from loading a project (DependencyTable: warnings from loading a project are reported, not raised #52); trees built from resolved requirements with their statuses, and the reporting of unresolved licenses and other warnings (DependencyTable: requirements are resolved by pyTooling's Resolver #62).tests/unit/DependencyTable.py:PackageOverrides.YAMLExtraMissing- the override file withoutruamel.yaml(A license override file needs pyTooling's 'yaml' extra #76).tests/unit/Unittest.py,UnittestPages.py,Reports.py: columns and column groups with their parameter checks, a derived directive with a column group, derived pages, a derived domain with its own role (Unit test summary: column definitions, a base-class for derived tables and pages, roles of derived domains #80); the legend below/above/without, an unknown position, LaTeX, and every status symbol listed exactly once (Unit test summary: a legend of the status symbols #81).tests/unit/DependencyTable.py: the warnings the tests create pass the project name and version pyTooling 10.0.0 requires; the testcase Unnamed project is removed, as such a warning can't be created anymore (Require pyTooling 10.0.0 and adapt to it #85).tests/unit/DependencyTable.py:pyprojectentrypoints - build requirements, a file without[build-system], an unparsable requirement, a missing file, invalid TOML,[build-system]withoutrequires,True, a path below the project root, an absolute path,None, and the rejected values; testsuite Project root: the default andpyTooling_ProjectRoot(dependency-table: entrypoint 'pyproject' for build requirements; Packaging and Publishing sections #88); testsuites Duplicate dependencies (modes, matching, depth limit, readable anchors, compact lists, formats without folding) and Extras (display and merging) (dependency-table: fold duplicate dependencies; show and merge extras #90).tests/unit/Tree.py: the legend (tree: a legend explaining the icons #32);tests/unit/UnicodeTable.py: content, names, code points (unicode-table: icons with their Unicode names, code points and copy buttons #34);tests/unit/DocCoverage.py(Documentation coverage: a page per package and module, with a condensed listing #35, Documentation coverage on pyEDAA.Reports' language-neutral model #39: the new model, documentation states, unreadable files,if/tryassignments);tests/unit/ExternalLink.pyandtests/unit/Download.py: link marking, icons, new tab, download sizes with a local HTTP server (External link icons #36).tests/unit/Extension.py: the LaTeX defaults, set inconf.pyand on the command line (LaTeX defaults: table style 'booktabs' and a list depth of 10 #43);tests/unit/CodeCoverage.py,tests/unit/DocCoverage.py:levelsas a dictionary (Coverage levels declared as a dictionary per package #42).tests/unit/Shields.py: the escapedgithubbadge (Escape '-' and '_' in the 'github' badge #22);tests/unit/Extension.py: a parallel build with two processes (Let the report domain take part in a parallel build #24);tests/unit/Reports.py: indented names in HTML and LaTeX (Report tables indent a name by markup instead of em quads #45).tests/unit/requirements.txt:pytest-xdist ~= 3.8; pyTooling/Actions@r9 runs the unit tests with pytest-xdist workers, as[tool.coverage.run]setspatch = ["subprocess"], so Coverage.py measures the workers (pytest-xdist for the unit tests #47, Coverage.py follows subprocesses: unit tests with pytest-xdist workers #57). A parallel Sphinx build ignores Python's warning aboutfork()in a multi-threaded process, as a pytest-xdist worker is one;pyproject.tomlturned it into an error (pytest-xdist for the unit tests #47).GitHub Pipeline
Pipeline.ymlonCompletePipeline.yml@r9(Add the pipeline #3, Python 3.15 and pyTooling/Actions@r9 #40): Python 3.12 to 3.15 on Linux, macOS and Windows, packaging, installation, documentation, static type check, Bandit, test reports, coverage to Codecov and Codacy, GitHub Pages.coverage_html: 'false': coverage.py's HTML report doesn't overwrite the documentation's own code coverage pages belowcoverage/on GitHub Pages (Python 3.15 and pyTooling/Actions@r9 #40).dist/requirements.txt(wheel,twine): the PyPI release job installs it from the package artifact (dist/requirements.txt for the PyPI release job #46).dev, labeledDependencies(Dependabot for Python packages and GitHub Actions #66). Its first updates:coverage ~= 7.17,mypy ~= 2.4,sphinx_autodoc_typehints ~= 3.17([Dependabot]: Update coverage requirement from ~=7.15 to ~=7.16 #68, [Dependabot]: Update mypy requirement from ~=2.3 to ~=2.4 #69, [Dependabot]: Update sphinx-autodoc-typehints requirement from ~=3.13 to ~=3.17 #70, [Dependabot]: Update coverage requirement from ~=7.16 to ~=7.17 #84), the build requirementsetuptools >= 84.2.0inpyproject.toml([Dependabot]: Update setuptools requirement from >=84.0.0 to >=84.2.0 #73), andsphinx >= 9.1.1([Dependabot]: Update sphinx requirement from >=9.1 to >=9.1.1 #74) - not~= 9.2, as Sphinx 9.2 requires Python 3.13 and pyTooling.Sphinx supports Python 3.12 to 3.15.Known Issues
pylintis off (~550 messages on code pyTooling never ran pylint on).Others
f"…"became"…"(2 strings indoc/conf.py); every string keeps its value (f-strings without placeholder are plain strings #56).from <module> importstatement per module and scope, continued by\(403 → 354 import statements);pyTooling.Sphinx.DependencyTableimportsDependencyError,UnknownLicenseandSPDXLicenseat module level instead of per call (One import statement per module #75).Related Issues and Pull-Requests
pyTooling.Graph.GraphViz.DependencyTableandShields.@testsuiteand@testcase.xsd-graphrenamed toxmlschema-graph.FEATURES.ghactions(with Rename the Sphinx domain 'gha' to 'ghactions' pyTooling.GitHub#11).ContainsNode(after Name membership tests 'Contains***' pyTooling#484).ghrole (with Link GitHub repositories, issues and runs with the 'gh' role pyTooling.GitHub#13).treedirective.abbreviationsdirective and its roles.reportof sphinx-reports.:tc:and:ts:.githubbadge escapes-and_of organization and repository.xmlschema-graphdraws a schema shipped in a package (:package:).reporttakes part in a parallel build (merge_domaindata).tree: descriptions in a second column.:cov:.tree: a legend explaining the icons.unicode-tabledirective.treeentry alias without type arguments.RequirementsFile.Parse.dependency-tablereads stopwatch durations as float or timedelta.getTypeName.DependencyTable: durations from theInSecondsproperties.DependencyTable: requirements are resolved by pyTooling'sResolver.coverage,mypy,sphinx_autodoc_typehints,setuptools,sphinx.GeneratedPages: pages generated for a model of any domain (Generated pages: a page per library and design unit VHDL/VHDLDomain#26 uses it).GeneratedPagesis generic in the type of its objects.yamlextra.:raises:field per parameter inShield.__init__.coverage ~= 7.17.dependencies(pyTooling 10.0.0 renamedpypi), and anUnknownLicenseWarningalways names its project.dependency-tableerror for a missing package index client names pyTooling's extradependencies.pyprojectfor build requirements, configuration valuepyTooling_ProjectRoot; sections Packaging and Publishing; the extradependenciesin everyMissingDependencyError.StringEnum:VersionFormat,DependencyFormat,LegendStyle.reportsrequires pyEDAA.Reports 1.0, News and installation pages for v1.0.0.pyTooling.GitHubandpyTooling.Sphinx.