This repo contains the starter code and infrastructure for the assignment. Follow the instructions below to set up your environment and submit your work.
Note
Questions: The PDF containing all question statements can be found in the assets directory.
-
Install uv (one-time setup).
-
Initialize the environment to setup Python 3.10, followed by required libraries (NumPy, Matplotlib, SciPy, CasADi, CVXPY):
git clone <REPO_URL> && cd <REPO> make setup # runs `uv sync` source .venv/bin/activate
The repo is organized into directories for each question. Each directory contains a src/ folder where you must place your implementation.
Runnable Requirement & Output
- Before submitting, ensure your solution is fully functional and can be executed via the provided entry point:
python qX_question_name/main.py - All multimedia files (images, graphs, videos, etc.) generated by your code MUST be saved inside the assets directory, organized by question.
Authorized Modifications:
- Files inside any
src/directory only config.yamlwithin each question directories.
Caution
Immutable Files & Integrity: All files and scripts outside of src/ (except config.yaml) are meant to be immutable. Modifying infra scripts (such as main.py, visualizer.py, or GitHub workflows) will trigger Integrity Violations (check RULES section) and block your submission.
-
Verify Code Quality: Run the linter to detect unused imports and logic errors
make check
-
Auto-Fix Issues: Auto-repair formatting and minor syntax mistakes
make fix
-
Validate Rules: Check against course constraints (line counts, file limits, and asset sizes)
make validate -
Submit: Stage and push your changes to the remote repository.
git add . git commit -m "<COMMIT-MSG>" git push
Your submission is auto-validated against the following constraints. Failure to meet these will result in a failed build on GitHub.
- Script Count: Maximum of 5 Python scripts allowed per
src/directory - Script Length: Maximum of 500 lines of code per script
- Integrity: Modifications are forbidden outside
src/(exceptconfig.yaml) - Assets: PDF, Image, or Video files must NOT exceed 5 MB each
Note
Bypassing local hooks with --no-verify will be caught and blocked by the GitHub Actions Compliance runner