-
Notifications
You must be signed in to change notification settings - Fork 279
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
merging yt-4 into master #2437
merging yt-4 into master #2437
Conversation
[bugifx] Make sure region edge units are in code_length.
Change py2-style print stmts to py3
whitespace and trailing comma included Co-Authored-By: Matthew Turk <matthewturk@gmail.com>
…ical simulation; h/t @jzuhone
What's currently killing me is that my conda environment doesn't have |
I verified the images are all correct and have committed the correct versions. We probably need to get the image answer tests somewhere other than the main repo at some point, but I do like the new system for inspecting and verifying them. |
@yt-fido test this please |
@ngoldbaum so today, @Xarthisius, @munkm and @samwalkow and I were looking at the test results and directly comparing them, and we got some strange results. I genuinely don't know how to interpret these. Is it possible that this is simply because the https://gist.github.com/matthewturk/38d36d8cba8127d0faf4916950648f1c Thanks for any ideas. |
Ah, we dug into it a bit more -- and, it looks like both resolve the unit registry as being from
|
I’m not sure. Maybe? Can you make a self-contained example where you save data with yt.units and load it again later with unyt that hits this problem? There’s a code path in unyt that deals with data saved by yt.units, maybe we need to do some additional massaging of the data there to get things loaded correctly? Please feel free to open an issue in unyt about this with details and optimally steps |
Yes, unyt used an MKS unit system internally, yt.units uses CGS. Hmm I wonder if the problem is that the unpuckling code in unyt isn’t applying the same transformations that the json loading code does for data saved by yt.units: https://github.com/yt-project/unyt/blob/master/unyt/unit_registry.py#L265 |
@ngoldbaum We believe that it's because of where the default unit system was changed. If the unit definitions internal to a unit registry are stored with respect to the "default" and the "default" is then changed, this will change the results. There's an elaborate analogy one could make about changing parallel universes between one where the golden meter stick is used and the golden centimeter stick is used but not knowing they use different golden sticks, but it's doesn't make for very exciting prose. |
Yeah I think there needs to be some logic here that detects when we’re loading data saved by yt.units: https://github.com/yt-project/unyt/blob/master/unyt/array.py#L1928 You should be able to detect it in the same way as the json loading code I linked to earlier. Ping me on slack or here if you have any questions :) |
yt-project/unyt#93 is also probably relevant |
@cphyc OK, awesome! Thanks for looking at that. I guess the dataset is just a bit wonky. So, it seems like yt4 is doing the right thing here. In my mind, that means all the frontend tests are correct, and the only one that needs to be checked is the |
The before and after plots with the different As you can see, the change in the unicode number has caused the mu to be italicized, which is likely because now it can be, or something, I am not sure. Whatever. I am not going to dip back into that well just yet, and instead, going to push forward with the answer verification. |
Wait, forget that last comment, I read the namesb ackwards. Now it's not italicized. So that's good. |
This new |
@yt-fido test this please (regenerating xray fields tests, due to missing emissivity file) |
@yt-fido test this please (regenerating ytdata tests since now they actually work, at least half of them...) |
I've pushed a handful of changes that should both fix a couple tests and show a couple more tests that don't work.
The two tipsy tests One issue I am having with pkdgrav (specifically) right now is that I am unable to load it when I use the arguments given in the testing file. It needs a value for I filed a handful of issues today while working on this: #2659, #2657, and #2656. |
@yt-fido test this please |
This is necessary so that the primary item in an operation in unyt has the necessary entry in the unit registry (specifically h).
Thanks to @Xarthisius for all the work he put in on this. Hopefully this most recent push will reduce the number of failing tests to a single one, which is the |
🎉 🥇 🎈 🎊 🎈 🥇 🎉 |
This is a reopening of #2172 on my repository. I'm removing WIP because, although it's still a work in progress, it's getting close enough that I want others to check in with it once in a while.