Repository navigation
Conversation
… sections The concept-to-code tables of brouwer_zimmermann_code.md and connected_cluster.md, and README "Where to look", now name modules, classes, functions, and fields of SearchTuning or Certificate. A parameter, local, or private attribute is dropped only where the docstring of the function or class that owns it describes it, and the cell points to that function or class instead. A new test in _readme_test.py checks that each section that the package cites by number exists in the guide that the citation refers to, including citations that break across lines, and that each anchor of a link into the guides, from a Markdown file of the repository, names a heading. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Motivation
The guides of
qldpc.codes.distancemap the symbols and concepts of their algorithms to the code that implements them. Some cells of those maps name the parameters and locals of compiled kernels, such asmemos,stamp,resume, andfrontier_depthof the connected-cluster search, andbest,support, andprefixesof the Brouwer-Zimmermann scans, so that every restructuring of a kernel has to edit the guides too. Separately, the package's modules and guides cite guide sections by number in about 500 places, such as "Section 3.9", and nothing checks that those sections exist, so renumbering a guide would break the citations silently.Changes
brouwer_zimmermann_code.md(§4.3) and the table ofconnected_cluster.md§4 now name only modules, classes, functions, and fields ofSearchTuningorCertificate. A parameter, local, or private attribute is dropped only where the docstring of the function or class that owns it describes it, and the cell points to that function or class instead. Two names that no docstring describes stay:levelsof_search_supportsandnext_weightof_SectorSearch. Every row keeps its concept, and README "Where to look" changes in one cell.nogilinconnected_cluster.md§4.test_cited_sections_and_anchors_existin_readme_test.py, checks that each section that a module or guide of the package cites by number exists in the guide that the citation refers to. That guide is the one that the citation names, as in "ofconnected_cluster.md"; otherwise one that the module says it cites; otherwise the connected-cluster guide for_connected_cluster/, and the Brouwer-Zimmermann guide elsewhere. The test reads citations that break across lines of a docstring or comment, and skips citations of sections of other works, such as papers in a guide's references. It also checks that each anchor of a link into these guides, from a Markdown file of the repository outside hidden directories, names a heading. The README's "Working here" says what the test checks.Testing
The new test passes on the current guides. It fails, naming the file and line, on each of six planted breaks:
connected_cluster.md, with a section that only the Brouwer-Zimmermann guide has, both on one line and broken across two lines;circuits/certification/fault_propagation.md;experiments/distance_tuning/README.md.To check each trimmed cell, a reviewer can compare it with the docstring that it now points to.