-
Notifications
You must be signed in to change notification settings - Fork 310
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
Enable users to copy both files and directories #1190
Enable users to copy both files and directories #1190
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
Codecov ReportBase: 80.45% // Head: 80.28% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1190 +/- ##
==========================================
- Coverage 80.45% 80.28% -0.17%
==========================================
Files 68 68
Lines 8135 8249 +114
Branches 1586 1602 +16
==========================================
+ Hits 6545 6623 +78
- Misses 1176 1202 +26
- Partials 414 424 +10
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Hi @kenyaachon, thank you for working on this! Where are you seeing a timeout, on the server or the browser? |
Hi @blink1073 I was seeing the timeout on the server. Let me reproduce a screenshot of the error. |
d6a8eba
to
52254d4
Compare
@blink1073 Here is the timeout error that occurs, It seems with the latest version of the jupyter-server, this error no longer occurs, in the other project that I developed this code from, we are using version 1.18.0 which had that limitation. The timeout error would occur when copying folders around 500MB, but it seems now I can copy folders around >1GB. It seems it would be fine to remove the code around limiting how big of a folder can be copied, but I am not sure if that might cause problems on less powerful machines. |
We can expose this as a setting, a new trait on |
7afa176
to
aa8b252
Compare
for more information, see https://pre-commit.ci
d5c0471
to
d7520ed
Compare
@kenyaachon, can you please add that new trait as part of this PR? |
I will make sure to add the trait as part of the review, once I am done addressing the failing tests. |
Great, thanks! The failing tests are unrelated to this PR. |
for more information, see https://pre-commit.ci
@@ -121,6 +133,8 @@ def _notary_default(self): | |||
""", | |||
) | |||
|
|||
max_copy_folder_size_mb = Int(500, config=True, help="The max folder size that can be copied") |
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.
Hmm, perhaps this trait should be on FileManager
, since it isn't implemented in the more generic ContentsManager
. Anyone have any thoughts?
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.
Yes - I completely agree - good catch.
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.
I will make sure to make that change @blink1073.
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.
@blink1073, when you say FileManager
do you mean the FileContentsManager
or the LargeFileManager
?
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.
Hi @kenyaachon - yes, FileContentsManager
is the appropriate location for the trait since it's the "most base" class for the file-based contents managers. Sorry for the confusion.
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 good, thank you!
Most windows installs do not have |
Yeah, I think checking for |
Objective
Enable users to copy both files and directories
Currently, if users try copying a directory, an error will thrown backing saying "Can't Copy directories".
jupyterlab
jupter_server
How to test
Create a virtual environment with venv (you can use what ever viritual environment tool you like)
Limitations
We were not able to find a suitable solution yet for being able to copy folders above 500MB in size without having a timeout issue
Users, cannot easily know if the folder they are copying is above 100MB before they try and copy