-
Notifications
You must be signed in to change notification settings - Fork 91
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
Can we move the "version" setting out of metadata? #1267
Comments
Alternately, I have opened a |
Also related #1234 |
@drewj-usnctech - the introduction of version might have been something that we had discussed for your needs. If so, can you take a look at #1234 and see if we can remove the setting for version and just slap it into a database? Maybe the version number predates this though. @john-science - it might be that version was / is used in the settings for auto migration purposes. I'm not sure the history there but @ntouran could remember. I still think that the tagged issue is a good one but might be independent here. |
I brought up some As @john-science put in #1066 (comment), it's totally possible for any plugin to define their own "version-as-a-setting" and do their own validation already. settings:
armiVersion: 0.2.6
mySnazzyAppVersion: 0.1.0
coolPluginVersion: 2.4.1 I would ask that there's some way to consolidate these, since collecting them all in a settings:
versions:
armi: 0.2.6
mySnazzyApp: 0.1.0
coolPlugin: 2.4.1 has a better UI (in my own opinion) p.s. this could open the door to version constraining later, e.g., settings:
versions:
armi: >=0.2.6
my snazzy app: <0.2.0 which would be awesome but a much harder lift. |
@drewj-usnctech Thanks! Also, this is my current favorite: settings:
versions:
armi: 0.2.6
mySnazzyApp: 0.1.0
coolPlugin: 2.4.1 |
Right now, all settings in the
CaseSetting
object are easily retrieved through the simple method:This is great. It easy to use and clear.
However, one setting is unique and different: "version" is the version of ARMI the simulation was run with, and it is in a special "metadata" area, outside the settings:
https://github.com/terrapower/armi/blob/fc26c390e01ce541e5f66fb530a89ada2479a6e9/armi/tests/armiRun.yaml#L1C1-L2
This is pretty annoying. Because you can't just do
cs["metadata"]
orcs["version"]
or anything. But people have frequently asked me how to get this information programmatically, because they need it. And I have to write them some code that fines and parses the YAML file in question NOT using ARMI oryamlize
.It would be an API change, but it feels like we should just remove the
metadata
tag entirely from this file, and makeversion
a regular setting.The text was updated successfully, but these errors were encountered: