Skip to content
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

OS App v1.0.0 "Measures" tab does not properly render Reporting Measure Arguments #108

Closed
chrisbalbach opened this issue May 11, 2020 · 11 comments

Comments

@chrisbalbach
Copy link

Issue overview

OS App v1.0.0 "Measures" tab does not render Reporting Measure Arguments

Current Behavior

While a Reporting measure can be added to a .osm model using the "Measures" tab, NONE of the measure arguments are rendered in the OS App UI.

This means OS Reporting measures, if executed as part of a simulation, will only successfully execute if all 'required' arguments have defaults set to user-desired values.

Otherwise, there is no way (in the OS App GUI) to change the argument value.

  1. Maneuver to 'Measures' Tab in workflow ribbon
  2. Drag and Drop a "Reporting" measure (from BCL or otherwise) that has been authored to contain 'Arguments'. The "OS Results" measure or "Generic QAQC" measure can be used to demonstrate the bug. While the measure does appear to be added to the model, the measure arguments are not rendered in the UI. This means reporting measures, if executed, will only successfully execute if: All 'required' arguments have defaults. Otherwise, there is no way (in the OS App GUI) to change the argument value.

Expected Behavior

The measure, when applied to the model via the drag and drop feature, should render the arguments in the GUI such that an OS App user can select from them.

Steps to Reproduce

  1. Open the OS App, beginning with a a 'naked' .osm file
  2. Maneuver to 'Measures' Tab in the workflow ribbon
  3. Drag and Drop a "Reporting" measure (from BCL or otherwise) that has been authored to contain 'Arguments' - The "OS Results" measure or "Generic QAQC" measure can be used to demonstrate the bug.

Possible Solution

.osm files opened or created in OS Application v2.9.1 does not exhibit this behavior.
.osm files created in OS Application v2.9.1 then opened in OS Application v1.0.0 do exhibit this behavior.

Environment

OS Application v1.0.0, build # 4f5416c, running on Windows 10 OS

Context

This bug significantly minimizes overall OS App usability by making OS Reporting measures only usable via direct CLI based workflows.

@chrisbalbach chrisbalbach added the Triage Issue needs to be assessed and labeled, further information on reported might be needed label May 11, 2020
@DavidGoldwasser
Copy link
Contributor

Seems to be related to this code change here. (Thanks Phylroy!)
NREL/OpenStudio@41388ba#diff-9940e92849a5870672e98bb83e0cb6fb

When I changed def arguments to def arguments(model) then the arguments showed up in the GUI. So one fix is to update all the reporting measures, external users would need to do the same (although there are not many external reporting measures, but there are some). Or the application can be updated to be compatible with measures that don't pass in the model.

@macumber
Copy link
Collaborator

macumber commented Jun 4, 2020

I did this for the ViewModel and ViewData measures, I suggest changing all the reporting measures to:

def arguments(model = nil)

That way you support 0-1 arguments

@macumber
Copy link
Collaborator

macumber commented Jun 4, 2020

@DavidGoldwasser
Copy link
Contributor

Thanks @macumber that seems like nice approach.

@DavidGoldwasser
Copy link
Contributor

Note, while testing this I confirmed that bool arguments always show as true. There is an existing open issue for that. That issue isn't limited to reporting measures
#85

@DavidGoldwasser
Copy link
Contributor

I can't figure out why, hard to diff XML from BCL vs. GitHub repo, but while arguments show for GitHub copy when brought in through MyMeasures directory, the BCL copy (made from GitHub copy) doesn't work. No idea why at this point. Screenshots are below. I threw away my BCL directory and made a fresh OSM for this test.

For reference test and BCL upload are from this branch ,not develop.
https://github.com/NREL/openstudio-common-measures-gem/tree/bcl_stage_updates

GitHub copy
Screen Shot 2020-06-25 at 2 12 44 PM

BCL Copy
Screen Shot 2020-06-25 at 2 16 52 PM

@kflemin and @nllong any thoughts?

@DavidGoldwasser
Copy link
Contributor

:( Well this at least explains an error on UH about failed reporting measure with no Output in OSW. Here is bug filed for the Measure, that I can only reproduce with BCL copy of measure, not GitHub repo copy
NREL/openstudio-common-measures-gem#23

@jmarrec jmarrec added component - UI severity - Major Bug 💥 and removed Triage Issue needs to be assessed and labeled, further information on reported might be needed labels Jul 28, 2020
@jmarrec
Copy link
Collaborator

jmarrec commented Jul 28, 2020

Related PR where I made the change to allow accepting model in the arguments() method of the reporting measures: NREL/OpenStudio-workflow-gem#94

@MatthewSteen
Copy link

I did this for the ViewModel and ViewData measures, I suggest changing all the reporting measures to:

def arguments(model = nil)

That way you support 0-1 arguments

@macumber's fix worked for me on this measure...

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 4, 2021

Not sure what else to do there...

@macumber
Copy link
Collaborator

I think this can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants