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

Removing code that removes field type in set_title() #5088

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

chummels
Copy link
Member

PR Summary

Removing code that removes field type in set_title(). Not sure why this was ever here. It is not present for any other plot annotations.

This resolves Issue #5087 .

@neutrinoceros
Copy link
Member

This looks like a breaking change to me, the existing logic looks very much intentional (albeit flawed). Other plot annotations don't need to display a field name so I'm not surprised that it's the only one doing this.

@chummels
Copy link
Member Author

This annotation also does not display a field name. When you call annotate_title('you give it a title'), it doesn't just grab the fieldname to put in the title. As far as I can tell, self.plot_title is a dictionary containing a list of fields that are being profiled/phaseplotted, and all this function does is create an entry in that dictionary with the field as the key and the title as the value. All my change does is force the dictionary key to be the full fieldname tuple instead of just the fieldname string. And this seems to work.

@chummels
Copy link
Member Author

I added a test for this. Previously PhasePlot didn't have any SPH-based tests. Now it does, and it fails for dev tip but succeeds for this PR. I don't fully understand why this doesn't raise errors for grid-based datasets, but it doesn't seem to.

@chummels
Copy link
Member Author

pre-commit.ci autofix

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.

2 participants