Conversation
Results are not yet filtered or sorted in any way before they are returned though
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.
I made quite a few comments, but most of them are just simple formatting changes/slight performance boosts. Good job on this PR, especially considering you figured out most of it by yourself
See #155 and my comments on |
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.
Just some small import fixes!
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.
A couple small changes I noticed should be made when working on my branch
Also, given that a lot of these commits intersect with #142, I think it's best that we merge this with |
Remaining requested changes have been made. |
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.
Great jobs with the tests!
Also, I got the tests setup locally and can confirm that they're passing.
I'd also like to merge backend/master
into this soon, so lemme know when you're done making your next set of changes @ThatJuanGuy
Kinda late but I made the latest requested changes. |
Merged |
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.
Just a few minor changes
Latest requested changes have been made |
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.
Some really small changes and then this looks perfect
Made the changes |
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.
This looks good to go, great job! Ryan's gonna squash some of these commits together then merge it.
-contains changed to startswith so that when 201 is in the 'search' parameter it doesn't return every course that takes in a 201X term instead of courses with the number 201. However, department must be inputted before the course number now. Suggested formatting and typo fixes Co-Authored-By: Gannon Prudhomme <gannonprudhomme@users.noreply.github.com> Co-Authored-By: Ryan Conn <rconn478@gmail.com>
Co-Authored-By: Ryan Conn <rconn478@gmail.com> Co-Authored-By: Gannon Prudhomme <gannonprudhomme@users.noreply.github.com> Fixes the remaining formatting issues
Removes /api/sections and /api/course
Added test for course names including numbers Added test for search with lowercase text
Test for "CSCE 3" now has to filter results with non-matching numbers Added test for lowercase string with numbers ("csce 3") Updated test for "csce" to include newly added course
Changed setUp method to setUpTestData Changed model saving to use bulk create Updated api/terms test to use bulk_create Made docstrings more descriptive
This was so they could be called in api_tests.py
Also deleted some extra empty lines and added pylint silencing comments to get_desc and get_course. Removed another empty line Silenced parameters differ pylint warning Fixes description for test_api_term_serializer_gives_expected_output_professional Co-Authored-By: Gannon Prudhomme <gannonprudhomme@users.noreply.github.com>
test_api_term_serializer_handles_(un)defined_season_correctly is now called test_season_num_to_string_handles(un)defined_season_correctly to be more clear as to what is actually being tested. This was also done to campus_num_to_string related tests.
String formatting to remove spaces in search parameter is now done when search variable is assigned to rather than during the .filter in RetrieveCourseSearchView
Fixed description of some tests The description on some tests was inacurrately referencing section serializer instead of the serializer actually beng tested
…ed in search parameter
Code readability improvements Silences "Too many public methods" pylint warning in api_tests.py Co-Authored-By: Gannon Prudhomme <gannonprudhomme@users.noreply.github.com> Removes unecesary department saving in api_tests.py Code readability improvements
3276b57
to
f3397d6
Compare
Implements api/terms and api/course/search. For api/course/search, white space between the department and course number is trimmed. Department must also be entered before course number in the search parameter.