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

Restore auto creation of save dirs in PlotContainer.save #3289

Merged
merged 3 commits into from
May 25, 2021

Conversation

neutrinoceros
Copy link
Member

@neutrinoceros neutrinoceros commented May 20, 2021

PR Summary

Intent: fix #3210
The patch is not elegant at all, but it works ™️ (at least the tests I wrote for it pass)
Note that in order to make this work I "sacrificed" a feature that was deemed unintuitive in the original disscussion. Namely,
PlotContainer.save("img") used to interpret "img" as a file prefix OR an output directory depending on wether such a directory existed already or not. This PR intentionally breaks this undocumented (AFAIK) feature to make room for the one @chummels wanted back in his original report.

Following the discussions in the issue, I think the best course of action in the foreseeable future would be rethink the amount of magic we want to support in saving functions, but for now, we've agreed that it's best to just try and restore the old behaviours in time for the 4.0 release.

Copy link
Member

@chummels chummels left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this, @neutrinoceros ! I looked over the code and the logic works. I also downloaded it and tested it locally and it works as described. Much appreciated.

@neutrinoceros neutrinoceros changed the title fix #3210 Restore auto creation of save dirs in PlotContainer.save May 22, 2021
@chummels chummels merged commit 0d31a9b into yt-project:main May 25, 2021
@neutrinoceros neutrinoceros deleted the hotfix_3210 branch May 25, 2021 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saving a PlotWindow object to a non-existent directory with a file prefix no longer works
3 participants