Skip to content
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

Checking if extrema are all None in PhasePlot; fixes #3431 #3432

Merged
merged 4 commits into from
Jul 13, 2021

Conversation

chummels
Copy link
Member

PR Summary

Attempts to fix Issue #3431 by checking if extrema values are all None when using a PhasePlot, and if so, treats as though extrema itself is None. See description in #3431 notes for more details.

@chummels chummels added the bug label Jul 13, 2021
@chummels
Copy link
Member Author

I don't understand why the test was canceled?

@neutrinoceros
Copy link
Member

Me neither, let's rerun it in hope it was due to a temporary failure from the environment.

chummels and others added 2 commits July 13, 2021 08:27
Co-authored-by: Clément Robert <cr52@protonmail.com>
@chummels
Copy link
Member Author

Thanks, @neutrinoceros, for the simplified logic. I wasn't aware of that function, but it's useful.

@neutrinoceros
Copy link
Member

I wasn't either ! I usually check more_itertools' doc only when I find myself or others writing this kind of custom logic :)

@neutrinoceros
Copy link
Member

I report that this patch doesn't fix the other error raised from your test that I see on my machine. Can you please add it as an actual test here ?

@neutrinoceros neutrinoceros linked an issue Jul 13, 2021 that may be closed by this pull request
@chummels
Copy link
Member Author

I added a test, which fails on previous builds but works with this one. I think this should be ready to go assuming the tests pass. Thanks for the help, team.

Copy link
Member

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

So as discussed in the issue thread, this other error was my mistake. I confirm that this fixes the bug addressed, and that the test works as intended (red on main, green with this patch).
I found one small issue with how you implemented your test, but otherwise LGTM

yt/data_objects/tests/test_profiles.py Show resolved Hide resolved
@chummels
Copy link
Member Author

Oh, I was worried about the temp file, which is why I implemented this within the superclass of TestBadProfiles (see here), which has a tearDown function which removes any saved files/directories, etc. I can include your change as well if you prefer, but I think it may be unnecessary.

@neutrinoceros
Copy link
Member

Sorry I completely missed that. In this case I approve of this going in as is ! Thank you !

@neutrinoceros neutrinoceros merged commit c11c2f8 into yt-project:main Jul 13, 2021
@neutrinoceros neutrinoceros mentioned this pull request Oct 12, 2021
42 tasks
@matthewturk
Copy link
Member

@meeseeksdev backport to yt-4.0.x

meeseeksmachine pushed a commit to meeseeksmachine/yt that referenced this pull request Oct 15, 2021
neutrinoceros added a commit that referenced this pull request Oct 16, 2021
…2-on-yt-4.0.x

Backport PR #3432 on branch yt-4.0.x (Checking if extrema are all None in PhasePlot; fixes #3431)
@chummels chummels deleted the fix_profile branch August 25, 2022 23:15
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.

Cannot set linear scaling in certain PhasePlots
3 participants