-
Notifications
You must be signed in to change notification settings - Fork 1
add ascii sanitization and update safe name calls #53
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,14 +50,14 @@ def add_to_idf(self, idf: IDF) -> IDF: | |
| IDF: The updated IDF object. | ||
| """ | ||
| glazing_mat = SimpleGlazingMaterial( | ||
| Name=self.Name, | ||
| Name=self.safe_name, | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we have this change? Shouldn't
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, see below comment. These two were using Name not safe_name, so I just updated to safe_name to stay in convention with the Name of the other objects. We can poentially remove safe_name altogether |
||
| UFactor=self.UValue, | ||
| Solar_Heat_Gain_Coefficient=self.SHGF, | ||
| Visible_Transmittance=self.TVis, | ||
| ) | ||
|
|
||
| construction = Construction( | ||
| name=self.Name, | ||
| name=self.safe_name, | ||
| layers=[glazing_mat], | ||
| ) | ||
|
|
||
|
|
@@ -127,11 +127,9 @@ def add_infiltration_to_idf_zone( | |
| return idf | ||
|
|
||
| infiltration_schedule_name = ( | ||
| f"{target_zone_or_zone_list_name}_{self.safe_name}_INFILTRATION_Schedule" | ||
| ) | ||
| infiltration_name = ( | ||
| f"{target_zone_or_zone_list_name}_{self.safe_name}_INFILTRATION" | ||
| f"{target_zone_or_zone_list_name}_{self.Name}_INFILTRATION_Schedule" | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In fact, can we get rid of safe_name entirely now? Are there negative implications of the renaming at the instance level? My main fear is with references breaking in the IDF etc Let's maybe review together in person at some pt
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, I originally removed safe_name from everywhere and just kept name in place there, since that class method should take care of the sanitization, but was worried it may break some logic so opted for the less invasive change for now. Let's discuss though! |
||
| ) | ||
| infiltration_name = f"{target_zone_or_zone_list_name}_{self.Name}_INFILTRATION" | ||
| schedule = Schedule.constant_schedule( | ||
| value=1, Name=infiltration_schedule_name, Type="Fraction" | ||
| ) | ||
|
|
||
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.
Is it definitely ascii and not, say, utf-8 or some such that we want?
What does the
ignorearg do?