Skip to content

Conversation

@chukarsten
Copy link
Contributor

Fixes tests to support changes to list comparison.

@codecov
Copy link

codecov bot commented Aug 16, 2021

Codecov Report

Merging #2638 (b617c26) into main (948e3b4) will not change coverage.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2638   +/-   ##
=====================================
  Coverage   99.9%   99.9%           
=====================================
  Files        297     297           
  Lines      27071   27071           
=====================================
  Hits       27027   27027           
  Misses        44      44           
Impacted Files Coverage Δ
...del_understanding_tests/test_partial_dependence.py 100.0% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 948e3b4...b617c26. Read the comment docs.

plot_data = fig.to_dict()["data"][0]
assert plot_data["type"] == "bar"
assert plot_data["x"] == ["0", "1", "2"]
assert all(plot_data["x"] == ["0", "1", "2"])
Copy link
Contributor Author

@chukarsten chukarsten Aug 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original error here comes from the data typing in the dictionary. Before, in plotly <5.1.0, plot_data["x"] was of type list. Now it's an array. Casting it to a list fixes it.

* Documentation Changes
* To avoid local docs build error, only add warning disable and download headers on ReadTheDocs builds, not locally :pr:`2617`
* Testing Changes
* Updated partial_dependence tests to change the element-wise comparison per the Numpy upgrade :pr:`2638`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushing a correction to this to say Plotly instead of numpy.

Copy link
Contributor

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @chukarsten !

@chukarsten chukarsten merged commit e7a5c25 into main Aug 16, 2021
@@ -1,5 +1,6 @@
docutils>=0.15.2,<0.17
pydata-sphinx-theme>=0.3.1
astroid<=2.6.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this for?

@freddyaboulton freddyaboulton deleted the numpy_compatibility_updates branch May 13, 2022 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants