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

RCT/JX/Rule5-39 #1196

Merged
merged 10 commits into from
Jan 16, 2024
Merged

RCT/JX/Rule5-39 #1196

merged 10 commits into from
Jan 16, 2024

Conversation

Jiarongx-Xie
Copy link
Collaborator

This ruleset has not been tested.

Copy link
Collaborator

@weilixu weilixu left a comment

Choose a reason for hiding this comment

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

Good work and you are getting close to the finish line.
Some comments need to address.

@Jiarongx-Xie
Copy link
Collaborator Author

Jiarongx-Xie commented Nov 22, 2023

Good work and you are getting close to the finish line. Some comments need to address.

Thanks Weili for the comments and clarification! I thought the required_fields required_fields={ "$": ["weather", "ruleset_model_descriptions"], "$.weather": ["ground_temperature_schedule"], } could prevent the None exception. If it does not, do we still keep this field? Can you confirm this? Thank you! @weilixu

@weilixu
Copy link
Collaborator

weilixu commented Nov 22, 2023

Good work and you are getting close to the finish line. Some comments need to address.

Thanks Weili for the comments and clarification! I thought the required_fields required_fields={ "$": ["weather", "ruleset_model_descriptions"], "$.weather": ["ground_temperature_schedule"], } could prevent the None exception. If it does not, do we still keep this field? Can you confirm this? Thank you! @weilixu

You are correct.
If that is the case, you can directly do
ground_temperature_schedule = rpd["weather"]["ground_temperature_schedule"] Because the required_fields guaranteed the existence of these data. Using .get is confusing because .get return type is None | any
Similiarly, you should be safe to get the rmds by rmds = rpd["ruleset_model_instances"]

@Jiarongx-Xie
Copy link
Collaborator Author

Great! Thank you for the clarification!

@Jiarongx-Xie Jiarongx-Xie requested a review from weilixu November 22, 2023 22:59
@weilixu
Copy link
Collaborator

weilixu commented Dec 30, 2023

@Jiarongx-Xie when updating this rule, please change the rule id to 5-38, and rebase the pull request to RT/JG/section_5_numbering_update

@Jiarongx-Xie Jiarongx-Xie changed the base branch from develop to RT/JG/section_5_numbering_update January 2, 2024 14:46
Copy link
Collaborator

@weilixu weilixu left a comment

Choose a reason for hiding this comment

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

@Jiarongx-Xie There are some stylist comments but one of them needs to be addressed.

rpd = context.BASELINE_0
return any(
[
surface_b
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can do more explicit logic here:

any([get_opaque_surface_type(surface_b) == OST.BELOW_GRADE_WALL for surface_b in find_all(..., rpd)])

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch!

)
def applicability_check(self, context, calc_vals, data):
ground_temperature_schedule = calc_vals["ground_temperature_schedule"]
return ground_temperature_schedule
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think here you miss the get_manual_check_required_msg function to determine the message according to the RDS.
if ground_temperature_schedule exist, then return It cannot be determined if the ground temperature schedule for the project is representative of the project climate.
else:
A ground temperature schedule was not found for the project.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Addressed!

@Jiarongx-Xie
Copy link
Collaborator Author

Jiarongx-Xie commented Jan 13, 2024

@Jiarongx-Xie There are some stylist comments but one of them needs to be addressed

Thank you Weili for the review. I have addressed these comments. @weilixu

@Jiarongx-Xie Jiarongx-Xie requested a review from weilixu January 13, 2024 00:25
@weilixu
Copy link
Collaborator

weilixu commented Jan 16, 2024

@Jiarongx-Xie There are some stylist comments but one of them needs to be addressed

Thank you Weili for the review. I have addressed these comments. @weilixu

I did not see updates, have you pushed your commits?

@weilixu weilixu merged commit 97a714f into RT/JG/section_5_numbering_update Jan 16, 2024
2 checks passed
@weilixu weilixu deleted the RCT/JX/Rule5-39 branch February 6, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants