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/update get_building_lab_zones_list function #1670

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

Jiarongx-Xie
Copy link
Collaborator

Update the logic of get_building_lab_zones_list function and the test. Fixes #1463 >

@Jiarongx-Xie Jiarongx-Xie changed the base branch from master to develop March 7, 2025 18:49
@Jiarongx-Xie Jiarongx-Xie self-assigned this Mar 7, 2025
!= LightingSpaceOptions.LABORATORY_EXCEPT_IN_OR_AS_A_CLASSROOM
or space.get("function") != SpaceFunctionOptions.LABORATORY
and space.get("lighting_space_type")
== LightingSpaceOptions.LABORATORY_EXCEPT_IN_OR_AS_A_CLASSROOM
Copy link
Collaborator

Choose a reason for hiding this comment

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

The logic says: either are defined. And use whichever are defined. If they conflict then we can't determine whether it's a lab.
I think this should be

if (space.function == None and space.lighting_space_type == LABORATORY_EXCEPT_IN_OR_AS_A_CLASSROOM) or (space.function == LABORATORY and space.lighting_space_type == None)
or (space.function == LABORATORY and space.lighting_space_type == LABORATORY_EXCEPT_IN_OR_AS_A_CLASSROOM)
 -> space is lab.

I think in your logic, it is missing the third condition: (space.function == LABORATORY and space.lighting_space_type == LABORATORY_EXCEPT_IN_OR_AS_A_CLASSROOM)

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! I misunderstood the logic. It is corrected now.

@Jiarongx-Xie Jiarongx-Xie requested a review from weilixu March 8, 2025 01:43
@weilixu weilixu merged commit 88cf42b into develop Mar 10, 2025
2 checks passed
@weilixu weilixu deleted the RCT/JX/update_get_building_lab_zones_list branch March 10, 2025 18:49
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.

get_building_lab_zones_list()
2 participants