-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat: Basic CRUD support for sections/subsections as containers [FC-0090] #36762
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: Basic CRUD support for sections/subsections as containers [FC-0090] #36762
Conversation
|
Thanks for the pull request, @ChrisChV! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
0fc836c to
3f6c616
Compare
* Created `test_subsection_permissions` * Created `test_section_permissions` * Rename `test_units_gets_auto_slugs` to `test_containers_gets_auto_slugs` and also test sections and subsections
* feat: `test_restore_units` renamed to `test_restore_containers` to also test restore section and subsections * refactor: Created `test_container_crud` to test all container types using ddt. * refactor: Created `test_container_permissions` to test all container types using ddt. * refactor: Created `test_containers_gets_auto_slugs` to test all container types using ddt
navinkarkera
left a comment
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.
@ChrisChV Nice work 👍
- I tested this: (Tested it with frontend from openedx/frontend-app-authoring#2032)
- I read through the code
- I checked for accessibility issues
- Includes documentation
@ChrisChV I actually need this for openedx/frontend-app-authoring#2032 so I went ahead and created this small PR: open-craft#785 with basic implementation. Please take a look and let me know if you want me to make any changes or if you want to take over and merge it here. |
bradenmacdonald
left a comment
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.
Looks great, thanks! Just a few nits. Please take a look at them before you merge.
| None, | ||
| ) | ||
|
|
||
| # TODO verify subsections in units |
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.
What's left to do here? This looks similar to the units case above.
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.
It was missing to add to the index the sections and subsections to which it is contained. Navin has advanced this part in #36762 (comment). I'll review it and update the tests.
| None, | ||
| ) | ||
|
|
||
| # TODO verify section in subsections |
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.
Same question.
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.
Same of #36762 (comment)
openedx/core/djangoapps/content_libraries/tests/test_containers.py
Outdated
Show resolved
Hide resolved
* Add `-> None` to tests * Add `-> list[str]` to `get_child_keys`
@navinkarkera Looks good! Thanks for this work! I think it's missing to update this TODOS's: This PR is ready to be merged, I think we should merge it to be able to unblock openedx/frontend-app-authoring#2013. I will create a separed PR with your work and I'm going to continue it 😄 |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
|
2U Release Notice: This PR has been deployed to the edX production environment. |
…090] (#36762) - Refactor of `test_containers.py` 8b9731d - Updates the `content_libraries/api/containers` and `content_libraries/rest_api` to support: - Basic CRUD for sections and subsections as containers - Basic CRUD support for section and subsection children - Updates the `content/search` to support: - Basic CRUD for sections and subsections as containers in the search index - Basic CRUD support for section and subsection children in the search index - Updates the `content_libraries/tests/test_containers.py` to test the new support - Updates the `content/search/tests` to test the new support. - I verified that the add/remove to collection works without major changes. Tests updated
Description
test_containers.py8b9731dcontent_libraries/api/containersandcontent_libraries/rest_apito support:content/searchto support:content_libraries/tests/test_containers.pyto test the new supportcontent/search/teststo test the new support.Supporting information
Testing instructions
Deadline
ASAP to unlock more tasks
Other information
To complete a full support it is known that the following is missing:
CONTENT_OBJECT_ASSOCIATIONS_CHANGEDget_containers_contains_componentin the API