-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Improving guide handling #203
Conversation
This needs the doc-code-rebased-rebased branch of Mathics core.
Another round of improvements for the docpipeline module. Now we allow to specify the format of the output (latex, "xml") as well as the path of the corresponding pickle datafile. With this change, mathics-django docpipeline get a much simpler implementation. To work together with Mathics3/mathics-django#203 --------- Co-authored-by: rocky <[email protected]> Co-authored-by: R. Bernstein <[email protected]>
""" | ||
Adds some HTML functions onto existing Django Document Elements. | ||
""" | ||
|
||
def href(self, ajax=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My environment tells me that something is weird with calling self.get_ur<strike>l</strike>i()
self.get_uri()
. get_uri
is not defined in this class and it does not inherit from anything. Therefore were this to get called, we'd have an error.
The similar thing holds for the functionget_title_html()
on line 68.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find get_url
in this file. What is there is get_uri
, which is defined and used to build the navigation links. get_title_html
is defined for DjangoDocElement
, and I think we need it for doing the documentation format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the linter is saying is that if one tries to use it, you'll get an error.
I did some git archeology and this was added by me around 2020 when I split this off from what was in mathics-core
. There was a lot of guess work there.
There is no such thing as "building" documentation for Django. So we can remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, but both functions seem to work properly, as they are called when navigating documentation. I added some comments in the docstrings to clarify where they are used.
LGTM - Many good improvements and simplification of code. Thanks! Merge when you are ready. See also the various comments should you want to address. |
Changes needed to work together with Mathics3/mathics-core#1025 (comment)