From 349c38ace4bc8f2701226f8307ac1dfb5aa845ea Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 20 Jun 2025 15:08:35 +0200 Subject: [PATCH 1/2] add cursor project rules --- .cursor/rules/django-project.mdc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .cursor/rules/django-project.mdc diff --git a/.cursor/rules/django-project.mdc b/.cursor/rules/django-project.mdc new file mode 100644 index 0000000..49f6dc5 --- /dev/null +++ b/.cursor/rules/django-project.mdc @@ -0,0 +1,17 @@ +--- +description: +globs: +alwaysApply: true +--- +- This is a Django project which uses SQLite as the database. +- Follow Django conventions and best practices; use the Django ORM and define fields with appropriate types. +- Use function-based views and follow Django conventions for naming and structuring views. +- Templates use the Django template language and Bootstrap 5 CSS and JavaScript for styling. +- The main Django app is in `hub/services`; ignore the app `hub/broker`. +- Docker-specific code is in the folder `docker/`. +- Kubernetes deployment-specific files are in `deployment/`. +- GitLab CI is used as the main CI/CD system. +- The project uses Astral uv to manage the Python project, dependencies, and the venv. +- Execute Django with `uv run --extra dev manage.py`. +- Always add comments to the code to describe what's happening. +- Answers should be short and concise, and should not include any unnecessary comments or explanations, but be clear on which file a code block should be placed in. From 4b515702e3415ee6a2fc27c4a1f36928317c4035 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 20 Jun 2025 15:10:43 +0200 Subject: [PATCH 2/2] specify which tests to run --- .forgejo/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml index 00e2df5..a0cb310 100644 --- a/.forgejo/workflows/test.yaml +++ b/.forgejo/workflows/test.yaml @@ -31,4 +31,4 @@ jobs: -w /app \ -e SECRET_KEY=dummysecretkey \ website:test \ - sh -c 'uv run --extra dev manage.py migrate --noinput && uv run --extra dev manage.py test --verbosity=2' \ No newline at end of file + sh -c 'uv run --extra dev manage.py migrate --noinput && uv run --extra dev manage.py test hub.services.tests --verbosity=2' \ No newline at end of file