-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fast api conversion #565
Merged
Merged
Fast api conversion #565
Conversation
This file contains 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
* update requirements * added session test cases
This reverts commit 841505d.
* Finished first draft of tests for class and department endpoints * Fixed issues with the first draft tests * made recommended changes and added note to class endpoint check about admin non-public semesters
* preliminary fastapi converting * converted to FastAPI * implemented fastapi-cache * removed backup * removed no longer needed commented code * removed no longer needed commented code * converted pytests to use FastAPI TestClient, added automation script * moved markers from conftest to .ini * added documentation for how to update endpoints and added CI for running tests * commented out tests that need updating * added missing requirement * set env variables * automated database cleaning * updated old mock_cache to work for fastapi-cache so old pytests work * uncommented CI step for old pytests
* semester and subsemester tests * updated comments
* Create test_user_course.py * Update test_user_course.py * Update failure case and minor change on success post * Minor changes * Debugging json on line 26 * Passed post success and failure for user/course * Clear comments for pr requirements * Added not authorized test and followed pr requirements
… into FastAPIConversion
* Finished Semester Info Endpoint * Finished Default Semester Endpoint
* added session test cases * test * test user-get success * test user get false * test user put * Fixed test client sessions * delete cookie, using session * delete unrelated comments * add post_user * add test_get_user_after_session_closed * test put user after session closed * remove unrelated code * remove print Co-authored-by: Liam Haining <ljhaining@gmail.com>
* some brief changes * test * add to api_models * change some fastapi tests * try chaning to fastapi * current progress * request.session * not in request.session * request: Request * status_code * test bug * change test client back * remove unrelated comment
* app.py * fix? * fixed tests Co-authored-by: Sachin Khanijow <sachinkhanijow@chikadee-377.dynamic.rpi.edu>
* modify the api user course delete function * fastapi-conversion-course-get-and-delete * arg for remove_selection
…into FastAPIConversion
DarknessUnder
approved these changes
Apr 5, 2022
jaw12346
reviewed
Apr 5, 2022
jaw12346
reviewed
Apr 5, 2022
jaw12346
reviewed
Apr 5, 2022
jaw12346
reviewed
Apr 5, 2022
jaw12346
reviewed
Apr 5, 2022
jaw12346
reviewed
Apr 5, 2022
jaw12346
requested changes
Apr 5, 2022
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.
Please check the comments that I made regarding dead code. If this remaining dead code is intentionally still in the files, you have my approval.
jaw12346
approved these changes
Apr 5, 2022
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.
Issue
Converted API from Flask to FastAPI and wrote test cases for all endpoints
Database Changes/Migrations
No database changes
Test Modifications
Added unit tests for all api endpoints, new CI workflow step for API Tests.
Tests located in src/api/tests
Test Procedure
Checkout this branch and run
This will execute all tests.
You can also run the development docker containers and go to localhost:5000/docs or localhost:5000/redoc to see all documentation for the new API
Photos