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

Code quality #1

Open
SheepTester opened this issue Apr 18, 2023 · 5 comments
Open

Code quality #1

SheepTester opened this issue Apr 18, 2023 · 5 comments

Comments

@SheepTester
Copy link
Member

if letter_grade == "A➕"
return convert(Grade, 13)
elseif letter_grade == "A"
return convert(Grade, 12)
elseif letter_grade == "A➖"
return convert(Grade, 11)
elseif letter_grade == "B➕"
return convert(Grade, 10)
elseif letter_grade == "B"
return convert(Grade, 9)
elseif letter_grade == "B➖"
return convert(Grade, 8)
elseif letter_grade == "C➕"
return convert(Grade, 7)
elseif letter_grade == "C"
return convert(Grade, 6)
elseif letter_grade == "C➖"
return convert(Grade, 5)
elseif letter_grade == "D➕"
return convert(Grade, 4)
elseif letter_grade == "D"
return convert(Grade, 3)
elseif letter_grade == "D➖"
return convert(Grade, 2)
elseif letter_grade == "P"
return convert(Grade, 0)
elseif letter_grade == "F"
return convert(Grade, 0)
elseif letter_grade == "I"
return convert(Grade, 0)
elseif letter_grade == "WP"
return convert(Grade, 0)
elseif letter_grade == "W"
return convert(Grade, 0)
elseif letter_grade == "WF"
return convert(Grade, 0)

if int_grade == 13
return "A➕"
elseif int_grade == 12
return "A"
elseif int_grade == 11
return "A➖"
elseif int_grade == 10
return "B➕"
elseif int_grade == 9
return "B"
elseif int_grade == 8
return "B➖"
elseif int_grade == 7
return "C➕"
elseif int_grade == 6
return "C"
elseif int_grade == 5
return "C➖"
elseif int_grade == 4
return "D➕"
elseif int_grade == 3
return "D"
elseif int_grade == 2
return "D➖"
elseif int_grade == 0
return "F"

elseif str == "prefix"
course1.prefix == course2.prefix ? is_matched = true : is_matched = false
elseif str == "num"
course1.num == course2.num ? is_matched = true : is_matched = false
elseif str == "name"
course1.name == course2.name ? is_matched = true : is_matched = false
elseif str == "canonical name"
course1.canonical_name == course2.canonical_name ? is_matched = true : is_matched = false
elseif str == "credit hours"
course1.credit_hours == course2.credit_hours ? is_matched = true : is_matched = false

@SheepTester
Copy link
Member Author

if !(string(header) in names(row)) #I assume this means if header is not in names

@SheepTester
Copy link
Member Author

Not from CA but I found this while trying to figure out how Pandas infers types

https://github.com/pandas-dev/pandas/blob/d3bc3722aeccb03841cda617c17f042736b04bb3/pandas/io/parsers/c_parser_wrapper.py#L314

@SheepTester
Copy link
Member Author

if course_dict[c_ID].id == course.id #This could be simplified with logic
if typeof(row[Symbol("Term")]) != Missing #operations rather than four if statemnts

@SheepTester
Copy link
Member Author

SheepTester commented May 4, 2023

I do not think this code has been tested

if typeof(reqs) != Missing
for req in req

@SheepTester
Copy link
Member Author

SheepTester commented May 4, 2023

curric_dtype = "\nDegree Type," + '"' + str(curric.degree_type) + '"' + ",,,,,,,,,"
csv_file.write(urric_dtype)

typo here

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

No branches or pull requests

1 participant