-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix stginga to handle changes to the Ginga help system in release v5.0 #234
Conversation
@pllim, this is for the PR to remove This makes it behave similarly to the way help will work for other ginga plugins. |
Thanks! I'll have a look soon. |
It seems like this patch is not compatible with Ginga 4.1.1 because I see the following traceback:
What would be the best way to make this work for both Ginga 4.x and 5.x? 🤔 |
@pllim, try this update. I think this will fix the issue if you have updated |
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 think we are almost there but I encountered some weird behaviors. Are these intentional? Please see comments. Thanks!
I also pushed a commit to bump minversions, as you requested.
if not self.fv.gpmon.has_plugin('WBrowser'): | ||
self._help_docstring() | ||
return | ||
if self.fv.gpmon.has_plugin('WBrowser') and Widgets.has_webkit: |
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 clean installation didn't pick up webkit. I cannot find any python-webkit
on PyPI. How do I install it?
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.
In conda
it can be installed by pyqtwebengine
. It looks like PyPI has PyQtWebEngine
, but I would install it via the same package manager as you installed pyqt otherwise you are likely to run into problems. This is one reason I want to get rid of it--it doesn't seem to be installed by default when one installs pyqt.
|
||
obj = self.fv.gpmon.get_plugin('WBrowser') | ||
if not hasattr(self.fv, 'help_plugin'): |
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.
With Ginga 4, because I don't have python-webkit
, I hit this line but only if I do not have docutils installed. I noticed it because the terminal complains about 'publish_string' is not defined
.
However, when I install docutils, I do not hit this, instead Ginga now tries to fire up WBrowser and complains that I do not have webkit. 🤯
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.
Right, the web browser widget does not seem to be installed by default when you install qt, and unfortunately, in Ginga 4 this does not disable WBrowser
. Instead, when you start WBrowser
, it tells you to install webkit to get things working. (Qt has changed the name of their version of webkit and in Qt 5 it's name is qtwebengine
AFAIK).
Without a working WBrowser
, in Ginga 4 it will attempt to fall back to _help_docstring()
which in Ginga 4 will attempt to use docutils
(another thing I am getting rid of). I've updated this PR so that it will use an stginga
version of _help_docstring
, which will punt directly to showing the RST text. Give it a try and LMK how it goes.
I think it is too early to require |
Another possibility with this PR is to just do similar to what Ginga is doing with v5 and just punt directly to python standard library |
That would be acceptable if it is much simpler to implement. STScI never imposed the rule of offline docs via stginga interface. Usually if they need the software for offline use, they clone the whole repo anyway, so documentation is available one way or another. Thanks! |
Ok, sounds good. I'll update this PR today. |
This latest fix should remove any problems with the |
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.
Works now. Thanks!
Description
This pull request fixes stginga plugin help so that it works with changes to the help system to be made in ginga release v5.0. Both help for stginga and ginga plugins is supported.