-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[WIP] feat: call python methods from forum v2 #35490
[WIP] feat: call python methods from forum v2 #35490
Conversation
- directly call python native APIs from forum v2 for pin, unpin thread, commentables count_stats and get user's data by user_id - add forum to the edx-platform requirements
813c770
to
9126017
Compare
openedx/core/djangoapps/django_comment_common/comment_client/course.py
Outdated
Show resolved
Hide resolved
openedx/core/djangoapps/django_comment_common/comment_client/thread.py
Outdated
Show resolved
Hide resolved
- directly call python native APIs from forum v2 for get parent comment, create parent comment and create child comment. - rename retrieve_commentables_stats method to get_commentables_stats and retrieve_user to get_user.
- refactored code and now pass proper parameters to python native APIs instead of a single dict
As you folks are building this out, please use a
We can turn this flag on by default for Sumac. |
- get_user API tests are now passing in test_views.py and test_serializers.py - add get_user api patch in all tests - fix httppretty request count in some tests - fix test_patch_read_non_owner_user test
- add `ENABLE_FORUM_V2` course waffle flag to switch between old code i.e. cs_comment_service and new code i.e. forum v2. - mock course waffle flag is_enabled method i.e. ENABLE_FORUM_V2.is_enabled(), so that old unit tests can be run and passed. - refactor code(that parts of code whose native APIs are implemented till now) where we call the native APIs
eb04713
to
60703b4
Compare
- run `make compile-requirements forum`. Error: It appears that the Python dependencies in this PR are inconsistent: A re-run of `make compile-requirements` produced changes. - fix quality checks
60703b4
to
740b127
Compare
- fix new tests related to discussion that failed after fixing previous tests these are failing due to no.of argument difference https://github.com/openedx/edx-platform/actions/runs/11069160532/job/30756121710?pr=35490
738fa84
to
9440a91
Compare
9440a91
to
1447495
Compare
596a6fd
to
78e6536
Compare
fb0c2c9
to
5ef8196
Compare
course_id is needed to be used in second coursewaffle flag
90c31e7
to
c2111ef
Compare
43bf218
to
af8e057
Compare
0ff43a0
to
1df14f2
Compare
1df14f2
to
4bcf51b
Compare
openedx/core/djangoapps/django_comment_common/comment_client/models.py
Outdated
Show resolved
Hide resolved
07a50f0
to
40ff7f1
Compare
The goal of this PR is to integrate the new forum application into edx-platform. In practice, this means the following changes:
Note that this PR does not include all unit tests for the forum v2 native API. This is because migrating unit tests is taking much longer than expected. We will take out this PR from draft as soon as it is considered production-ready, despite the fact that some code in edx-platform might not be 100% covered. |
My branch rename as caused this PR to close... Sorry about that. Can you please open another PR @Faraz32123? Likewise for edly-io#585 |
Yeah, i noticed that. I'll sure create a new PR. |
New PR: #35671 |
This PR is still a work in progress and not yet ready for final review.
ENABLE_FORUM_V2
. If it's not set for the course, V1(cs_comment_service) will be called.ENABLE_FORUM_V2
.