-
Notifications
You must be signed in to change notification settings - Fork 129
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
Road to removing qtassistant (documentation) --> C Changes required for Python HelpWindow implementation #38903
Road to removing qtassistant (documentation) --> C Changes required for Python HelpWindow implementation #38903
Conversation
2b3126a
to
598a835
Compare
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.
Rebuilding after cmake . -DDOCS_QTHELP=off
and running workbench gives me the following message when I try to start the qwebengine-based helpwindow
InterfaceManager-[Information] Offline help is not available in this version of Workbench.
turning qtassistant back on goes back to the old behavior of opening a web browser for the online help.
I was still able to directly run the bridge from my build directory using
python ~/code/mantid/qt/python/mantidqt/mantidqt/widgets/helpwindow/helpwindowbridge.py
Q: Should this be using ConfigService for information about the docs build location? docs.html.root
is the key in ConfigService.
qt/widgets/common/inc/MantidQtWidgets/Common/PythonHelpBridge.h
Outdated
Show resolved
Hide resolved
Adding some tests for PythonHelpWindow would be appreciated |
d64b076
to
710114e
Compare
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.
Bad news. Closing mantid after the help window has been opened causes SIGSEV
FrameworkManager-[Notice] Welcome to Mantid 6.11.0.dev617
FrameworkManager-[Notice] Please cite: http://dx.doi.org/10.1016/j.nima.2014.07.029 and this release: http://dx.doi.org/10.5286/Software/Mantid
Help window closed.
Cleaning up Help Window resources.
Received signal: SIGSEGV
Segmentation fault
The shutdown needs to be investigated
Uh oh... let me see if I can figure out why this is happening. |
8ab1a7a
to
669dda2
Compare
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 as expected and closes cleanly
Description of work
This work is related to issue #37248. This PR contains the majority of the C based changes that are required to help support the new Python based implementation of the HelpWindow within Mantid Workbench. The main objective is to transition away from the older
qtassistant
-based implementation.Summary of work
Removed Support for
qtassistant
in Documentation:DOCS_QTHELP
option is now used to toggle the inclusion of theqtassistant
-based help system. IfDOCS_QTHELP
is set toOFF
, the Python-based HelpWindow will be included instead.Introduced a Python Bridge:
PythonHelpBridge
to handle interactions between the C++ layer and the Python HelpWindow implementation. This bridge initializes the Python interpreter and invokes the relevant Python methods for showing help pages.Added a New HelpWindow Implementation:
PythonHelpWindow
, a subclass ofMantidHelpInterface
, which redirects help requests to the Python layer viaPythonHelpBridge
. The new HelpWindow supports:showPage
).CMake Updates:
CMakeLists.txt
in multiple directories to conditionally include the Python HelpWindow (PythonHelpBridge
andPythonHelpWindow
) whenENABLE_QTASSISTANT
isOFF
.Code Registration:
PythonHelpWindow
implementation in theInterfaceManager
using theREGISTER_HELPWINDOW
macro.Ref #37248
To test:
In order to test, please take the following steps:
Starting within mantid/ -
cmake --preset=linux
cd build
cmake . -DENABLE_QTASSISTANT=OFF
ninja all docs-html
MANTID_LOCAL_DOCS_BASE="./build/docs/html" bin/launch_mantidworkbench.sh
export PYTHONPATH="./qt/mantidqt/mantidqt/widgets/helpwindow:$PYTHONPATH"
Once mantid is launched, please use the
F1
key to launch help window for testing purposes. Please also try checking algorithm help from within the AlgorithmDialog.Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.