This is a complete Python project template for INF3710 assignments using uv for dependency management.
python-project/
├── src/
│ ├── __init__.py
│ ├── main.py # Main entry point
│ └── solution.py # Your solution code
├── tests/
│ ├── __init__.py
│ └── test_solution.py # Your tests
├── pyproject.toml # Project configuration
├── README.md
└── .vscode/ # VS Code settings
├── settings.json
├── extensions.json
└── launch.json
curl -LsSf https://astral.sh/uv/install.sh | shcd python-project
uv syncThis will create a virtual environment and install all dependencies.
# Run the main script
uv run python src/main.py
# Or run directly
uv run src/main.py# Run all tests
uv run python tests/test_solution.py
# Or run directly if in virtual environment
python tests/test_solution.py- Write your solution in
src/solution.py - Write tests in
tests/test_solution.py - Run tests locally with
uv run python tests/test_solution.py - Test with stdin/stdout using
src/main.py - Upload to Gradescope (zip the entire directory)
Open this folder in VS Code. The .vscode/ settings will:
- Automatically select the uv virtual environment
- Enable Python linting and formatting
- Provide debugging support
- Show recommended extensions
- Python (ms-python.python)
- Pylance (ms-python.vscode-pylance)
- Ruff (charliermarsh.ruff)
You can submit either:
- Zip the entire project:
zip -r solution.zip . -x ".*" -x "__pycache__/*" -x ".venv/*" - Individual files:
pyproject.toml,src/*.py
The autograder will:
- Detect
pyproject.toml - Run
uv syncto install dependencies - Execute your code with
uv run
- Keep
dependencies = []inpyproject.tomlsince external libraries aren't allowed - Write tests using simple
assertstatements to validate your solution locally - Run tests frequently during development
- Use type hints for better code quality