You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Stijn De Clercq 4de765ef62
Merge pull request #169 from stijndcl/events-qol
1 month ago
.github Update CI & fix broken test 2 months ago
alembic Start working on events 1 month ago
database Small bugfix in timezone printing 1 month ago
didier Small bugfix in timezone printing 1 month ago
files/dictionaries Fix broken time formatting, remove word field 8 months ago
profile_pictures Typing 6 months ago
tests Update CI & fix broken test 2 months ago
.editorconfig Initialize database stuff & setup didier 10 months ago
.flake8 Fix db script runner 5 months ago
.gitignore Merge migrations, pull schedules daily 6 months ago
.pre-commit-config.yaml Fix pre-commit hooks 1 month ago
.python-version Bump python version 2 years ago
alembic.ini Add missing alembic file 9 months ago
codecov.yaml Urban dictionary commands 8 months ago
docker-compose.test.yml Remove mongo & fix tests 7 months ago
docker-compose.yml Remove mongo & fix tests 7 months ago Load calendars once on startup (before connecting) 5 months ago
pyproject.toml Fix env variable 6 months ago Add OS info to dev readme 7 months ago
requirements-dev.txt Fix pre-commit hooks 1 month ago
requirements.txt Fix announcement timezones 6 months ago Fix db script runner 5 months ago Tidy up events a bit 1 month ago



You bet. The time has come.


Didier uses Python 3.9.5, as specified in the .python-version-file. This file will cause pyenv to automatically use the correct version when you're working on Didier.

# Installing Python 3.9.5 through pyenv
pyenv install 3.9.5

# Creating a Virtual Environment and activate it
# PyCharm will automatically activate your venv
python3 -m venv venv
source venv/bin/activate

# Installing dependencies + development dependencies
pip3 install -r requirements.txt -r requirements-dev.txt

# Installing pre-commit hooks
pre-commit install

The database can be managed easily using Docker Compose. If you want to, however, you can run a regular PostgreSQL server and connect to that instead.

A separate database is used in the tests, as it would obviously not be ideal when tests randomly wipe your database.

# Starting the database
docker compose up -d

# Starting the database used in tests
docker compose -f docker-compose.test.yml up -d


All of these are Python tools. Depending on your OS and configuration, you may have to prefix them with python3 -m.

# Starting Didier

# Running database migrations
alembic upgrade head

# Creating a new database migration
alembic revision --autogenerate -m "Revision message here"

# Running tests

# Running tests with Coverage
coverage run -m pytest
# Generating code coverage report
coverage html

# Running code quality checks

It's also convenient to have code-formatting happen automatically on-save. The Black documentation explains how to set this up for different types of editors.