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

[NAT-4] NAT Rooms #495

Closed
wants to merge 17 commits into from
Closed

[NAT-4] NAT Rooms #495

wants to merge 17 commits into from

Conversation

octycs
Copy link
Contributor

@octycs octycs commented Apr 1, 2023

Resolves #34

Proposed Changes (include Screenshots if possible)

  • Merge rooms and their additional data from the NAT roomfinder

How to test this PR

  1. Recompile data
  2. Check in the UI what is included

How has this been tested?

  • Verified that the additional data is visible on the website

Checklist:

  • I have updated the documentation / No need to update the documentation
  • I have run the linter

@octycs octycs added the data This issue is related to the data collection and aggregation label Apr 1, 2023
@octycs octycs self-assigned this Apr 1, 2023
@octycs octycs marked this pull request as draft April 1, 2023 16:15
@octycs octycs mentioned this pull request Apr 1, 2023
5 tasks
Base automatically changed from nat-merger to main April 1, 2023 20:33
@octycs octycs marked this pull request as ready for review April 2, 2023 15:36
@octycs
Copy link
Contributor Author

octycs commented Apr 2, 2023

This is finished mostly. Only three things are missing currently:

  • Seating plans (example) that are linked in the NAT roomfinder are not given in the API
  • Some properties (usually comments) are currently not exported. I'm not sure how to best handle properties such as bauarbeiten or corona because they have a very mixed usage and might be outdated
  • Coordinates are not merged at the moment. The is because I haven't assessed their precision yet

Copy link
Member

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

These are some preliminary things I have found.

I have to look into the code a bit deeper, as there are some things (some code paths+how it looks in the frontend) I would like to investigate

data/processors/nat.py Outdated Show resolved Hide resolved
data/processors/nat.py Outdated Show resolved Hide resolved
data/processors/nat.py Outdated Show resolved Hide resolved
)


def _is_room_excluded(internal_id, b_id, data):
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a Docstring (imo this function does a bit of magic which I don't fully understand why yet)? 😅

return True


def _get_room_base(internal_id, b_id, nat_data, data, usages):
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a Docstring (you can probably betterdescribe what this function does)? 😅

Comment on lines 151 to 154
if len(building_sources) == 2 and building_sources[1]["name"] == "NAT Roomfinder":
return False

return True
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if len(building_sources) == 2 and building_sources[1]["name"] == "NAT Roomfinder":
return False
return True
return len(building_sources) != 2 or building_sources[1]["name"] != "NAT Roomfinder"



def _merge_nat_extra_props(r_data, nat_data):
# pylint: disable=too-many-branches
Copy link
Member

Choose a reason for hiding this comment

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

These are many branches, can we extract something into its own method?

I think infrastructure (seating, streaming, sockets) would be fitting

data/sources/00_areatree Show resolved Hide resolved
Copy link
Member

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

image
About the frontend-changes (here and not inline commented, to keep things more dense):

  • I would prefer alternative Seating Configurations Seating Plan
  • I would the seating to be displayed as a list. given that this is an eazy fix we can also postpone this one into another PR if you'd like
  • I would prefer Straming avalible via ... as a link text for hörsaal.webcam and linking to tum.live/about instead of the wiki entry for the RBG

What do you think?

@octycs
Copy link
Contributor Author

octycs commented Apr 4, 2023

I would the seating to be displayed as a list. given that this is an eazy fix we can also postpone this one into another PR if you'd like

I used a comma because it seems a list needs a change in the frontend (I tried to at least use \n instead of , first, but it didn't work).

I would prefer Straming avalible via ... as a link text for hörsaal.webcam and linking to tum.live/about instead of the wiki entry for the RBG

Given that only a handful of rooms have this property, should we rather add the data outselves in 02_rooms-extended.yaml. This way the data is more at a central place in case anything changes in the future (Did I understand it correctly, that the NAT roomfinder is to be discontinued?)

@CommanderStorm CommanderStorm marked this pull request as draft June 4, 2023 18:52
@CommanderStorm
Copy link
Member

I am going to close this due to the high amount of merge conflict.

I don't think navigatum should show the extended seating information as TUM has bought the TUMexam service pack and this is one of the things they do.
=> I don't think we should offer the seating information any more

The other information (e.g. extra rooms) has somewhat dubeous data quality and is thus quite hard to merge.. I don't have a good solution on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data This issue is related to the data collection and aggregation
Projects
No open projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Integrate extra information from the physics roomfinder
2 participants