Repository navigation
Transfer the Sphinx extension from pyTooling - #2
Merged
Merged
Conversation
pyTooling.Documentation.Sphinx (pyTooling dev 47a7877b) becomes pyTooling.Sphinx, its stylesheet pyTooling.Resources.Sphinx becomes pyTooling.Sphinx.Resources; the domain 'gha' goes to pyTooling.GitHub. Code unchanged apart from the import paths, the version and the extras: Sphinx, xmlschema and pyTooling's 'pypi' extra are requirements now. pyTooling 10 isn't on PyPI yet, so it is installed from its 'dev' branch. doc/Documentation/Sphinx.rst becomes doc/Extension.rst; the documentation uses the extension itself. New smoke tests: registration, roles, substitutions, stylesheet. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
pyTooling.Sphinx.Resources' 'pyTooling.css' wasn't package data, so a build with the installed extension failed in 'installStylesheet'. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
This was referenced Oct 3, 2026
Merged
Paebbels
requested changes
Oct 3, 2026
* SphinxExtensionError, strip, stripAndNormalize and BaseDirective move from pyTooling.Sphinx.Directives into the package; setup() imports the directive modules, so they can import their base-class from the package. * Every file's banner spells pyTooling.Sphinx. * Imports aligned to the column the shorter module paths need. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
This was referenced Oct 3, 2026
Merged
pytooling-claude Bot
pushed a commit
that referenced
this pull request
Oct 16, 2026
The documentation is built with LuaLaTeX and the MiKTeX image's pytooling.sty, which
defines \emoji{<characters>} (Noto Color Emoji). The Emoji node's LaTeX visitor writes
\pyToolingEmoji{<characters>}{<shortcode>}; the preamble defines it as
\ifdefined\emoji\emoji{#1}\else:#2:\fi, so pdfLaTeX and a project without pytooling.sty
get the shortcode (the unused characters aren't expanded, so pdfLaTeX doesn't stop).
Non-ASCII runs are wrapped in \detokenize: pytooling.sty maps some characters to
\emoji via \newunicodechar, which nested \emoji calls and left U+FE0F in nullfont;
ASCII characters (a keycap's '#') are escaped instead, as \detokenize doubles '#'.
Checked with LuaLaTeX and Noto Color Emoji: single characters, U+FE0F, ZWJ
sequences, flags and keycaps render in color.
LineBreak's doc-string no longer claims '\\' ends a table row: Sphinx 9 wraps every
cell in varwidth. \newline{} stays, as it breaks the line in any environment.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
This was referenced Oct 17, 2026
Merged
Merged
Merged
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves pyTooling's Sphinx extension here, from pyTooling
dev47a7877b. pyTooling keeps its copy until the move is released.Changes
pyTooling.Documentation.Sphinx→pyTooling.Sphinx:CondensedClass,DependencyTable,Directives,Roles,SchemaGraph,Shields,XSDSchemaGraphand the extension'ssetup(). The stylesheetpyTooling.Resources.SphinxbecomespyTooling.Sphinx.Resources(package data since 7fe00fc). The domainghagoes to pyTooling.GitHub.__version__) and the extras:xmlschemaand pyTooling'spypiextra are requirements now, soDependencyTableimports Sphinx without a guard andxsd-graphnames no extra whenxmlschemais missing.requirements.txtinstalls it from GitHub:pyTooling[pypi] @ git+https://github.com/pyTooling/pyTooling.git@dev. PyPI rejects such a requirement - it becomespyTooling[pypi] ~= 10.0before the first upload.Documentation
doc/Documentation/Sphinx.rst→doc/Extension.rst. The documentation uses the extension itself (conf.py), andprolog.incis pyTooling's, as the extension registers the roles. References to pyTooling's pages and to theghadomain are links to their documentation.Unit Tests
pyTooling has no tests for this part- correction: it has, intests/unit/Documentation.py; they move in a pull-request of their own.tests/unit/Extension.pyadds smoke tests: the metadata, the roles and directivessetup()registers, the substitutions, rendering of the style roles and the stylesheet. 5 passed.Related Issues and Pull-Requests
devfirst - it installs pyTooling.Sphinx fromdev.