yt icon indicating copy to clipboard operation
yt copied to clipboard

units_override should replace unit_base for SPH datasets

Open jzuhone opened this issue 4 years ago • 6 comments

Bug report

Most of our datasets have the ability to use the units_override functionality to change units. Most of our SPH datasets don't allow this, and instead have something called unit_base which does the same thing. This is especially needed when your dataset is not self-descripting.

It turns out that setting unit_base by hand does not even work for Arepo and EAGLE/OWLS datasets--it's simply ignored.

For yt-4.0 we should just rip off the band-aid and make units_override the default user-facing way to do this, while touching as little internal code as possible.

jzuhone avatar Nov 24 '20 20:11 jzuhone

I like the idea of making our API as consistent as possible across different datasets.

It seems like this could create a backwards incompatible change. Do you think it would be a good idea to deprecate unit_base and have an interim with both, or simply switch to units_override since it seems it isn't working as expected now?

munkm avatar Nov 24 '20 20:11 munkm

@munkm it's possible we could do this without breaking backwards-compatibility--we could leave unit_base in and if it is something other than None we can issue a deprecation warning and then pass its contents to units_override

jzuhone avatar Nov 24 '20 20:11 jzuhone

I'm coming around to the idea that this is probably too disruptive--we should leave unit_base in and just make sure it works for Arepo and EAGLE/OWLS

jzuhone avatar Mar 29 '21 04:03 jzuhone

So since this is now yt-4.1, should we untag it from #3125 ?

matthewturk avatar Jun 18 '21 17:06 matthewturk

Yes

jzuhone avatar Jun 18 '21 17:06 jzuhone

@jzuhone I think the 4.1 release is the ideal time to do this. Not clear when that's going to happen but it could be soon. Do you wish to work on this ? Otherwise I'm game to do it.

neutrinoceros avatar May 22 '22 17:05 neutrinoceros