Skip to content

Script to create submit.zip for Gradescope#1

Open
preyneyv wants to merge 3 commits intoberkeleydeeprlcourse:mainfrom
preyneyv:feat/submit-script
Open

Script to create submit.zip for Gradescope#1
preyneyv wants to merge 3 commits intoberkeleydeeprlcourse:mainfrom
preyneyv:feat/submit-script

Conversation

@preyneyv
Copy link

I wrote a utility to create submit.zip files for Gradescope that makes it easy to selectively include files and subdirectories. It has no dependencies and runs on any Python 3.6+ cross-platform.

It parses a .submit file to find filepaths to include in the output zip, then compresses them. It also warns if an expected file is missing or if the final archive exceeds 100MB.

anim

The .submit file is a series of globs similar to .gitignore

# lines starting with # are comments and ignored
# paths are relative to the .submit file
# syntax is glob patterns (https://docs.python.org/3/library/glob.html)
# if a pattern matches a directory, the entire directory is included recursively

src/**/*.py
exp/flow
exp/mse
pyproject.toml
uv.lock
README.md

Usage:

  1. From within a homework directory (containing a .submit file):
    uv run ../submit.py
  2. From anywhere:
    python submit.py path/to/hw/directory

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.

1 participant

Comments