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

Update Term Planner to use React Query #1061

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e5a1138
Trying to make the term planner use react query (attempt 3)
Jun 24, 2023
eb9a76a
Term planner no errors moment? (it is still wrong)
Jul 3, 2023
d19553f
even less errors!
Jul 3, 2023
182e0c1
Add mutators for planner API
lhvy Jul 9, 2023
42de5c1
Made TermPlanner do useMutation correctly (I think).
Jul 15, 2023
319e9ff
Fixed mis-typed field in badPlanner
Aug 25, 2023
0ccf45b
Tried to rewrite DraggableCourse to use new backend structure
Aug 25, 2023
284e532
Removed unused assignments
Aug 25, 2023
d45f567
WIP Changes
lhvy Sep 1, 2023
840abd1
add toggleTermLocked route on BE
imagine-hussain Sep 2, 2023
b831dcc
partial move out of cousreInfo logic - need to merge in OG changes
imagine-hussain Sep 2, 2023
3702112
Almost finished term planner to react query
Sep 2, 2023
fc5c6d6
Run eslint
lhvy Sep 4, 2023
26c6e8a
Fix isLocked for frontend Term Planner
lhvy Sep 4, 2023
296c65a
Uncomment warning code in DraggableCourse
lhvy Sep 4, 2023
f7a8590
Temporarily bypass warning logic in
lhvy Sep 4, 2023
8773a6a
Remove useless comment
lhvy Sep 4, 2023
aeface7
Clean-up TermPlanner.tsx
lhvy Sep 4, 2023
e224f55
Minor eslint fixes
lhvy Sep 4, 2023
c1f30a8
Replace use of planner.courses with courses query
lhvy Sep 4, 2023
f6e7ad0
This should be working with the actual courses thing
Sep 4, 2023
3dfe3c3
do not git blame this
Sep 4, 2023
b3759af
WIP changes from like a term ago
lhvy Oct 21, 2023
715c160
Fix course selector
lhvy Oct 21, 2023
aae57c6
push right courses toboxes
imagine-hussain Oct 21, 2023
ce4056f
logs
imagine-hussain Oct 21, 2023
e8337f3
Semi-fix settings in term planner
lhvy Oct 21, 2023
97d8f19
Fix course dragging
lhvy Oct 21, 2023
7e72408
npm audit fix
lhvy Oct 21, 2023
70905c0
Fix locking terms
lhvy Oct 21, 2023
3f1987c
Fix issue after dragging multiple courses
lhvy Oct 21, 2023
fada9c7
Fix displaying marks on term planner
lhvy Oct 21, 2023
a0aab21
add uoc field to courses in user
martanman Nov 3, 2023
cb8a2a5
fix warnings (#1095)
Peedee2002 Dec 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,11 @@
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.cwd": "${workspaceFolder}/backend",
"mypy.configFile": "./backend/mypy.ini",
"files.exclude": {
"**/__pycache__": true,
"**/.hypothesis": true,
"**/.pytest_cache": true
},
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": [
"--rcfile=${workspaceFolder}/.github/workflows/.pylintrc"
],
"python.linting.mypyEnabled": true,
"python.linting.mypyArgs": [
"--config-file=${workspaceFolder}/backend/mypy.ini"
],
"python.analysis.typeCheckingMode": "basic",
"[python]": {
"editor.formatOnSave": false
Expand Down
4 changes: 0 additions & 4 deletions backend/algorithms/tests/test_autoplanning.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def get_uoc(course_name: str, courses: list[Course]):
def get_mark(course_name: str, courses: list[Course]):
return [course.mark for course in courses if course_name == course.name][0]

@mark.skip(reason = "Autoplanning incompatiable with migration")
def test_basic_CS_autoplanning():
assert_autoplanning_guarantees(
[
Expand Down Expand Up @@ -48,7 +47,6 @@ def test_basic_CS_autoplanning():
["COMPA1"]
)

@mark.skip(reason = "Autoplanning incompatiable with migration")
def test_more_complex_prereqs():
# pick courses with cancerous prereqs and check that it all makes sense
assert_autoplanning_guarantees(
Expand Down Expand Up @@ -82,7 +80,6 @@ def test_more_complex_prereqs():
["COMPBH"]
)

@mark.skip(reason = "Autoplanning incompatiable with migration")
def test_infeasable():
with raises(Exception):
# no terms have space
Expand Down Expand Up @@ -115,7 +112,6 @@ def test_infeasable():
]
)

@mark.skip(reason = "Autoplanning incompatiable with migration")
def assert_autoplanning_guarantees(uoc_max: list[int], courses: list[Course], program: str, specialisations: list[str]):
res = autoplan(
courses,
Expand Down
1 change: 0 additions & 1 deletion backend/algorithms/validate_term_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def validate_terms(data: ValidPlannerData):

currYear = data.mostRecentPastTerm["Y"]
pastTerm = data.mostRecentPastTerm["T"]

for yearIndex, year in enumerate(data.plan):
# Go through all the years
for termIndex, term in enumerate(year):
Expand Down
4 changes: 2 additions & 2 deletions backend/data/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# The latest current handbook year that we will maintain all the algorithms for
from typing import List

LIVE_YEAR: int = 2023
LIVE_YEAR: int = 2024

# The years for which we have archived
ARCHIVED_YEARS: List[int] = [2019, 2020, 2021, 2022]
ARCHIVED_YEARS: List[int] = [2019, 2020, 2021, 2022, 2023, 2024]

# TODO: Consider adding file paths to this file so we don't have to type out
# the exact path to write to every time
Expand Down
66,935 changes: 66,935 additions & 0 deletions backend/data/final_data/archive/formatted/2023.json

Large diffs are not rendered by default.

68,987 changes: 68,987 additions & 0 deletions backend/data/final_data/archive/formatted/2024.json

Large diffs are not rendered by default.

60,671 changes: 60,671 additions & 0 deletions backend/data/final_data/archive/processed/2023.json

Large diffs are not rendered by default.

62,554 changes: 62,554 additions & 0 deletions backend/data/final_data/archive/processed/2024.json

Large diffs are not rendered by default.

Loading