-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor sphinx.environment.adapters.TocTree
#11565
Conversation
- Add _only_node_keep_children - filter only nodes in _toctree_copy - lift parent for _toctree_self_entry - Add deepcopy patch
This change broke the generation of galleries in I know that I'm doing some dubious monkey patching (https://github.com/spatialaudio/nbsphinx/blob/master/src/nbsphinx/__init__.py#L1485-L1506), but I'm not sure if the document representation is supposed to have changed in this PR? The API change didn't make any problems, but the document structure seems to have changed. I still have to look into the details of what has changed here, but if it is not too much of a problem to restore the previous stucture, this would be great! |
The actual resolution algorithm shouldn't've changed. Please could you open a new issue with how the new API (function based) differs from the old (class based)? A |
OK, I looked into it and it turns out that I was wrong. The document structure is not different, but my monkey-patching is broken. In spatialaudio/nbsphinx#756 I'm trying to monkey-patch It seems like setting the property |
This speeds up TocTree resolution by 3-6x, in local benchmarks.
A