Closed ZhongweiL closed 3 years ago
@mZneit, if you have time, can you review this PR? How can we deploy it to see it in action? Thanks
I tested this locally. It works but it's only limited to 4 rounds. We already have more than that so it needs to be generalized to an arbitrary number of rounds.
How about I change it to display the maximum number of rounds in the list of commits?
Thanks, Manal.
@ZhongweiL yes, you need the code to find the maximum number of rounds in the commits table and then filter the categorizations based on the requested round number.
Thanks. This works well. It filters the categorizations by round number. OPTIONAL: @ZhongweiL can you think of a method that is more time efficient? The filter takes a bit long to display the tables. Maybe a more efficient way to find the maximum number of rounds?
Since the rounds are sorted in the commits table, maybe we can search starting from the end of the table and get the first value that is numeric. But I'm not sure if Django allows us to do that. Do you have any suggestions?
I think this is a good idea. But if the rounds column is not sorted we'll miss the maximum. I think we can get the values of rounds in all commits and remove duplicates. This will result in a small set where the max can be found efficiently.
Isn't that the same speed as the current implementation? Getting values of rounds from all commits also takes linear time.
I was thinking of changing the data structure. Storing the rounds values_list in a set will remove all duplicates. That's fine I will merge the current implementation.
Are there any extraneous DB queries?
Actually after making few GET request to test the rounds I got the error: exceeded the 'max_questions' resource (current value: 3600)").
I modified the code. I think it was a complicated query that was causing the slow down but the code was correct.
Allow categories to be filtered by url query parameter, setting up a form that sends query parameters to the categories page. Intends to resolve issue https://github.com/ponder-lab/Imperative-DL-Study-Web-App/issues/93