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

feat: Add url that exposes taxonomy tags CRUD API #33525

Conversation

yusuf-musleh
Copy link
Member

Description

This PR exposes the CRUD API for Taxonomy Tags implemented in

Supporting information

Related tickets:

Testing instructions

  1. Run this branch in your local devstack
  2. Make sure you have some sample/test taxonomy data populated in your db, you generate some by following the instructions from this repo: https://github.com/open-craft/taxonomy-sample-data
  3. Check that the endpoint is available, example:
    1. You should be able to access the tags of a taxonomy by going to the following URL (replace PK with an actual PK): http://localhost:18010/api/content_tagging/v1/taxonomies/[PK]/tags/

Private-ref: FAL-3519

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 17, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @yusuf-musleh! 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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@yusuf-musleh
Copy link
Member Author

@bradenmacdonald @pomegranited I found an issue while testing. When I try to view Taxonomy Tags that have multiple level, the serializer in the openedx-learning fails because the reverse cannot find oel_tagging in the name space when running from edx-platform. When I remove the oel_tagging part, it works in edx-platform, but tests fail in openedx-learning.

I'll look more into it, but I assume there is a way to have the URL name spaces carry over for installed django apps?

@bradenmacdonald
Copy link
Contributor

bradenmacdonald commented Oct 17, 2023

@yusuf-musleh I'm not sure exactly what the issue is but it's definitely fixable. You may need to tweak something about how we import the URLs into cms. See here and here. Though from reading those docs it sounds like the namespace should already be automatically set up correctly, so I'm not sure exactly what the issue is. Maybe try adding an explicit namespace like this ?

@yusuf-musleh yusuf-musleh force-pushed the yusuf-musleh/add-crud-api-for-taxonomy-tags-url branch from 1ac511c to 423faa1 Compare October 18, 2023 10:39
@yusuf-musleh
Copy link
Member Author

yusuf-musleh commented Oct 18, 2023

@bradenmacdonald

Maybe try adding an explicit namespace like this ?

Seems like that did the trick, thanks! Looks like it was missing the inclusion of oel_tagging namespace from the urls. After adding it here fixed the issue.

Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Works well, thank you for working out the issue here @yusuf-musleh !

cms/urls.py Outdated Show resolved Hide resolved
@yusuf-musleh yusuf-musleh force-pushed the yusuf-musleh/add-crud-api-for-taxonomy-tags-url branch 2 times, most recently from 3c1d674 to 972b3b7 Compare October 20, 2023 07:29
@yusuf-musleh yusuf-musleh force-pushed the yusuf-musleh/add-crud-api-for-taxonomy-tags-url branch 4 times, most recently from e7d686f to 9add990 Compare October 23, 2023 08:39
Include `content_tagging` namespace for content_tagging urls in cms
for `sub_tags_link` to work in multi-level taxonomy tags.
@yusuf-musleh yusuf-musleh force-pushed the yusuf-musleh/add-crud-api-for-taxonomy-tags-url branch from 9add990 to 4194b65 Compare October 23, 2023 14:38
@bradenmacdonald bradenmacdonald merged commit 08d6607 into openedx:master Oct 23, 2023
63 checks passed
@bradenmacdonald bradenmacdonald deleted the yusuf-musleh/add-crud-api-for-taxonomy-tags-url branch October 23, 2023 18:07
@openedx-webhooks
Copy link

@yusuf-musleh 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants