find-free-rooms command#5
Draft
BasileBux wants to merge 1 commit into
Draft
Conversation
The registry is a way to get all the ids for students, teachers and rooms and their corresponding name. find-free-rooms uses the registry so that values aren't hard coded. This is slower but ensures it will work forever needing no maintenance.
Contributor
Author
|
Actually, there is an issue with even and odd weeks. The week checked is the first of the given semester, when it should check the two first weeks for even / odd weeks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I saw the #1 issue and thought I would implement it because it would be really useful.
For command to work, I needed to write the registry part. It fetches the students, teachers and rooms ids and corresponding names. This is a pretty slow operation but it allows the command not to depend on some cached list.
The command arguments are the following:
The command is really slow (~15sec execution) because it has to fetch the schedules for all rooms.
There are a few things that could be improved but I don't know what is best or haven't found a solution:
Let me know what you think about it and if you need me to make modifications I will be happy to do so!