Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add a test for Hexbin Linear#21562

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
llricci wants to merge4 commits intomatplotlib:mainfromllricci:fix-issue-21165
Closed

Add a test for Hexbin Linear#21562

llricci wants to merge4 commits intomatplotlib:mainfromllricci:fix-issue-21165

Conversation

llricci
Copy link
Contributor

@llriccillricci commentedNov 7, 2021
edited
Loading

PR Summary

This PR is to fix the issue#21165:

  • A new test were add inmatplotlib/lib/matplotlib/tests, with nametest_hexbin_linear;
  • Also added a image file intomatplotlib/lib/matplotlib/tests/baseline_images/text_axes, this image has a use, it is the image that the test will compare with.
  • Do it by adding the following:
image_comparison(baseline_images=['hexbin_linear'],extensions=['png'],style='mpl20')deftest_hexbin_linear():np.random.seed(19680801)n=100000x=np.random.standard_normal(n)y=2.0+3.0*x+4.0*np.random.standard_normal(n)fig,ax=plt.subplots()h=ax.hexbin(x,y,marginals=True,reduce_C_function=np.sum)plt.colorbar(h)

PR Checklist

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

Copy link

@github-actionsgithub-actionsbot 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 for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping@matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join uson gitter for real-time discussion.

For details on testing, writing docs, and our review process, please seethe developer guide

We strive to be a welcoming and open project. Please follow ourCode of Conduct.

@jklymak
Copy link
Member

The new test is failing unfortunately. Please make sure you test with up-to-date matplotlib main on your machine first.

@jklymakjklymak marked this pull request as draftNovember 8, 2021 08:02
@llricci
Copy link
ContributorAuthor

The new test is failing unfortunately. Please make sure you test with up-to-date matplotlib main on your machine first.

Yeah, sure I were going to do that.

@llricci
Copy link
ContributorAuthor

llricci commentedNov 8, 2021
edited
Loading

@jklymak hey, Why thecodecov/project/tests test are failing?

@jklymak
Copy link
Member

New contributors don't get all tests run automatically, but that makes codecov fail (because some tests are not being run). Nothing to worry about. I manually started your remaining tests. Thanks!

@llricci
Copy link
ContributorAuthor

my pleasure, thank you by your help!

@llriccillricci marked this pull request as ready for reviewNovember 8, 2021 19:27
@llriccillricci requested a review fromQuLogicNovember 9, 2021 00:32
@llricci
Copy link
ContributorAuthor

Now why this one test are failing?

@jklymak
Copy link
Member

If you click through the failing test you can see that it was failing to connect to a server to upload artifacts, which happens sometimes, but is probably not this PRs fault.

@llricci
Copy link
ContributorAuthor

That might be

@llricci
Copy link
ContributorAuthor

@jklymak Can I left like that? With this test failed?

@jklymak
Copy link
Member

The tests passed, it was just an upload of artifacts that failed, so I would say its fine.

@llricci
Copy link
ContributorAuthor

Ok

@llricci
Copy link
ContributorAuthor

@QuLogic I have already solved the issues you pointed out, thanks!

@llricci
Copy link
ContributorAuthor

I just merged this branch withmain, and the tests, that previously succeed in passing, now it is getting me these errors

@QuLogic
Copy link
Member

QuLogic commentedNov 10, 2021
edited
Loading

If possible, it'd be preferred if you rebased but it looks like we'll have to squash merge to get rid of the duplicate images anyway, so that might not be necessary.

@llricci
Copy link
ContributorAuthor

@QuLogic I rebased it, and I think it worked, the tests are now passing, butcodecov/project/tests no, because as a new contributor, my tests did not run automatically

@jklymak
Copy link
Member

Your PR has a bunch of extraneous commits, hence the PR cleanliness failure. I'm not sure if a squash merge will get rid of these, if I was fixing this I would do a rebase, drop the extra commits, and then rebase onto latest master. Back up your branch before you do this though so you don't lose anything! Maybe others will have better advice.

