Skip to content

Commit

Permalink
Merge pull request #7812 from NREL/PluginInstanceIDDFix
Browse files Browse the repository at this point in the history
"Urgent" IDD fix for min-fields on new Plugin Instance object
  • Loading branch information
mitchute authored Feb 27, 2020
2 parents cc126b8 + 672db85 commit ca68d45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -108243,7 +108243,7 @@ PythonPlugin:SearchPaths,
PythonPlugin:Instance,
\memo A single plugin to be executed during the simulation, which can contain multiple calling points
\memo for the same class instance by overriding multiple calling point methods.
\min-fields 5
\min-fields 4
A1, \field Name
\required-field
\type alpha
Expand Down
4 changes: 4 additions & 0 deletions scripts/dev/generate_epJSON_schema/idd_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ def parse_idd(data):
if 'memo' in obj_data:
root['properties'][obj_name]['memo'] = obj_data.pop('memo')
if 'min_fields' in obj_data:
num_fields_with_name = len(obj_data['properties']) + 1
if int(obj_data['min_fields']) > num_fields_with_name:
if 'extensions' not in obj_data['properties']:
raise RuntimeError("Object with min-fields > num_fields. Object name = " + obj_name)
root['properties'][obj_name]['min_fields'] = obj_data.pop('min_fields')
if 'extensible_size' in obj_data:
root['properties'][obj_name]['extensible_size'] = obj_data.pop('extensible_size')
Expand Down

7 comments on commit ca68d45

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2024 of 2024 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (mitchute) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (mitchute) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (11 of 11 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1313 of 1313 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (mitchute) - Win64-Windows-10-VisualStudio-16: OK (2008 of 2008 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (693 of 694 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 693
  • Timeout: 1

Build Badge Test Badge Coverage Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (mitchute) - x86_64-MacOS-10.13-clang: OK (2012 of 2012 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.