No description
Find a file
Tycho van den Heuvel 792ba03cb5 Merge branch 'feature/sensors-enhanced' into 'main'
Feature/sensors enhanced

See merge request cse2000-software-project/2025-2026/cluster-v/19e/19e!73
2026-06-18 16:38:06 +02:00
.vscode Added configuration for python debugger 2026-05-25 11:20:54 +02:00
app ruff format 2026-06-18 16:32:21 +02:00
.env.example this isn't technically part of this branch really, but I forgot to mark this in his review 2026-06-09 17:05:18 +02:00
.gitignore added things for html linter to work in pipeline 2026-06-08 11:58:23 +02:00
.gitlab-ci.yml added things for html linter to work in pipeline 2026-06-08 11:58:23 +02:00
.python-version use uv for dependency management instead of pip 2026-05-23 09:49:23 +02:00
pyproject.toml added segno and qr code 2026-06-11 10:57:49 +02:00
README.md differentiate IP address commands on different platforms 2026-06-08 12:26:00 +02:00
uv.lock added segno and qr code 2026-06-11 10:57:49 +02:00

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:

  1. install uv (if you haven't already) by executing the command in uv Instructions;
    • This project uses uv instead of pip in an attempt to avoid dependency versioning problems.
  2. install this projects' dependencies by running uv sync;
  3. if you're not using an IDE that loads the virtual environment automatically: run source .venv/bin/activate on macOS/Linux or .venv\Scripts\activate on Windows to activate it manually;
  4. run the server with fastapi dev.
    • If you want to access the webpage from another device (like one of the tablets):
      1. find out your IP address:
        • on macOS, use ipconfig getifaddr en0;
        • on Windows, use ipconfig /all;
        • on Linux, use ip a.
      2. run the server with the --host 0.0.0.0 flag: fastapi dev --host 0.0.0.0;
      3. 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).

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.