-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/image-and-job-status
- Loading branch information
Showing
11 changed files
with
194 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
worker/orca_grader/container/build_script/code_file/mime_types.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from enum import Enum | ||
|
||
|
||
class MIMEType(Enum): | ||
""" | ||
An enumeration representing MIME types that files associated with an assignment | ||
or submission may take on. | ||
""" | ||
|
||
TAR = "application/x-tar" | ||
GZ = "application/gzip" | ||
TAR_GZ = "application/x-gtar" | ||
ZIP = "application/zip" | ||
SEVEN_ZIP = "application/x-7z-compressed" | ||
JAVA = "text/x-java" | ||
JAVA_ARCHIVE = "application/java-archive" | ||
JAVA_CLASS = "application/java-vm" | ||
JAVASCRIPT = "text/javascript" | ||
PYRET = "pyret" | ||
RACKET_SCHEME = "scheme" | ||
LISP = "text/x-common-lisp" | ||
ML = "mllike" | ||
HASKELL = "text/x-haskell" | ||
LIT_HASKELL = "text/z-literate-haskell" | ||
PLAIN_TEXT = "text/plain" | ||
|
||
|
||
ARCHIVE_MIMES = [MIMEType.ZIP, MIMEType.TAR, | ||
MIMEType.GZ, MIMEType.TAR_GZ] | ||
|
||
|
||
def is_archive_mime_type(mime_type: MIMEType) -> bool: | ||
return mime_type in ARCHIVE_MIMES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
worker/orca_grader/container/build_script/code_file/sub_mime_types.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.