-
Notifications
You must be signed in to change notification settings - Fork 36
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
Added Study Room Functions to to Library Module #177
Conversation
ghosteau
commented
Jun 9, 2024
- Added a function to check reserved Hillman library study room times, tied to which room is specifically reserved
- Added another function to check the total amount of reserved rooms in the Hillman library
Tells the user how many reservations are in the Hillman library, and also tells the user what rooms and times are reserved in the Hillman library.
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.
Some very slight spacing changes may have been made to lab module because I wanted to revert it back on my fork. Just ignore all changes outside of the library module
Please run |
I ran black through cmd, let me know if there is anything else that needs done. |
Co-authored-by: Tianyi Zheng <[email protected]>
I think I dealt with the merger conflicts -- I elected to choose the segments that were formatted with black to hopefully make readability for the API better for some portions. Do let me know if there is anything else, or anything I missed. |
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.
I think all the biggest issues (syntax errors, etc) have been fixed, so we can now let GitHub run our repo workflows on this PR before I comment on anything else in the code
So there were still more errors with |
Co-authored-by: Tianyi Zheng <[email protected]>
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.
The GitHub workflow is failing because of formatting issues. For future contributions, I highly, highly recommend that you set up pre-commit and other tooling that we use in this repo (I have a write-up on how to set up everything in #170, but it hasn't been merged yet). Pre-commit automatically checks for certain issues and runs tools like black
before you make a git commit, so it streamlines everything and you don't need to worry about formatting and stuff yourself.
- Added space at end of file - Enforced 2 spaces between functions
I added unit tests for both of the new functions and updated the sample path variable. For some reason I was having issues with the original sample path, so I updated it so the testing works good for all functions in the library_test file now.
I wrote the unit tests and I believe I cleaned up all of the slight errors with the hints and spacing. Let me know if there is anything else that needs done! For the unit tests I did make a new class for the new extension of the library module. If you want, I can add it to the old class, but I figured it would be easier to separate them since they do use different links and different mock JSONs. I also had to update the path to be |
I think it looks good, let's run the test workflow and see if there are any issues |
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.
black
is throwing an error again because of some minor formatting stuff (even though personally I think your code is fine)... see my comments below
Co-authored-by: Tianyi Zheng <[email protected]>
Co-authored-by: Tianyi Zheng <[email protected]>
Co-authored-by: Tianyi Zheng <[email protected]>
Everything looks good! The only thing left is to update all the type hints to use the built-in types rather than the |
Sounds good! I appreciate all of the help with the formatting especially! |
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.
All workflows/tests are passing, and I think everything looks good! Thanks for your work and for your patience with the tooling. As mentioned earlier, I highly recommend learning how to install and use pre-commit and other tools (see CONTRIBUTING.md), because that'll make the PR process much easier and more straightforward for everyone.