-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Docpipeline tests by chapter and section #1022
Conversation
d8f07f5
to
b3777f1
Compare
2f6eabb
to
4dd5b72
Compare
* Fix references in ImportExport * Makes key generation more deterministic * Fix typos in docstrings and comments * Add the new versions of test_* in mathics.docpipeline, and keep the old ones when the new ones fail. * Make more deterministic the key generation for ``DocTest`` * DRY __init__ methods in classes inside latex_doc.py
more moving code around
4dd5b72
to
cd0d92c
Compare
Now, this PR was updated with part of #1025, but produces the documentation following the pattern closer to Mathics 6.0 |
This PR is another version of #1025, which produces a documentation with the same format as in the 6.0.4 documentation.
The numbers go back to 1. It would be much better instead to continue from the last previous chapter number. In particular the last chapter was 52. Units and Quantities. So Graphs should be chapter 53. (It looks like some fragile pytests that refer to |
by slug seems fine. |
The images and looking at the PDF don't bother me in the slightest. Eventually, I imagine everything will be under some guide section of some sort. So this kind if thing is temporary. |
@mmatera with this organization, can we now redo the code in Mathics3 Modules so that they are now organized more like the way builtins work? Or does more need to be done? |
With these changes, docpipeline works in pymathics modules without making any changes. Also, each module is treated exactly as it were part of |
The problem is that we put modules in a different part. There is a way in LaTeX to set the initial chapter number in a Part by hand, but at this point I guess would be a higher-order correction.
Yes, I realized that after pushing it up. |
Things are looking better. I am seeing that guide sections do not have labels associated with them, so I get
when I build the docs. I suspect this is a two line change in latex_doc.py around line 800. |
Yes, I see this kind of things related to how we handle keys for sections and subsections. |
One other thing I noticed is that in the manual chapters are sorted and we don't want that. That's why in previous versions and drafts there was a parameter when gathering chapters. That should be put back in. |
Seems like an easy fix though. |
This was just that GuideSections lost their labels. Now it seems to work. |
Ok - everything looks good now. Thanks! Some follow-on items (in a future PR?) are:
|
I found that commenting out a line in mathics.tex recovers this behavior. It is done now.
As far as I can see, |
Thanks for not resetting the chapter number between parts. Let's merge and pick up remaining things in future PRs. |
Thank you for the revision and feedback! |
This continues #1021, and starts to tackle the problem of accessing tests by chapter and section without interacting over the full documentation.
For chapters, the change is quite straightforward. On the other hand, for sections, I think we need to think a little bit what is the best way to do this.
One possibility would be to produce the documentation entry from the docstring of the target builtin, without passing through the documentation. The other way to go would be to keep a dictionary in the documentation, storing all the sections "by slug".
Thoughts?