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

Fix fake_dataset periodicity attribute in FieldDetector #4570

Merged
merged 1 commit into from
Jul 9, 2023

Conversation

jzuhone
Copy link
Contributor

@jzuhone jzuhone commented Jul 9, 2023

PR Summary

The FieldDetector class mocks up a fake dataset from a defaultdict if a dataset is not passed. It has to attach a number of basic yt attributes to this fake_dataset class, but at the end it tries to use the force_periodicity method, which of course exists on the Dataset class but not here. I'm just setting the periodicity here by hand, which is the previous behavior and should never have been changed here.

I ran into this bug on accident--not sure if it affects anything, but this is the right fix for now until we do something better.

PR Checklist

  • New features are documented, with docstrings and narrative docs
  • Adds a test for any bugs fixed. Adds tests for new features.

@jzuhone jzuhone added the bug label Jul 9, 2023
@matthewturk
Copy link
Member

I also actually ran into this, but was not certain it was a bug. Nice fix.

@neutrinoceros neutrinoceros added this to the 4.2.2 milestone Jul 9, 2023
@neutrinoceros neutrinoceros merged commit 5d3c81e into yt-project:main Jul 9, 2023
meeseeksmachine pushed a commit to meeseeksmachine/yt that referenced this pull request Jul 9, 2023
@jzuhone jzuhone deleted the field_det_period branch January 22, 2024 00:05
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.

3 participants