(back up means dogit checkout fix-21165; git checkout -b tmp-backup; git checkout fix-21165 and then do the rebasing. If you don't know how to rebase, you will probably need to read a guide online, butgit rebase i 12345678 where12345678 is the last commit ingit log that you didnot author just before the first commit you did author.

@llricci
Copy link
ContributorAuthor

@jklymak Apparently solved

@llriccillricci changed the titleResolve issue #21165, Add Hexbin Linear TestAdd a test for Hexbin LinearNov 12, 2021
@llricci
Copy link
ContributorAuthor

How can I fix the fact that my baseline image is duplicated? I delete it in my local repo and push it? Any idea?

@QuLogic
Copy link
Member

You almost had the rebase, but after rebasing, you have to force push up to GitHub. If you pull, you just get back the old commits again and merge them into the history again.

@QuLogic
Copy link
Member

So I see that#21339 also exists, but has not been updated in some time. However, it was also blocked on#21349, so I think cannot merge this until that is fixed; is that right@timhoffm?

@llricci
Copy link
ContributorAuthor

@QuLogic So I will have to do the rebase again? If so, could you write a small guide please? I've never done a rebase and the texts I found on internet is a little confusing.

@jklymak
Copy link
Member

You did it right the first time, you just then undid your work by doing agit pull before force-pushing your changes to GitHub. (Also, please don't ask us to write unique guides for every PR... we have our own guide, listed in the docs, and there are lots of docs online. If you have a specific question about a step, feel free to ask on gitter, thanks for your understanding).

@llricci
Copy link
ContributorAuthor

Ok, Sorry by the request, I am learning a lot contributing with open source software.

Lucas Ricci added4 commitsNovember 12, 2021 19:15
author Lucas Ricci <llricci@aluno.crb.g12.br> 1636671767 -0300committer Lucas Ricci <llricci@aluno.crb.g12.br> 1636755318 -0300parent29a3707author Lucas Ricci <llricci@aluno.crb.g12.br> 1636671767 -0300committer Lucas Ricci <llricci@aluno.crb.g12.br> 1636755293 -0300deleted and updated baseline image for test_hexbin_linear()Resolve issue#21165, Add Hexbin Linear testa little correction in the codeupdateUpdateupdateupdatea few correctionsResolve issue#21165, Add Hexbin Linear testa little correction in the codeResolve issue#21165, Add Hexbin Linear testa little correction in the codeupdateUpdateupdateupdatea few correctionsremoving a typo where hexbon_linear() were duplicated
@llricci
Copy link
ContributorAuthor

The tests passed now! Great.

@timhoffm
Copy link
Member

So I see that#21339 also exists, but has not been updated in some time. However, it was also blocked on#21349, so I think cannot merge this until that is fixed; is that right@timhoffm?

@QuLogic a bit confused bythis andthat, but yes, it is preferable if we can solve#21349 before we merge this pull request here.

@llricci
Copy link
ContributorAuthor

@timhoffm So what is gonna be the approach in that case?

@jklymak
Copy link
Member

Right, this PR is fine, but the marginals may change under#21339, so adding the image, and then re-adding it is unecessary churn in our repo. So I'll mark this as depending on another PR and move to draft for now. Thanks for your patience@LucasRicci

@llricci
Copy link
ContributorAuthor

@jklymak Just for further information, what is the max period that a PR should be inactivity to be closed?

@jklymak
Copy link
Member

Just subscribe to upstream issue and when it is merged you can move this one to "ready"

@QuLogicQuLogic modified the milestones:v3.6.0,v3.7.0Jul 5, 2022
@llriccillricci marked this pull request as ready for reviewJuly 13, 2022 15:49
@llricci
Copy link
ContributorAuthor

@timhoffm Moving this PR to ready since#21339 was merged

@QuLogic
Copy link
Member

QuLogic commentedJul 13, 2022
edited
Loading

This appears to need a rebase now, though looking again, it appears that this duplicates#21339?

@llricci
Copy link
ContributorAuthor

@QuLogic Idk, but if so, I'll close this PR

@timhoffm
Copy link
Member

The test is already covered in#21339 now.@LucasRicci I'm sorry that there has been overlapping work, but the objective of#21339 changed after we realized that the behavior was in fact correct and a test was then added for this.

Anyway, thank you for the PR. Even though this was not merged, your contributions is valuable to bring the discussion forward.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@QuLogicQuLogicAwaiting requested review from QuLogic

@jklymakjklymakAwaiting requested review from jklymak

Assignees
No one assigned
Projects
None yet
Milestone
v3.7.0
Development

Successfully merging this pull request may close these issues.

4 participants
@llricci@jklymak@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp