pittcsc / PittAPI

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

Gym module created #185

Closed csidarous closed 1 month ago

csidarous commented 3 months ago

Created Gym module to scrape data of all the gym counts and returns as a dictionary.

tianyizheng02 commented 3 months ago

Tests are failing because of formatting issues with black. Please check out the contributing guidelines for installing and running the dev tools we use. Ideally you should be using pre-commit to check for spacing issues, formatting issues, etc. prior to committing your code.

Steven-Jarmell commented 3 months ago

I have a lot of historical data for this stored, feel free to use this URL to access it: https://pitt-gym-tracker.vercel.app/api/gymdata/Baierl%20Rec%20Center

tianyizheng02 commented 2 months ago

Also, looks like unit tests are failing:

>       self.assertEqual(gym_info["Baierl Rec Center"], "200")
E       AssertionError: '0' != '200'
E       - 0
E       + 200

You can find more details in the test logs

csidarous commented 2 months ago

Thanks both for your feedback and guidance. I made the requested updates and changed to the Gym module. I will try my best to add more tests.

Steven-Jarmell commented 1 month ago

Hey @csidarous, the commit message that you just sent has a typo at the beginning. Let's be more careful about this and hold a high bar.

Steven-Jarmell commented 1 month ago

Also considering that there are 8 commits, once Tianyi is satisfied, let's rebase and squash them into one commit.

tianyizheng02 commented 1 month ago
Name                  Stmts   Miss Branch BrPart  Cover   Missing
-----------------------------------------------------------------
...
pittapi/gym.py           40      0     10      0   100%

Nice, 100% coverage 👍

tianyizheng02 commented 1 month ago

Thanks for all your work, @csidarous!