-
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
Copy Undo over from apptools #813
Conversation
Codecov Report
@@ Coverage Diff @@
## master #813 +/- ##
==========================================
+ Coverage 40.81% 41.25% +0.43%
==========================================
Files 508 522 +14
Lines 27845 28110 +265
Branches 4219 4251 +32
==========================================
+ Hits 11366 11596 +230
- Misses 15999 16018 +19
- Partials 480 496 +16
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.
- Can you also move the documentation for undo from apptools to pyface?
- Can you also move the examples for undo from apptools to pyface?
- Can you check the test coverage for all of the new code? I think we will want to/need to add more tests.
pyface/undo/undo_manager.py
Outdated
|
||
# This is the currently active command stack and may be None. Typically it | ||
# is set when some sort of editor becomes active. | ||
active_stack = Instance("apptools.undo.api.ICommandStack") |
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.
not sure why we can't just import and use ICommandStack
here instead of using the string.
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.
There is a circular import, I think - UndoManager
references ICommandStack
and vice-versa.
pyface/undo/i_undo_manager.py
Outdated
|
||
# This is the currently active command stack and may be None. Typically it | ||
# is set when some sort of editor becomes active. | ||
active_stack = Instance("apptools.undo.api.ICommandStack") |
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.
It looks like IUndoManager
and ICommandStack
depend on one another - which is why we can't import and use ICommandStack
here. Can you add a comment here regarding the same?
docs/source/undo.rst
Outdated
|
||
|
||
.. _API: api/index.html | ||
.. _example: https://svn.enthought.com/enthought/browser/AppTools/trunk/examples/undo/ |
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.
This link is clearly out of place here, but I believe it was actually previously broken on apptools as well. Likewise, this final section of "API Overview" seems unnecessary with auto built api docs. This file needs to be updated, but I think I will leave those changes for a separate PR unless a reviewer would like to see them done here, in which case I am happy to do so
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.
Let's get them fixed in this PR instead of after the PR.
Here is a screenshot of the coverage report: Some of these would benefit from additional tests (looks like |
Can you add those as part of this PR? IMO its not too much to review. |
…is is all available in auto generated api docs). Also remove broken links
One thing I see that may be beneficial is |
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.
Mostly LGTM with a few minor comments.
|
||
# Enthought library imports. | ||
from pyface.api import GUI, YES | ||
from pyface.workbench.api import Workbench |
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.
can you open an issue regd porting the undo example code from pyface workbench to pyface tasks?
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.
Opened #821
Co-authored-by: Poruri Sai Rahul <[email protected]>
@aaronayres35 before you merge, can you update the coverage report? |
As mentioned in step 6a of https://github.com/enthought/ets/blob/master/docs/source/eeps/eep-6.rst
this PR simply copies over the
apptools.undo
subpackage from apptools (and updates references to apptools in the code to reference pyface instead).After the next pyface release we will want to deprecate
apptools.undo
in apptools.