1
0

vault backup: 2025-12-22 12:22:20
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 2m12s

This commit is contained in:
2025-12-22 12:22:20 +01:00
parent d1d89e5442
commit 5169a67966
23 changed files with 12058 additions and 288 deletions

View File

@@ -5,6 +5,7 @@ Avoid extra new lines, prefer fewer new lines and compact formatting.
# Coding
The rest of this document describes coding conventions to follow when writing code.
## General
- Do not create comments nor docstrings when updating code unless asked.
- Do not create a summary .md file unless asked.
@@ -12,6 +13,8 @@ The rest of this document describes coding conventions to follow when writing co
- When installing a new dependency, prefer to use the latest version.
## Python
- Use uv for handling python installations
- Use pyproject.toml to handle dependencies
- Avoid exceptions if possible
- When exceptions are necessary, use specific exception types, provide meaningful messages, and handle them appropriately.
- Exceptions try/except blocks should be as narrow as possible, try extra hard to avoid catching exceptions you did not intend to catch.
@@ -19,6 +22,7 @@ The rest of this document describes coding conventions to follow when writing co
## Python unit testing:
- Use pytest framework, version 9 or higher.
- Configure using pyproject.toml, avoid pytest.ini to be able to have all configuration in one place.
- Prefer parametrized tests for functions that need to be tested with multiple sets of inputs and expected outputs.
- Use the new `with pytest.test(...)´ for that purpose:
@@ -32,3 +36,9 @@ def test_parametrized(subtests: pytest.Subtests) -> None:
assert ...
# ... tear down ...
```
## Django
- Prefer function based views over class based views
- Use django-stubs for type hints
- Use pytest-django for testing django applications