-
Notifications
You must be signed in to change notification settings - Fork 222
Fix #4994 - Old materials OSC (< 0.7.4) cannot be loaded anymore #5378
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
Conversation
| TEST_F(OSVersionFixture, can_still_load_older_components) { | ||
| // see #4994 - Old materials OSC (< 0.7.4) cannot be loaded anymore | ||
| openstudio::path p = resourcesPath() / toPath("osversion/0_7_0/Brick_Fired_Clay_4_in_130_lb_ft3.osc"); | ||
| osversion::VersionTranslator vt; | ||
| boost::optional<model::Component> comp_ = vt.loadComponent(p); | ||
| ASSERT_TRUE(comp_) << "Failed to load Component " << p; |
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.
Fails before fix.
| if (m_isComponent && (is_component_update_needed || (lastVersion > VersionString(0, 7, 4)))) { | ||
| is_component_update_needed = true; | ||
| updateComponentData(idfFile); |
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.
Start updating component stuff only after 0.7.4
|
CI Results for d23ea4d:
|
joseph-robertson
left a comment
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.
I'm out of depth here. Why does the version need to be > 0.7.4 to update component data? Is this because as of 0.7.4 the idd is without OS:ComponentData:Attributes and OS:ComponentData:Tags objects? Shouldn't we be updating components starting with 0.7.4?
|
Yes, there is something specific related to Components
updateComponentData deals with the extensible groups, removing anything you may have removed from it. |
Pull request overview
Pull Request Author
src/model/test)src/energyplus/Test)src/osversion/VersionTranslator.cpp)Labels:
IDDChangeAPIChangePull Request - Ready for CIso that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.