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

compatibility with mathics-core PR 986 #201

Closed
wants to merge 7 commits into from
Closed

Conversation

mmatera
Copy link
Contributor

@mmatera mmatera commented Feb 1, 2024

This PR is needed to keep compatibility with Mathics3/mathics-core#986

rocky added a commit to Mathics3/mathics-core that referenced this pull request Feb 7, 2024
This PR continues #990 by moving the inner loop that loads chapters in
`MathicsMainDocumentation.doc_part` to a new method
`MathicsMainDocumentation.doc_chapter`. With this change, the "on the
fly" loading of documentation for Pymathics modules loaded in a Django
session now is possible (and is implemented in
Mathics3/mathics-django#201)

---------

Co-authored-by: R. Bernstein <[email protected]>
# print("XXX refresh pymathics doc")
global documentation
documentation = MathicsDjangoDocumentation()
print("XXX refresh pymathics doc", pymathics_modules)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now uncommented?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about this. I forgot to comment it out again.

"mathics3-modules", None
)
# If this is the first loaded module, we need to create the Part
if mathics3_module_part is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't have to be in a for loop.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right.

)
# If this is the first loaded module, we need to create the Part
if mathics3_module_part is None:
mathics3_module_part = self.doc_part(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self is not right, it is documentation here. Must be a cut and paste error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have incorporated the good parts of this PR into #202

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, it was a cut-and-paste error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rocky, if you already have incorporated the changes and #202 is working, feel free to close this PR.

@rocky
Copy link
Member

rocky commented Feb 9, 2024

Superceded by #202 (although there was some good code here.).

@rocky rocky closed this Feb 9, 2024
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