-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Raise exception in compare_dataset and fixes to comply #5932
Conversation
@@ -218,29 +218,29 @@ class TestDynamicMapInvocation(ComparisonTestCase): | |||
|
|||
def test_dynamic_kdims_only(self): | |||
def fn(A,B): | |||
return Scatter([(A,2)], label=A) | |||
return Scatter([(B,2)], label=A) |
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 was a bug in our test.
@@ -740,7 +740,7 @@ def fn2(x, y): | |||
|
|||
overlaid = dmap * dmap2 | |||
overlay = overlaid[()] | |||
self.assertEqual(overlay.Scatter.I, fn(0, 0)) | |||
self.assertEqual(overlay.Scatter.I, fn(None, None)) |
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.
At some point, it could be that the dataframe in scatter returned (0, 0). But now it returns (None, None)
Codecov Report
@@ Coverage Diff @@
## main #5932 +/- ##
==========================================
+ Coverage 88.42% 88.45% +0.02%
==========================================
Files 313 313
Lines 65160 65215 +55
==========================================
+ Hits 57619 57686 +67
+ Misses 7541 7529 -12
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
nodes = np.array( | ||
[[-0.5, 0.866025, 0], | ||
[0.5, -0.866025, 1]] | ||
nodes = pd.DataFrame( |
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 could be at some point, this worked with an array. This seems like a safe change to make.
else: | ||
cls.compare_arrays(d1, d2, msg) | ||
try: | ||
np.testing.assert_equal(d1, d2) |
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 is mainly to avoid exceptions if one type is int
and the other is float
.
Geoviews and hvplot do not seems to be affected by these changes running their test locally. |
@@ -875,7 +875,7 @@ def test_regrid_mean_xarray_transposed(self): | |||
self.assertEqual(regridded, expected) | |||
|
|||
def test_regrid_rgb_mean(self): | |||
arr = (np.arange(10) * np.arange(5)[np.newaxis].T).astype('f') | |||
arr = (np.arange(10) * np.arange(5)[np.newaxis].T).astype('float64') |
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 give precision problems with float32
c6cee2e
to
378b75e
Compare
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Let's see how bad it is.It is not too bad, some small bugs.Resolves #5931