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

A bugfix for the new expanded EWAH file reading capability #4249

Merged
merged 3 commits into from
Dec 17, 2022

Conversation

jzuhone
Copy link
Contributor

@jzuhone jzuhone commented Dec 15, 2022

PR Summary

In PR #4198 I implemented a feature to automatically find EWAH files with increased index_order2 for SPH/Lagrangian datasets.

There was an oversight in these changes, which involves the fact that although the file with the updated index_order2 is correctly found and loaded, index_order2 is not increased by 2 when creating the ParticleBitmap object. The result is that for some analyses that try to look on small scales the code either crashes or it gives odd-looking results.

This PR fixes this issue, but it required a bit of moving things around so that we detect the new value of index_order2 from the filename before we create the ParticleBitmap object.

PR Checklist

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

@neutrinoceros neutrinoceros added this to the 4.1.3 milestone Dec 15, 2022
@neutrinoceros
Copy link
Member

I probably made a mistake in including the previous PR in a bugfix release. What’s the preferred approach for the backport branch 4.1.x now ? Should we include the fix and hope it’s stable or just revert the original patch there and rerelease everything in 4.2?

@jzuhone
Copy link
Contributor Author

jzuhone commented Dec 15, 2022

What’s the preferred approach for the backport branch 4.1.x now ? Should we include the fix and hope it’s stable or just revert the original patch there and rerelease everything in 4.2?

This is a good question for @matthewturk. Either way, this is a critical bugfix so we should fix it somehow in 4.1.3.

@neutrinoceros
Copy link
Member

Either way, this is a critical bugfix so we should fix it somehow in 4.1.3.

Absolutely

@jzuhone
Copy link
Contributor Author

jzuhone commented Dec 15, 2022

@neutrinoceros actually it's probably easier to just revert the previous change for now so we can think about this more carefully

@neutrinoceros
Copy link
Member

it's probably easier to just revert the previous change for now so we can think about this more carefully

done in #4250

@neutrinoceros neutrinoceros added this to the 4.2.0 milestone Dec 15, 2022
# Load Morton index from file if provided
def _current_fname(order1, order2):
if getattr(ds, "index_filename", None) is None:
irange = f"[{order2}-{order2+2}]"
Copy link
Member

Choose a reason for hiding this comment

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

It took me a moment to figure out we were creating an fstring for a glob, but this makes sense.

@neutrinoceros
Copy link
Member

@matthewturk what do you think about reverting the feature from the 4.1 branch ?

@matthewturk
Copy link
Member

We did kinda make a big deal of it in the release notes. So if we can fix it, we should, don't you agree?

@neutrinoceros
Copy link
Member

Sure. I honestly don't hold strong opinions here. This was my mistake, but I'll settle for any solution you guys can agree on

@matthewturk
Copy link
Member

@jzuhone I'm OK with this going in and getting backported. What're your thoughts?

@neutrinoceros
Copy link
Member

@matthewturk seems like you merged the revert a couple minutes after your last comment. It looks like a mistake on your side this time, but maybe we should actually leave the backport branch alone now, unless anyone feels strongly that we shouldn't ?

@matthewturk
Copy link
Member

matthewturk commented Dec 16, 2022 via email

@neutrinoceros
Copy link
Member

Then if @jzuhone agrees I vote for just merging this with no backport, and let future me deal with explaining the revert in the 4.1.3 release notes :-)

@jzuhone
Copy link
Contributor Author

jzuhone commented Dec 17, 2022

@neutrinoceros sounds good to me

@neutrinoceros neutrinoceros merged commit f0e4569 into yt-project:main Dec 17, 2022
@jzuhone jzuhone deleted the fix_ewah_redux branch April 10, 2023 13:20
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.

None yet

3 participants