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

Adds word cloud xblock extracting from edx-platform repo #4

Merged
merged 17 commits into from
Feb 18, 2025

Conversation

farhan
Copy link
Contributor

@farhan farhan commented Jul 12, 2024

Adds word cloud xblock extracting from edx-platform repo

Test PR

Make a test PR on edx-platform like this to run test cases on under development PR.

Some on going changes in word cloud xblock

https://github.com/openedx/edx-platform/pull/36199/files#diff-a0f8168df87bd0334ca63f0abf7c52b2be89224c80bf10aad43ba00234cb21d0

File references:

  • xblocks_contrib/word_cloud/word_cloud.py has been extracted from
  • xblocks_contrib/word_cloud/static/html/word_cloud_xblock.html has been extracted from
  • xblocks_contrib/word_cloud/static/js/src/word_cloud_xblock.js and other d3-cloud files has been extracted from
  • xblocks_contrib/word_cloud/static/css/word_cloud_xblock.css has been extracted from lms/static/css/WordCloudBlockDisplay.css

Acceptance Criteria:

  • Extracted XBlock user experience should behave normal if required global css variables donesn't exist
  • Extracted XBlock funcationality should work fine after turning its relevant Django Settings Flag
  • In existing built in xblock implementation of edx-platform, update the status or data of the XBlocks. Then change the Django Settings flag and verify after shifting to extracted one, XBlocks are maintaining their required states (including XBlock completion status).
  • Also test the vice versa of above step, change XBlock from Extracted one to Built in implementation to check fallback case testings.
  • i18n is supported in the XBlock
  • Create a course, add multiple XBlocks in the course. Keep different XBlocks in diversity of states (done/un-done etc). Export the course then validate the XBlock states after importing it again.
  • Make a test PR for the extracted PR like this and fix the test cases if required.
  • Write further unit test cases for good code coverage

@farhan farhan marked this pull request as ready for review July 24, 2024 14:06
@farhan farhan linked an issue Jul 25, 2024 that may be closed by this pull request
@farhan farhan force-pushed the farhan/word-cloud-xblock branch 2 times, most recently from 200a788 to 91432f2 Compare July 30, 2024 07:34
Copy link
Member

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

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

Just a couple nits so far, but generally this is looking great. I still need to test it myself, but it's exciting to hear that you have this working in edx-platform 🔥

@kdmccormick kdmccormick self-requested a review August 20, 2024 18:24
@kdmccormick
Copy link
Member

kdmccormick commented Sep 4, 2024

I'm going to hold off on testing this for now. Let's focus on getting all the stub XBlocks into #2, getting that reviewed and merged, and then getting the waffle flags into edx-platform. That way, it will be easy to test this PR in edx-platform.

@kdmccormick kdmccormick removed their request for review September 4, 2024 18:30
Base automatically changed from core-xblocks to main October 7, 2024 13:59
@farhan farhan force-pushed the farhan/word-cloud-xblock branch 3 times, most recently from 5ed4627 to 3c289df Compare October 9, 2024 06:21
@farhan farhan force-pushed the farhan/word-cloud-xblock branch from b5b6bf9 to 24544fb Compare November 8, 2024 13:01
@farhan farhan requested a review from kdmccormick November 8, 2024 13:13
Copy link
Member

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

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

Could you rebase this Farhan? Then I'll be happy to test this using new flag we've added to edx-platform.

@farhan
Copy link
Contributor Author

farhan commented Dec 3, 2024

@kdmccormick This PR's branch is already up-to-date with the main branch.

  • I think, we can test it on edx-platform by manually install it pip install path-to-xblocks-contrib-proj
  • I think, we can run test cases on them, after merging it, releasing a new version and then update on edx-platform`
  • I have created this Test PR on edx-platform as well

Please suggest if we have better ways to do
cc: @irtazaakram @ttqureshi

@kdmccormick
Copy link
Member

@farhan to test locally with tutor, you can mount the repo and rebuild+reboot:

tutor mounts add path/to/xblocks-contrib
tutor images build openedx-dev
tutor dev reboot

With that setup, you should be able to git switch between xblocks-contrib branches and see that the LMS and CMS containers automatically restart using branch's code.

@kdmccormick
Copy link
Member

Farhan mentioned in sync-up that this is ready for review.

@farhan farhan force-pushed the farhan/word-cloud-xblock branch from a43d3ea to ab17b6f Compare February 3, 2025 07:52
Copy link
Member

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

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

I gave this a skim, and I see nothing wrong architecturally 👍🏻

Please take a look at the testing issues I've mentioned in openedx/edx-platform#35983, and also please have someone on Aximprovements review this PR . Once both of those are done, I'm happy to give a quick final review pass.

@farhan farhan requested a review from a team February 6, 2025 06:38
@farhan
Copy link
Contributor Author

farhan commented Feb 11, 2025

I gave this a skim, and I see nothing wrong architecturally 👍🏻

Please take a look at the testing issues I've mentioned in openedx/edx-platform#35983, and also please have someone on Aximprovements review this PR . Once both of those are done, I'm happy to give a quick final review pass.

@kdmccormick Thanks for looking into it

I have fixed the issue and everything is working fine now
Pass from @openedx/axim-aximprovements is pending

@@ -20,7 +20,12 @@ def test_my_student_view(self):
as_dict = frag.to_dict()
content = as_dict["content"]
self.assertIn(
"WordCloudBlock: count is now",
"Word cloud",
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can do it another PR. Let's priortize publishing of this XBlock 🚢

@farhan farhan force-pushed the farhan/word-cloud-xblock branch from fdcab16 to c46a60a Compare February 12, 2025 15:41
@farhan farhan requested a review from irtazaakram February 12, 2025 16:15
@farhan farhan requested a review from kdmccormick February 13, 2025 10:25
@farhan
Copy link
Contributor Author

farhan commented Feb 13, 2025

@kdmccormick Please review it as it's waiting for your thumbs up for the release.

Copy link
Contributor

@salman2013 salman2013 left a comment

Choose a reason for hiding this comment

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

LGTM

@farhan farhan merged commit 264ae5f into main Feb 18, 2025
10 of 12 checks passed
@farhan farhan deleted the farhan/word-cloud-xblock branch February 18, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WordCloudBlock Extraction
4 participants