stella icon indicating copy to clipboard operation
stella copied to clipboard

adiabatic_option deprecation notice

Open DenSto opened this issue 3 years ago • 8 comments

Recently, adiabatic_option has been moved from dist_fn_knobs to zgrid_parameters. This makes old input files obsolete, so we may want to either throw a deprecation notice/error if dist_fn_knobs is found, or perhaps throw an error/deprecation notice if adiabatic_option is not found. (This can be removed down the line)

DenSto avatar Mar 08 '22 14:03 DenSto

Might be worth writing a short tool to upgrade existing input files? The f90nml Python package should make this fairly easy.

That tool could then be used for fixing other changes to input files too.

ZedThree avatar Mar 08 '22 14:03 ZedThree

What would the workflow be, in that case? Would it be that before I submitted a run, I would have to make sure to run the script on my input file, or would it be possible to make it somewhat more automatic than that?

DenSto avatar Mar 09 '22 13:03 DenSto

It would be possible to have a script that did the conversion and then called stella with the upgraded input file automatically, but I was thinking it would just be run once on old/existing input files to upgrade them to the newer input format, and then you'd keep the upgraded files.

ZedThree avatar Mar 09 '22 15:03 ZedThree

Yeah that could work. Has something similar been developed for GS2, or would we have to create this from scratch?

DenSto avatar Mar 10 '22 14:03 DenSto

It would also be useful for GS2, especially as I'm working on finally sorting out the two diagnostics modules.

I'll see if I have time to whip something up today.

ZedThree avatar Mar 10 '22 14:03 ZedThree

Just checking, has adiabatic_option actually moved to physics_flags, rather than zgrid_parameters?

ZedThree avatar Mar 11 '22 09:03 ZedThree

Ah yes, that's right.

BTW, what's the best way to let current users know about this change?

DenSto avatar Mar 11 '22 10:03 DenSto

Deprecating input options is quite tricky in general, but an issue like this is definitely a good idea. I would suggest also something like a CHANGELOG.md with a list of features, changes, bug fixes etc. That's a bit easier to maintain if PRs are used exclusively -- there's tools to grab the PR titles and format them into a file automatically -- but definitely still possible to do by hand.

You might also want to do something like keep the previous option around for a minor version or so, but print a warning if it's used. This an example of where having a separate development branch and releasing discrete versions can help, as multiple backwards incompatibilities can be bundled together.

ZedThree avatar Mar 11 '22 11:03 ZedThree