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
Incomplete sentences in the automatically generated documentation #19067
Comments
Branch: u/ncohen/19067 |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
comment:3
A bug? I don't know. Should this be marked as dependency to #19061? It is quite meaningless without this, even if technically not dependig. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:5
The problem was caused by a | character that appeared in the description of a function. The trouble is that | is the splitting character in those docstrings. It is fixed.
With this last commit, I ready to bet that this ticket is now in conflict with #19061. I will have to fix the conflicts with a merge, but I would prefer this branch to be reviewed first, in order to avoid having to merge and re-merge things several times in case this review requires other changes. Nathann |
comment:6
This seems to fail if I change one-line description
in |
comment:7
Duh. This is a bug, but not related to this ticket. Sorry. |
comment:9
Do I understand correctly that the problem with |
comment:10
Only if the first line of the docstring contains it.
Well, then we will have to find a way around, i.e. expose a parameter to change the delimiter manually, if needed. This being said, I am no magician: I looked at the table of ASCII characters and tried to figure out one that I could use. I picked that one because I thought it was okay, but it can be whatever else you prefer. Nathann |
comment:11
Replying to @nathanncohen:
Just to confirm: the character is required to be in ASCII, not even ISO-8859-1? Can it be non-printing character, i.e. some code between 1 and 31? |
comment:12
I do not know more than you do on this matter. |
comment:13
I guess the natural choice would be U+001F (ASCII unit separator), but it doesn't seem to work:
|
comment:14
...So I guess the fix on this ticket is better than nothing. But what about also adding a warning in the documentation of |
comment:16
Is it okay like that? Nathann |
comment:17
Could be better, if you would also warn against using non-accii characters in oneliners. (Think if I happen to found a great theorem! And then Sage can not handle "Return Mäntysalo's foo of the bar"! Not even have a warning! |
comment:18
I do not think that this branch has any effect on the matter. If you experience that it does, please propose a commit. Nathann |
comment:19
Replying to @nathanncohen:
True. That is what I noticed in comment 7. But should there be a warning about non-ascii characters, now when there is about Not a big deal, of course. So don't let this prevent giving positive review. |
comment:20
Could you say clearly which kind of warning you expect to see? I cannot guess it. Nathann |
comment:21
Hmmm... something like "First sentence in the documentation of a function may not contain the '@' character, nor any non-ascii character. First restriction is because the ReST tables returned by this function use '@' as a delimiter for cells. Second restriction follows from Sphinx internals." |
comment:22
The management of non-ascii characters has nothing to do with this branch. If you write a non-ascii character in the documentation of a function, sphinx will complain even if this code is not used. Similarly, if you add Nathann |
comment:23
Replying to @nathanncohen:
Now I understood. There was Sorry. |
comment:24
No prob. Sphinx is a mess anyway. |
Reviewer: Marc Mezzarobba |
comment:26
Thank you! Nathann |
comment:27
PDF documentation doesn't build |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:30
That came from a The thing is that the docstrings of the code constructors do not respect the convention that the first line must be a short sentence describing the function, and as a result the first paragraph contains a LOT of text (including some latex). Previously, only one (broken) sentence was displayed in the index. At least now the "sentence" is complete. Nathann |
comment:31
Replying to @nathanncohen:
A meta-ticket about that? Do you have an easy way to get a list of those? I mean something like "oneliners with more than one dot" or "oneliners with more then 150 characters"? |
comment:32
I do not want to see a meta-ticket again in my life.
No. I guess it has to be written "from scratch", or else it must be some long regexp.
Something line that. Nathann |
comment:33
Most of the doc in |
comment:34
Replying to @nathanncohen:
What? Long regexp? Those are always fun! But actually this is easier with some bash magic. Here is one example:
This founds |
Changed branch from u/ncohen/19067 to |
This branch fixes the following bug reported by Jori on #19061
Nathann
CC: @jm58660 @johanrosenkilde
Component: documentation
Author: Nathann Cohen
Branch/Commit:
3728de7
Reviewer: Marc Mezzarobba
Issue created by migration from https://trac.sagemath.org/ticket/19067
The text was updated successfully, but these errors were encountered: