-
Notifications
You must be signed in to change notification settings - Fork 377
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
NewFeature: Add measurement unit output for API #10367
base: develop
Are you sure you want to change the base?
Conversation
So actuators and internal variables are coming out of the CSV with the units in square brackets. Meters and output variables are coming out without them: Feels like it is worth making them consistent. I don't really care which way we go, the brackets feel a smidge unnecessary, but I don't care either way as long as they are consistent. |
The rdd reports with square brackets:
as well as many warning messages:
|
That's fine, like I said, I don't have any problem with the square brackets, I just want this new output to be consistent throughout all the different categories 👍 |
Apparently the unit definitions are all over the place, which explains the inconsistency. Ideally we should have one single enum + string helper class shared by all subsystems and exposed by the API. The current API obviously would need to be revamped to accommodate enums though.. (swig could be used to reduce much of the boilerplate in the API code) |
@chen1682-ntu-edu-sg could you confirm whether you've submitted a contribution policy agreement for EnergyPlus? In order for us to accept these changes, we'll need to get that in place, if it's not already. I couldn't find it in my list, but perhaps I just missed it. You can find information here, and you can also email me: edwin dot lee at nrel dot gov, and I can help you out. I am willing to push some fixes to get this closer to merge, but don't want to go down that route until the agreement is in place. |
Yep. See #10219 (comment). |
@Myoldmopar @chen1682-ntu-edu-sg @Myoldmopar it has been 28 days since this pull request was last updated. |
1 similar comment
@Myoldmopar @chen1682-ntu-edu-sg @Myoldmopar it has been 28 days since this pull request was last updated. |
@Myoldmopar @dogganon @Myoldmopar it has been 28 days since this pull request was last updated. |
Pull request overview
This PR adds units of measurement to the output of
getAPIData
(python:get_api_data
) andlistAllAPIDataCSV
(python:list_available_api_data_csv
) in the data transfer API. A new field namedunit
is added to the classAPIDataEntry
(python:APIDataExchangePoint
) and a new column is added to the CSV for variables with units.The purpose of this PR is to provide additional (and critical!) information to the API users.
The absence of such information can have serious consequences (see https://usma.org/unit-mixups#locale-notification), including the loss of lives.
Users should NOT rely on external documents for this type of information. The API should be the authoritative single source of truth.