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

Add maximum size for entire directory as submission option #1666

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

franswel
Copy link
Contributor

The previous maximum size option was applied to individual files only. This adds a separate option to limit the maximum size of the entire directory. The option is called max_dir_size and is implemented similarly to max_file_size. The default is same as the max file size.

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch AaltoSciComp/nbgrader/limit-submission-directory-size

Copy link
Contributor

@rkdarst rkdarst left a comment

Choose a reason for hiding this comment

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

This has also been in use at our site for quite a while now. The default max size of 100M probably makes more sense to be interperted as max size of all files, rather than individula ones anyway, right?

This is a problem we've had plenty of times here.

@@ -231,7 +232,7 @@ def test_submit_include(self, exchange, cache, course_dir):
filename, = os.listdir(join(exchange, "abc101", "inbound"))
assert not exists(join(exchange, "abc101", "inbound", filename, "foo.txt"))

def test_submit_include(self, exchange, cache, course_dir):
Copy link
Contributor

Choose a reason for hiding this comment

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

This is renamed since it's the same name as above - it was probably named wrong.

@Gehock Gehock force-pushed the limit-submission-directory-size branch from 2cd6b12 to 8f2a071 Compare February 21, 2023 17:18
@Gehock Gehock force-pushed the limit-submission-directory-size branch from 8f2a071 to 888b9a1 Compare March 22, 2023 16:31
The previous maximum size option was applied to individual files only.
This adds a separate option to limit the maximum size of the entire
directory. The option is called max_dir_size and is implemented
similarly to max_file_size. The default is no maximum directory size
limit.
@Gehock Gehock force-pushed the limit-submission-directory-size branch from 888b9a1 to 783a3c9 Compare March 29, 2023 13:13
@brichet
Copy link
Contributor

brichet commented Jun 12, 2023

Thanks @franswel and @Gehock

@brichet brichet merged commit bf643e6 into jupyter:main Jun 12, 2023
@Gehock Gehock deleted the limit-submission-directory-size branch June 12, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants