Skip to content

Replace 'normed' kwarg to hist by 'density' in tests and docs. #10258

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

Closed
wants to merge 1 commit into from

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 16, 2018

PR Summary

handles #10200 (comment)

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@@ -2932,7 +2932,7 @@ def test_hist_stacked_normed():
d2 = np.linspace(0, 10, 50)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.hist((d1, d2), stacked=True, normed=True)
Copy link
Member

Choose a reason for hiding this comment

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

I think this should stay as it is, because we should still be testing that normed works until it is removed.

Copy link
Member

Choose a reason for hiding this comment

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

In that case, shouldn't the test have two forms, one for 'normed' and the other for 'density'? At a more general level, we never have tested everything, and never will--there are too many possible combinations. We need to concentrate on the most useful tests, putting our resources, and those of the CI services, where they will be most effective in improving mpl. Testing that a deprecated kwarg still works seems very low priority, doesn't it? The time of deprecation seems like a perfectly reasonable time to switch a test to the non-deprecated alternative.

Copy link
Member

Choose a reason for hiding this comment

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

  • There is a test directly below this one for density.
  • Sure we've never tested everything, but we should aim to test everything. This test definitely isn't a CI bottleneck.
  • In my opinion, something being deprecated means it is still supported, but there are plans for it to be removed. If it's supported, it should be tested.

I'm not going to block on removing the normed test, but I am -2 on it.

Copy link
Member

Choose a reason for hiding this comment

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

Aiming to test everything doesn't make sense to me, for the reason stated above.

Copy link
Member

@efiring efiring left a comment

Choose a reason for hiding this comment

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

I like it; but I acknowledge the disagreement of @dstansby.

@anntzer
Copy link
Contributor Author

anntzer commented Jan 16, 2018

At least the docs should be fixed, I basically don't care about what we do with the tests (but should suppress the warnings if we don't change them).

@tacaswell
Copy link
Member

I think @dstansby has a good point here. Can we keep the commit from #10200 for the test file (assuming tests pass, it looks like they are all failing over there) and everything else from this PR?

@tacaswell tacaswell added this to the v2.2 milestone Jan 17, 2018
@anntzer
Copy link
Contributor Author

anntzer commented Jan 17, 2018

Feel free to do your own mix and match... or I can rebase after #10200 is merged.

@QuLogic
Copy link
Member

QuLogic commented Feb 10, 2018

Oh, didn't know about this. Since #10200 is merged and #10385 took care of the examples, I guess we don't need this PR.

@QuLogic QuLogic closed this Feb 10, 2018
@QuLogic QuLogic modified the milestones: v2.2, unassigned Feb 10, 2018
@anntzer anntzer deleted the nonormed branch February 10, 2018 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants