This is known to work with python 3.12.7
pyenv install 3.12.7
A virtual environment created and activated somewhere
via pyenv
pyenv virtualenv 3.12.7 mc-bench-backend
pyenv activate mc-bench-backend
via vanilla venv
pyenv shell 3.12.7
python -m venv .venv
source .venv/bin/activate
Any other mechanism should work as well
editably install the project
pip install -e .[dev,api,worker]
With the python virtual environment activated, run the database migrations
$ mc-bench-alembic upgrade head
You need to create a Github oauth app and save the client and secret in your local env file as:
GITHUB_CLIENT_ID GITHUB_CLIENT_SECRET
Running the frontend and the backend, login and create a username.
Then use:
./bin/grant-user-role grant --username {your username} --role admin
To see the usernames use:
./bin/grant-user-role list-users
To see the roles use:
./bin/grant-user-role list-roles
The following command will start all the services up
docker-compose up -d --build
See the docker-compose.yml file for what services are started up and which ports they are listening on
TODO: figure out hot reloading in the containers
docker-compose logs -f
Run the ruff formatter
make fmt
Run the ruff checker
make check
Run the ruff checker with --fix option
make check-fix