-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix for marker verts bug #7809
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 for marker verts bug #7809
Conversation
Current coverage is 62.14% (diff: 100%)@@ master #7809 diff @@
==========================================
Files 174 175 +1
Lines 56050 56134 +84
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 34805 34883 +78
- Misses 21245 21251 +6
Partials 0 0
|
What does BF stand for? |
Bugfix? |
Yes. Bug fix. |
Can you add a regression test? The patch looks fine to me elsewise. |
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.
Could you write a test that demonstrates that this fix works properly?
@lkilcher I've create a pull request onto your branch with some tests and an additional fix. |
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 good to me. 👍
Thanks @lkilcher !
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.
Just a minor correction to your comments
def test_markers_invalid(): | ||
marker_style = markers.MarkerStyle() | ||
mrk_array = np.array([[-0.5, 0, 1, 2, 3]]) | ||
# Checking this doesn't fail. |
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.
checking that this does fail
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.
Fixed. 23ce141
Thank you @NelleV , especially for the test! Also, am I correct in my understanding of how Travis-CI (and other checks) work: they run the changes in the PR merged with HEAD of master (wherever that is at the time the PR is modified/updated)? |
No, travis-ci runs the test as they are on your branch. It doesn't merge into master, but once the pull request gets merged into master, it reruns the tests there. Just a side note; |
Thanks for the clarification. I suppose that's why the contributing doc suggests rebasing onto upstream master (is that the right jargon?) when finalizing a commit? Should I do that? |
@NelleV I am pretty sure that travis runs against a commit which is the merge of the current branch into master (this is why fixing CI on master and re-starting PRs propagates the fix). @lkilcher The rebase on master should only be if there are conflicts (in contrast to merging master into your branch). Can you point me at where in the docs suggest that you should rebase if there are no conflicts? |
@tacaswell really? I don't see the merge happening in the travis log |
I think it was here, but now that I look at that it's fairly clear that this only needs to be done if there are conflicts. Perhaps it was an old version of that page, but more likely I'm just imagining things. Sorry! |
The head it pulls from GH has the merge already done. The way the decide if the branch can be merged is by merging it and they expose that SHA out under as a specific ref. Copy the fetch logic from travis:
This does leave some questions about exactly when that ref gets updated (and when the web-hooks get triggered). |
@lkilcher It seems that you'll have to rebase anyways… There is a conflict with master. |
23ce141
to
019d651
Compare
OK. I rebased and the tests passed, so I think this is good to go. :) |
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.
Looks good, thanks @lkilcher
Backported to v2.0.x via. 98a9347 [TAC edited to fix sha link] |
The test shouldn't have been backported as is; it requires |
This is a proposed solution for #7807 . I added the checks for array ndim and shape, so that the
ValueError('Unrecognized marker style...)'
error is raised if an incorrectly-shaped np.ndarray is specified as input.