Skip to content
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

Tortoise conversion #582

Open
wants to merge 99 commits into
base: master
Choose a base branch
from
Open

Tortoise conversion #582

wants to merge 99 commits into from

Conversation

lhain08
Copy link
Contributor

@lhain08 lhain08 commented Apr 28, 2022

Issue

closes(#561 )

Database Changes/Migrations

Database is converted to Tortoise. This is not something that can be migrated. This should not be important, but merging can be postponed until somebody can take care of the migrations.

Test Modifications

No changes to actual end functionality.

lhain08 and others added 30 commits February 8, 2022 00:40
* update requirements

* added session test cases
* 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
* 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 <[email protected]>
lhain08 and others added 27 commits April 2, 2022 01:14
* converted event model

* added models path

* commented out old db tests
* converted course_corequisite

* converted course_corequisite

* updated course model

* fixed for pytests

* fixed for pytests

* workflows

* fixed for pytests

* fixed for pytests

* pytest fixings

* forgot to add last changes

* pytest fixes

* fixed tables init file

* course session tortoise conversion first draft (#567)

* course session tortoise conversion first draft

* fixing some issue

* fixed fields

Co-authored-by: canghiskhan <calvinang@icloud>
Co-authored-by: Liam Haining <[email protected]>
Co-authored-by: Liam Haining <[email protected]>

Co-authored-by: Liam Haining <[email protected]>
Co-authored-by: canghiskhan <[email protected]>
Co-authored-by: canghiskhan <calvinang@icloud>
Co-authored-by: Liam Haining <[email protected]>
* updated course model

* fixed for pytests

* fixed for pytests

* workflows

* fixed for pytests

* fixed for pytests

* pytest fixings

* pytest fixes

* course session tortoise conversion first draft (#567)

* course session tortoise conversion first draft

* fixing some issue

* fixed fields

Co-authored-by: canghiskhan <calvinang@icloud>
Co-authored-by: Liam Haining <[email protected]>
Co-authored-by: Liam Haining <[email protected]>

* Tortoise conversion coursecorequisite (#574)

* converted course_corequisite

* converted course_corequisite

* forgot to add last changes

* fixed tables init file

Co-authored-by: PhoenixTamaoki <[email protected]>

* Prerequisite model (#570)

* beginning tests on course models

* progress

* bulk upload tests now working

* removed database migrations, dependance on sql alchemy

* fixed corequisite

* Added checks for coreqs

Co-authored-by: canghiskhan <[email protected]>
Co-authored-by: canghiskhan <calvinang@icloud>
Co-authored-by: PhoenixTamaoki <[email protected]>
Co-authored-by: franchen28 <[email protected]>
* user-event tortoise conversion

* fix

* test case

* fix bugs

* fix bugs

* finish test cases; fix original sql error; add a new function: update user event

* fix

Co-authored-by: Liam Haining <[email protected]>
* convert to tortoise

* Update api/app.py, db, tests

* Change the db init and import from model

* Uncomment/Convert: delete and get methods

* Remove unnecessary Import

* Delete Comment

* Change course_name using $course$%s$course$

* change db_conn to db

* Attempt to debug arguments issues

* Remove from gitignore

* Add await

* attempt to debug course_selection in db

* Import model in model __init__ file

* debugging

Co-authored-by: Liam Haining <[email protected]>
* Converted SemesterInfo to Tortoise

* finished work on semester info

* debugging

Co-authored-by: Sachin Khanijow <[email protected]>
Co-authored-by: Sachin Khanijow <[email protected]>
* admin_settings tortoise ORM

* update the admin_setting

* test for admin_setting

* debugging

* removed commented code

Co-authored-by: Xies3 <[email protected]>
* finished app.py

* updated tests

* Finished Semester Date Range Model

* semester date mapping!

* worked on map date range tests!

* final updates

* additions to test map date range

* fixed app.py

* fixed map date range test

Co-authored-by: navyaa-24 <[email protected]>
@lhain08 lhain08 self-assigned this Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants