Commit graph

9 commits

Author SHA1 Message Date
ba829254d8 pyproject: add discord.py as dependency
... and also update uv.lock.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-10 23:56:08 +01:00
1d571fc726 bot: db: add base model and a simple db manager
The base model basically just adds typing to peewee (lmao) and also
handles the date_created, date_updated fields all methods, except for
raw SQL.

This should make it a little easier to write a tiny async layer on top
of it all.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-10 23:56:08 +01:00
c2bd8de5fb readme: document known env vars
Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-10 23:34:00 +01:00
b2af736ae0 bot: env: map known env vars to object
This just makes accessing them easier.

What could be done in the future have some kind of utility method for
debugging that prints all of them or returns all of them as a dict or
something.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-10 23:31:41 +01:00
fee37c2372 workflows: add workflow for running tests
All checks were successful
/ test (push) Successful in 7s
This uses the python:3.13 docker image and also installs uv
beforehand. Checkout is performed "manually" because the standard
actions/checkout@v4 action requires node:20 as container, which is
annoying. I don't want to pull in node just to clone a git repo.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-06 02:37:26 +01:00
15e01aae8c tests: add basic test
in order to see whether pytest runs.

It in fact does: `uv run pytest`

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-06 01:32:47 +01:00
588f8d065e setup basic project structure
... without any other dependencies except the rudimentary things, for
the time being.

This builds using `uv build` and can be run via `uv run bot`.

The bot can also be installed via `uv pip install .` (from the project
root) and then be imported via `import bot`.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-06 01:19:10 +01:00
74e46990de update .gitignore
Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-06 01:06:28 +01:00
a0d87a1781 Initial commit 2025-03-06 00:22:04 +01:00