-
Notifications
You must be signed in to change notification settings - Fork 55
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
Improve documentation for pyface.action and pyface.tasks.action submodules #843
Conversation
specifically, the pyface.tasks.action and pyface.action submodules. Additionally, some of the comments on traits in code have been updated so that they get picked up by sphinx and get documented in the autogenerated API docs Finally, two spelling corrections have been made.
modified: pyface/action/menu_bar_manager.py modified: pyface/action/menu_manager.py modified: pyface/action/status_bar_manager.py modified: pyface/action/tool_bar_manager.py modified: pyface/action/tool_palette_manager.py
Codecov Report
@@ Coverage Diff @@
## master #843 +/- ##
==========================================
+ Coverage 41.15% 41.29% +0.14%
==========================================
Files 522 522
Lines 28110 28126 +16
Branches 4251 4253 +2
==========================================
+ Hits 11568 11614 +46
+ Misses 16037 16015 -22
+ Partials 505 497 -8
Continue to review full report at Codecov.
|
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.
LGTM, I built the docs and everything looked good. Just a couple comments
control. | ||
|
||
- :attr:`~.MenuBarManager` | ||
""" |
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.
When building the docs, these "- :attr:~.MenuBarManager
" lines just show up as
- MenuBarManager
Without any link. Not a suggested change now, but maybe as a future improvement, for toolkit specific things we could link to both implementations somehow? e.g. one link to docs for https://github.com/enthought/pyface/blob/master/pyface/ui/qt4/action/menu_bar_manager.py and another for wx
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.
Without any link.
There is already an issue: #755
Note that Qt and Wx implementations don't necessarily have exactly the same definition. Cherry-picking the ones I know:
The enum definition for DataViewWidget looks like this in Qt:
pyface/pyface/ui/qt4/data_view/data_view_widget.py
Lines 100 to 104 in 3ea7832
#: What can be selected. Qt supports additional selection types. | |
selection_type = Enum("row", "column", "item") | |
#: How selections are modified. Qt supports turning off selections. | |
selection_mode = Enum("extended", "none", "single") |
But it looks like this in Wx:
pyface/pyface/ui/wx/data_view/data_view_widget.py
Lines 42 to 46 in 3ea7832
#: What can be selected. | |
selection_type = Enum("row") | |
#: How selections are modified. | |
selection_mode = Enum("extended", "single") |
We can't merge the two into one without having to pick one over another.
Another hard problem is the dependency on the toolkit while generating the doc. Some mocking (in doc config) may be needed, but that is not necessarily trivial either.
control. | ||
|
||
- :attr:`~.MenuBarManager` | ||
""" |
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.
Without any link.
There is already an issue: #755
Note that Qt and Wx implementations don't necessarily have exactly the same definition. Cherry-picking the ones I know:
The enum definition for DataViewWidget looks like this in Qt:
pyface/pyface/ui/qt4/data_view/data_view_widget.py
Lines 100 to 104 in 3ea7832
#: What can be selected. Qt supports additional selection types. | |
selection_type = Enum("row", "column", "item") | |
#: How selections are modified. Qt supports turning off selections. | |
selection_mode = Enum("extended", "none", "single") |
But it looks like this in Wx:
pyface/pyface/ui/wx/data_view/data_view_widget.py
Lines 42 to 46 in 3ea7832
#: What can be selected. | |
selection_type = Enum("row") | |
#: How selections are modified. | |
selection_mode = Enum("extended", "single") |
We can't merge the two into one without having to pick one over another.
Another hard problem is the dependency on the toolkit while generating the doc. Some mocking (in doc config) may be needed, but that is not necessarily trivial either.
modified: pyface/action/api.py modified: pyface/tasks/action/api.py modified: pyface/tasks/action/listening_action.py
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.
LGTM. Thank you!
This PR improves documentation for the following submodules -
pyface.tasks.action
andpyface.action
submodules.Specifically,