Skip to content
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

Split doc test classes #1021

Merged
merged 6 commits into from
Mar 24, 2024
Merged

Split doc test classes #1021

merged 6 commits into from
Mar 24, 2024

Conversation

mmatera
Copy link
Contributor

@mmatera mmatera commented Mar 14, 2024

Another thing that have been waiting to do: splitting mathics.doc.common_doc into simpler, more specific pieces. I hope that this is going to help in the next steps (sorting the modules, accessing specific test cases in docpipeline, etc)
This also includes

  • Split mathics.doc.common_doc into simpler more specific pieces: the structure ("Documentation/Chapter/Section..." in common_doc and the documentation entries itself (doc_entries) ).
  • DRY code in docpipeline.
  • Run the tests in the Chapter documentation.
  • Fixes some references in ImportExport documentation.
  • Add and improve some docstrings and comments.
  • makes that the key attribute in mathics.doc.common.DocTest being more deterministic.
  • DRY init routines in latex_doc subclasses.

mmatera added 5 commits March 14, 2024 11:50
* 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
removing trailing code
@mmatera mmatera force-pushed the split_DocTest_classes branch from b55d03f to 30f39d7 Compare March 14, 2024 14:56
@mmatera mmatera marked this pull request as ready for review March 14, 2024 14:56
@rocky
Copy link
Member

rocky commented Mar 24, 2024

LGTM - thanks!

@mmatera mmatera merged commit 25e8779 into master Mar 24, 2024
10 checks passed
@mmatera mmatera deleted the split_DocTest_classes branch March 24, 2024 00:24
rocky added a commit that referenced this pull request Apr 3, 2024
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?

---------

Co-authored-by: rocky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants