Tagging: More powerful, flexible implementation of get_filtered_tags() [FC-0036]#92
Tagging: More powerful, flexible implementation of get_filtered_tags() [FC-0036]#92bradenmacdonald merged 16 commits intomainfrom
Conversation
|
Thanks for the pull request, @bradenmacdonald! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
|
@pomegranited @ChrisChV This is my last openedx-learning PR from the cleanup ticket. I wanted to get your opinion on it before I spend any more time. Can you check out the diff and tell me if you like this approach? I updated all the tests in |
|
@bradenmacdonald Your approach looks great! I think testing it on the LightCast taxonomy should be enough? I believe @jmakowski1123 has a copy. |
|
Thanks @pomegranited. Yep, we have a copy of the lightcast taxonomy and will soon have a script to import it: open-craft/taxonomy-sample-data#1 So I can soon test this with a large taxonomy. |
|
@pomegranited @ChrisChV Before - using our current version of With this change: I tested with the LightCast taxonomy from open-craft/taxonomy-sample-data#1 Here is the script I used: and to test the "before" version: |
a35fc81 to
4184c05
Compare
4184c05 to
005c5f3
Compare
2d5fb28 to
8b81b1b
Compare
|
@pomegranited @ChrisChV @yusuf-musleh OK, since it looks like we may need this (based on @yusuf-musleh's recent PR), I found time to finish it up. Just wanted to give you a heads up that this is almost ready. (Just need to fix some minor lint issues and make the corresponding edx-platform changes.) Does someone want to review? New ticket is MNG-3940. |
ee80cf0 to
237c83d
Compare
237c83d to
e7bb5ba
Compare
088cfe8 to
ee6d554
Compare
aff40fd to
941f473
Compare
pomegranited
left a comment
There was a problem hiding this comment.
This PR is excellent, @bradenmacdonald . I've left some questions and minor comments, but I'm thrilled with the whole approach.
Could you merge latest main? There's a few conflicts from #96, and I'd like to see this whole block go away.
cd40639 to
b567a3f
Compare
7cbaaf6 to
11d8461
Compare
|
@pomegranited Thanks for the review! I have addressed all your comments and updated this with |
11d8461 to
9e94ee4
Compare
pomegranited
left a comment
There was a problem hiding this comment.
👍 Excellent improvement, both in structure and performance.
Needs a version bump -- but OK to merge when that's done.
- I tested this running in the backend with the tag lists from open-craft/frontend-app-authoring#5, and it worked perfectly.
- I read through the code
-
I checked for accessibility issuesN/A - Includes documentation
- Commit structure follows OEP-0051
|
@bradenmacdonald 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
This proposal for the Tagging API combines the implementations of
get_tags(),get_filtered_tags(), andautocomplete_tags()into a singleTaxonomy.get_filtered_tags()method that can implement every type of pagination and search that I'm aware we'll need.It:
QuerySetso it supports any type of pagination or iteration over the whole setTagDatadictionaries instead ofTaginstances. It's better not to return Django models if possible since they don't distinguish between public and private API.The idea is to keep multiple more specific functions in
api.pybut have them all use thisget_filtered_tags()internally.TODO:
Private ref: MNG-3940