Feature/sensors enhanced See merge request cse2000-software-project/2025-2026/cluster-v/19e/19e!73 |
||
|---|---|---|
| .vscode | ||
| app | ||
| .env.example | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .python-version | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Project
Meeting notes
Click here for the Google Drive folder with the notes on all our meetings.
Product
Set-up
To get the project running:
- install
uv(if you haven't already) by executing the command in uv Instructions;- This project uses uv instead of
pipin an attempt to avoid dependency versioning problems.
- This project uses uv instead of
- install this projects' dependencies by running
uv sync; - if you're not using an IDE that loads the virtual environment automatically: run
source .venv/bin/activateon macOS/Linux or.venv\Scripts\activateon Windows to activate it manually; - run the server with
fastapi dev.- If you want to access the webpage from another device (like one of the tablets):
- find out your IP address:
- on macOS, use
ipconfig getifaddr en0; - on Windows, use
ipconfig /all; - on Linux, use
ip a.
- on macOS, use
- run the server with the
--host 0.0.0.0flag:fastapi dev --host 0.0.0.0; - open the browser of your other device to the IP address from step 1 with the port displayed when running step 2 (defaults to 8000).
- find out your IP address:
- If you want to access the webpage from another device (like one of the tablets):
Code style
We have a Python linter called ruff. It can recognise common bugs and bad patterns in your code, and will help you clean them up. To run the linter, run ruff check. To have it fix the issues that can automatically be safely fixed, you can ruff check --fix.
ruff also has a formatter. This doesn't fix bugs or bad code logic patterns, but instead helps to maintain consistent code style across different team members writing code. It does this by automatically reformatting your code. This won't always produce better code, but a consistent code base is significantly more important than 'better'. To run the formatter, run ruff format. This will automatically fix your code for you.
It is recommended you run the formatter (ruff format) before the linter (ruff check), or you might get warnings about code style from the linter.
For HTML (and inline JS and CSS), we have another linter/formatter called djLint. To run the linter part, run djlint . --lint. To run the formatter, run djlint . --reformat.