-
Notifications
You must be signed in to change notification settings - Fork 15
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
Dump selected sysinfo to tracklog. #424
Dump selected sysinfo to tracklog. #424
Conversation
84a027c
to
c43a4b4
Compare
|
c43a4b4
to
01cc11f
Compare
Excellent idea, looking good to me. How can I test it end-to-end? Install this branch of fmu_dataio in a komodo environment, but how do I test the schema version? @perolavsvendsen |
End-to-end testing would be perfect 👍 Not entirely sure if we can test the schema as part of that. But we do test the current examples in unit tests. So if the produced metadata "in the wild" is 1:1 with the example, that should confirm that all is good. It is also possible to validate produced metadata directly on the local (new) schema, using e.g. python validator. An old draft which includes a validator here which may be useful to look at. (But I think just confirming manually against the examples should be sufficient.) |
def read_named_envvar(envvar: str) -> str | None: | ||
"""Read a specific (named) environment variable.""" | ||
return os.environ.get(envvar, None) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a separate routine for this? (unless we want to make more checks etc, then the oneliner os.environ.get()
will do)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly not, but it made some sense to me to have a dedicated unit test on it. But I made that decision before I knew it would become just 1 line...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Possibly also add operating system info and host ID?
Added to the issue, sounds like a good second wave if the first works |
Solve #387
This PR includes some selected system information to the tracklog
created
entry when exporting data with fmu-dataio. The selected information include the current version offmu-dataio
used and the Komodo release when running in a Komodo environment.The purpose of this is to ease debugging and user support, i.e. "as a developer I would like to know which version of fmu-dataio was used, so that I can understand the users context, detect and solve problems quicker."
Put into metadata the answer to the most common first debugging question: "Which version of fmu-dataio is the user running?"
Updated
tracklog
entry in produced metadata: