pittcsc / PittAPI

An API to easily get data from the University of Pittsburgh
https://pittapi.pittcsc.org
GNU General Public License v2.0
105 stars 30 forks source link

Added Study Room Functions to to Library Module #177

Closed ghosteau closed 2 weeks ago

ghosteau commented 2 weeks ago
tianyizheng02 commented 2 weeks ago

Please run black . in your local git repo to fix the formatting issues

ghosteau commented 2 weeks ago

I ran black through cmd, let me know if there is anything else that needs done.

ghosteau commented 2 weeks ago

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.

tianyizheng02 commented 2 weeks ago

So there were still more errors with black cuz we run black with extra command-line args and that was messing with things... I ran black again locally and pushed a commit to get the workflows to pass, sorry about all the fuss

ghosteau commented 2 weeks ago

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 SAMPLE_PATH = Path(__file__).parent / "samples" instead, because for some reason the tests were encountering issues using the previous method.

tianyizheng02 commented 2 weeks ago

I think it looks good, let's run the test workflow and see if there are any issues

tianyizheng02 commented 2 weeks ago

Everything looks good! The only thing left is to update all the type hints to use the built-in types rather than the typing library types (I cleaned up most of the types throughout the repo in a different PR, so it's best that we keep things consistent now). I'll handle this edit myself because GitHub's suggestion system limits where I can leave suggestions.

ghosteau commented 2 weeks ago

Sounds good! I appreciate all of the help with the formatting especially!