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 xblock-utils repository code into this repository #669

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

farhan
Copy link
Contributor

@farhan farhan commented Sep 7, 2023

Adds xblock-utils repository code into this repository

Relevant ticket: #675

Implementation details:
I have added xblock-utils code in the xblock/utils package and added their test cases in xblock/test/utils package

I didn't move the bok-choy integration test cases into the repo because the library has been deprecated.

Child PR to move docs: #672

@farhan farhan changed the title Adds xblock-utils repository code into this repository [WIP] Adds xblock-utils repository code into this repository Sep 7, 2023
@farhan farhan force-pushed the farhan/merge-xblock-utils branch 2 times, most recently from 3763d1f to c616622 Compare September 8, 2023 13:37
@farhan farhan requested a review from feanil September 8, 2023 14:26
@farhan farhan force-pushed the farhan/merge-xblock-utils branch 4 times, most recently from bda7660 to 2611c6e Compare September 11, 2023 14:25
Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

@farhan rather than bringing the xbolckutils module directly, I think we want to move all the relevant code into a xblock.utils module. This keeps the code in the xblocks repository cleaner in the long run but will involve a bit more complexity to the move. Can you try to update this so that the code lives under the existing xblocks structure?

@farhan
Copy link
Contributor Author

farhan commented Sep 11, 2023

@farhan rather than bringing the xbolckutils module directly, I think we want to move all the relevant code into a xblock.utils module. This keeps the code in the xblocks repository cleaner in the long run but will involve a bit more complexity to the move. Can you try to update this so that the code lives under the existing xblocks structure?

@feanil Yes we can

I kept it separate for following 2 pros:

  1. All the repos who are using xblock-utils don't need to update the imports
  2. xblock-utils will stay as a separate layer

But if we want to keep it intact with the xblocks repo, it should reside inside

Let me refactor it.

1 more thing I am not going to add the bok-choy integration tests as we have deprecated the package

@feanil
Copy link
Contributor

feanil commented Sep 11, 2023

1 more thing I am not going to add the bok-choy integration tests as we have deprecated the package

That makes sense to me.

@farhan farhan force-pushed the farhan/merge-xblock-utils branch 2 times, most recently from 87b946e to 76eaea3 Compare September 12, 2023 07:50
@farhan farhan closed this Sep 12, 2023
@farhan farhan reopened this Sep 12, 2023
@farhan farhan requested a review from feanil September 12, 2023 13:33
@farhan farhan changed the title [WIP] Adds xblock-utils repository code into this repository Adds xblock-utils repository code into this repository Sep 12, 2023
@farhan farhan requested a review from a team September 12, 2023 13:35
Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

@farhan looks pretty good, there are a few more things I need to check before I can finish the review but so far this looks good. Can you link this PR to the corresponding PR in the xblock-utils repo?

xblock/test/test_plugin.py Show resolved Hide resolved
xblock/utils/__init__.py Outdated Show resolved Hide resolved
xblock/utils/publish_event.py Outdated Show resolved Hide resolved
xblock/utils/resources.py Outdated Show resolved Hide resolved
xblock/utils/settings.py Outdated Show resolved Hide resolved
xblock/utils/studio_editable.py Outdated Show resolved Hide resolved
@farhan farhan force-pushed the farhan/merge-xblock-utils branch 4 times, most recently from 8b1be5b to 4c47904 Compare September 13, 2023 13:22
@farhan farhan force-pushed the farhan/merge-xblock-utils branch 2 times, most recently from 6c61401 to 279f341 Compare September 14, 2023 07:17
Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

A couple more comments and then I think this will be ready for review by Dave/Kyle.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
xblock/test/test_plugin.py Show resolved Hide resolved
@farhan farhan requested a review from feanil September 14, 2023 13:54
xblock/utils/resources.py Outdated Show resolved Hide resolved
Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

@farhan Just one more note about the version.

xblock/__init__.py Outdated Show resolved Hide resolved
@feanil feanil requested a review from ormsbee September 19, 2023 13:14
Copy link
Contributor

@ormsbee ormsbee left a comment

Choose a reason for hiding this comment

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

I did not review all the files in the utils and test/utils packages because I assume they're coming straight over from xblockutils (except for the bok choy stuff that was dropped).

I'm also assuming that some manual testing is being done to make sure that things still work when we have a mix of XBlocks where some XBlocks are using xblock.utils and some are using xblockutils and we're installing both libraries at the same time–since this mode is likely to be very common for a while.

Otherwise, it looks good to me.

@farhan farhan force-pushed the farhan/merge-xblock-utils branch 2 times, most recently from eecd419 to fdc1e17 Compare September 20, 2023 08:59
@farhan
Copy link
Contributor Author

farhan commented Sep 21, 2023

Thanks for review and sharing thoughts @ormsbee

I did not review all the files in the utils and test/utils packages because I assume they're coming straight over from xblockutils (except for the bok choy stuff that was dropped).

Yes they are coming straight from repo, no need to review all

I'm also assuming that some manual testing is being done to make sure that things still work when we have a mix of XBlocks where some XBlocks are using xblock.utils and some are using xblockutils and we're installing both libraries at the same time–since this mode is likely to be very common for a while.

Otherwise, it looks good to me.

Yes, some manual testing is done on DoneXBlock and repo is working fine with different pip package cases:

Screen Shots
Screenshot 2023-09-21 at 10 25 46 AM
Screenshot 2023-09-21 at 10 26 16 AM
Screenshot 2023-09-21 at 10 28 29 AM

Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

@farhan I think you need to add a changelog entry to summarize that this is a move of code from the xblock-utils repository and then I think this is good to merge and release.

@farhan farhan force-pushed the farhan/merge-xblock-utils branch 2 times, most recently from 2f1a9fb to f502eae Compare September 25, 2023 08:03
@salman2013 salman2013 self-requested a review September 25, 2023 10:45
@farhan
Copy link
Contributor Author

farhan commented Sep 25, 2023

@farhan I think you need to add a changelog entry to summarize that this is a move of code from the xblock-utils repository and then I think this is good to merge and release.

@feanil I have added the changelog and merged the docs PR into this PR as well.
Please review the change logs, are we good to merge it and release it now?

change logs file

Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

One small suggestion to the CHANGELOG and then I think this is good to merge and release.

CHANGELOG.rst Outdated Show resolved Hide resolved
@farhan farhan force-pushed the farhan/merge-xblock-utils branch 2 times, most recently from d0f0da7 to 21cd9a4 Compare September 25, 2023 15:19
Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

👍🏾 :shipit:

@farhan farhan merged commit 2e506e4 into master Sep 26, 2023
6 of 8 checks passed
@farhan farhan deleted the farhan/merge-xblock-utils branch September 26, 2023 03:50
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.

Merge openedx/xblock-utils library into openedx/XBlock
5 participants