This repository contains the activities for the COMP0035 module for the academic year 2025-26.
- Fork this repository to your own GitHub account.
- Clone the forked repository to your local machine (e.g. in VS Code or PyCharm).
- Each week, update the repository using the 'Sync fork' button in GitHub to check for changes, if it is out of date then select the 'Update branch' button.
The docs folder contains the activity instructions for each week.
The src package contains any starter code for each week. You can also use this package to store your own code
that you create during the activities.
One solution to the week's activities will be added to the tutor_solution repository. Other solutions will be possible, and some may be better than the solution offered, so don't feel your code has to match the tutors code!
This will be updated each week with the activities for that week.
Theme: Working with code for applications
Required:
- Python project structure
- Python virtual environment
- Source code control (GitHub)
- Set up the course activities project and repository
- Set up the coursework project and repository
Optional:
Theme: Using Python to work with data
This week's activities are more than you can complete in a week. There are less in weeks 4 and 5 so you could delay some.
Week 2 instructions are in the docs/2_pandas folder:
- Create a package and module
- Open .csv and .xlsx files and create a DataFrame
- Describe the dataframe
- Identify missing values
- Overview of plots
- Plots to show distributions
- Plots for timeseries data
- Columns with categorical values
- Data preparation
- Locating rows and columns
- Remove columns
- Remove and replace values
- Change data types
- Add new data by computing
- Add new data by combining dataframes
- Save dataframe to file
- Check the prepared data suits the purpose
- Next steps
Theme: Working with code for applications
Week 3 instructions are in the docs/3_code_quality folder:
- Docstring
- Linting
- Auto-formatting
- GitHub Actions lint report
- (Optional) Static analysis: beyond linting
- Project structure
- Imports
- Error handling
Themes: Designing applications & Using Python to work with data
This week's activities are more than you can complete in a week. There are less in weeks 4 and 5 so you could delay some.
Activity instructions are in the docs/4_database folder:
- Introduction to database design (lecture recap)
- Introduction to ERD (lecture recap) and ERD drawing tools
- Conceptual database design
- Logical design to 1NF
- Logical design to 2NF
- Logical design to 3NF
- Logical design - constraints
- Logical design - referential integrity
- Logical design activity
- Physical design - SQLite schema
- Physical design - Python to create SQLite database structure
- Database design - next steps
- SQL INSERT and SELECT intro
- Add data to tables with no FK
- Select data
- Add data to tables with an FK
- Normalisation and application code- A brief intro to the trade-off between database normalisation and query design
Activities after this point relate to coursework 2
Theme: Using Python to work with data
Week 5 instructionsare in the docs/5_classes_orm folder:
- Python classes
- Class relationships - inheritance, composition
- Pydantic
- ORM and SQLModel
- Using SQLModel to create SQLite database
- Using SQLModel to add data
- Summary
- Optional Using SQLAlchemy in place of SQLModel
Theme: Designing applications
Instructions in the docs/6_requirements folder:
Theme: Designing applications
Instructions are in the docs/7_app_design folder:
- Introduction to application design
- Examples of application designs
- Identify classes
- Draw the application design diagram
- Review the design
- Draw the application design for the paralympics prediction web app
- Results of using genAI for the application design
Theme: Using Python to work with data
Instructions are in the docs/8_classes_database_2 folder:
- Adding methods to classes
- Tables with relationships in SQLModel
- Add data using SQLModel
- Add data to tables with relationships
- Selecting data from a database with SQLModel
- Update data in a database with SQLModel
- Delete data from a database with SQLModel
- Reminder: code quality still matters!
- SQLModel queries for the paralympics database
Theme: Working with code for applications
Instructions and activities can be found in the docs/9_testing folder:
- Introduction to testing and conventions
- Testing with pytest
- Pytest fixtures
- Reporting test coverage
- Running tests with GitHub Actions
- Further information
Tutorial reserved for final coursework support
Most activities use paralympics data that was originally compiled from the IPC website in 2021.
The data may be duplicated in some instances in src/data and other sub-folders in src. This is for teaching purposes
for an activity that requires a different copy or location.