-
-
Notifications
You must be signed in to change notification settings - Fork 8k
MEP22 toolmanager set axes navigate_mode #18493
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
Conversation
This change sets navigate_mode in axes.
There is 1 pytest case which was already failing(locally) and is still failing(locally): test_get_fontconfig_fonts |
It would be great to add some kind of automated test for this behavior, maybe in |
yes, I have a code which I used to test this. Think that can be modified into a test case. Should I add that code in this PR or a different one? |
74b3696
to
882f485
Compare
This PR please. Thank you for working on this :) |
3c01c15
to
fdb21b7
Compare
fdb21b7
to
92f6a11
Compare
I am getting this warning |
That last warning seems like something you should chase down as that is coming from matplotlib/lib/matplotlib/backend_managers.py Lines 418 to 444 in 571a787
|
assert(len(rec) == 4) | ||
for r in rec: | ||
assert("The new Tool classes introduced in v1.5 are experimental" | ||
in str(r.message)) |
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'm not sure this needs to be asserted as part of this test specifically. However, if this is to ensure that other unexpected warnings are not raised, then it can be done by specifying the match
argument in the pytest.warns
call.
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.
@QuLogic do you want this to be resolved before merging?
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 was hoping for a reply from @xordux about the intention at least.
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.
Oops I thought it's an advice that pytest.warns
can also be used for the same. @QuLogic Yes, while asserting warning messages my intentions were to ensure that any other unexpected warnings are not raised.
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 should switch to pytest.warns
then.
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.
@QuLogic I have added the match
argument in pytest.warns
but now some other test cases are failing which don't seem to be related to my changes.
Edit: I also synced my forked code with the https://github.com/matplotlib/matplotlib.git
…vigate_mode_18151
@dopplershift or @fariza do either of you have time to look at this? |
The failing mac test seems to be common across other recent PRs and possibly due to some imagmagick changes The failing tk test on Windows, I'm not sure about. Other PRs are not similarly failing? |
closing to re-test the checks. |
@jklymak The failing tk test on Windows passed when the checks were re-rerun. Only mac test are failing due to a issue in latest version of imagemagick (issue raised here) |
PR Summary
Added a change in lib/matplotlib/backend_tools.py to address #18151
The values of navigate_mode are set to either 'PAN', 'ZOOM', or None. This is because the comment in _AxesBase.get_navigate_mode() says:
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
andpydocstyle<4
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).