Created by Amedeo Majer (ame) and Jordane Gengo (titus)
home-cleaner is a tool used at Hive Helsinki to detect inactive students via the 42 intra API and delete their student home image.
Prerequisites:
- Docker Compose V2 (aka
docker composewithout the-in between) - Make
Get everything up and running:
make start
The app and tests directories are volume mapped to the homecleaner container.
Bring everything down:
make stop
For convenience, there's also make restart which runs stop and start.
You can run the pytest test suite with:
make test
It doesn't matter whether you have the containers already running (i.e. if you have make start running in another shell window) or not, make test works either way.
We are using ruff for linting, ruff format for automatic code formatting, and mypy for static type checking.
You can run all of them with:
make lint
To add or remove dependencies, modify pyproject.toml and generate a fresh lock file with:
make update-dependencies
After doing changes related to the dependencies, remember to restart (it rebuilds as well) containers with make restart (or make stop + make start).
Follow these instructions.
Prerequisites:
- Docker Compose V2 (aka
docker composewithout the-in between) - Make
- Python 3.12
- Poetry 1.8.3
Create a poetry environment and install the dependencies:
poetry install
Activate the virtual environment (after this you won't need to type poetry run ...):
poetry shell
pytest
To add or remove dependencies, modify pyproject.toml and get the latest versions of the dependencies and a fresh poetry.lock with:
poetry update
We are using ruff for linting, and ruff format for automatic code formatting.
For convenience, we have bundled them into a pre-commit configuration.
If you want to have pre-commit to automatically run on each commit:
pre-commit install
Or if you just want to run it over the whole codebase at times:
pre-commit run --all-files
python -m app.main