Support Zip files for Course Import#33561
Conversation
|
Thanks for the pull request, @rodfersou! 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:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate. |
xitij2000
left a comment
There was a problem hiding this comment.
The code is working, however, I think some changes are needed here.
- Please undo any removals of lint-amnesty comments etc. I was only asking you not to have those messages in new code or code that you've touched.
- I think you mentioned earlier about refactoring the archive handling code. If you can do that in the remaining time it would be great.
7827660 to
edb0d5e
Compare
|
@rodfersou there are some check failures, can you have a look? |
0ad6274 to
97ab184
Compare
3753d05 to
d31fc91
Compare
|
@e0d any guidance on how to run lint tool locally? |
d31fc91 to
c59dc34
Compare
I think just running pylint in the container should work? If you are using tutor then: Then you can run pylint in the container. |
35ddf58 to
0e141f9
Compare
xitij2000
left a comment
There was a problem hiding this comment.
👍 This is working fine, but I think the tests could deduplicated a bit. Other than that it's good to go.
- I tested this: tested on tutor devstack
- I read through the code
- [na] I checked for accessibility issues
- Includes documentation
35d2bdd to
e8799a0
Compare
2302989 to
255827f
Compare
@xitij2000 sure! I'll leave separate just the last changes, but will rebase after your review |
0604dcd to
bf6dedd
Compare
15c55dd to
7f2a2f3
Compare
There was a problem hiding this comment.
The idea here is to let CI test each time in different way, like what we do using factory_boy and faker libraries
There was a problem hiding this comment.
@rodfersou, what's the point of this? These are four different cases, so we should run them all every time instead of randomly deciding which one will run. If one of these cases fails, we won't even know which one it was.
We should specify all cases with @ddt.data.
2c2c99b to
56c13e7
Compare
56c13e7 to
c4cb277
Compare
xitij2000
left a comment
There was a problem hiding this comment.
👍
- I tested this: teted on tutor devstack
- I read through the code
- [na] I checked for accessibility issues
- [na] Includes documentation
|
@rodfersou The tests seem to be failing, they probably just need to be rerun. Could you push an empty commit to trigger them? |
1e064b2 to
27f2210
Compare
| _checkmembers(members, output_path) | ||
| yield archive | ||
| finally: | ||
| archive.close() |
There was a problem hiding this comment.
@rodfersou, members and archive will be referenced before the assignment if we pass a file with a different extension. A lib function should not rely on external validation of importable file extensions. If a use case is unsupported, it should raise a suitable exception that can be handled "above" (in the code that invokes it). Getting a NameError is confusing.
|
Hi @rodfersou - just checking in on this! |
|
@mphilbrick211, I pinged people on our internal ticket to reassign this. |
|
@mphilbrick211, we should be able to move this feature forward in a few weeks. However, we will need to recreate the PR from a different fork, so I'm closing this. |
|
@rodfersou Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
Support
zipfiles for Course import.Please see more details at this issue: openedx/platform-roadmap#285
Useful information to include:
=> "Course Author".
=> Before
=> None
Supporting information
Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.
https://tasks.opencraft.com/browse/BB-8025
openedx/platform-roadmap#285
Testing instructions
Tools / ExportExport Course Content.tar.gzfile in a new folder at your computer.zipfileTools / ImportChoose new file.zipfileReplace my course with the selected fileDeadline
=> 2023-10-29
Other information
Include anything else that will help reviewers and consumers understand the change.
=> No
=> No
=> No