diff --git a/aleksis/apps/alsijil/model_extensions.py b/aleksis/apps/alsijil/model_extensions.py index 8a92d667106efd853b225f946c4139b0d5799ef6..abbedd709dd3604172b831c2c931a2ea5f198b5a 100644 --- a/aleksis/apps/alsijil/model_extensions.py +++ b/aleksis/apps/alsijil/model_extensions.py @@ -52,7 +52,7 @@ def mark_absent( to_period: Optional[int] = None, dry_run: bool = False, ): - """Mark a person absent for all lessons in a day, optionally starting with a selected period number. + """Mark a person absent for all lessons in a day, optionally starting with a period number. This function creates `PersonalNote` objects for every `LessonPeriod` and `ExtraLesson` the person participates in on the selected day and marks them as absent/excused. diff --git a/aleksis/apps/alsijil/views.py b/aleksis/apps/alsijil/views.py index 589f194fc06da1217b1b2a4918236fb3c7f6b6df..3a343c8990d8b7de2d39b3492a3bd04895206016 100644 --- a/aleksis/apps/alsijil/views.py +++ b/aleksis/apps/alsijil/views.py @@ -886,9 +886,7 @@ def overview_person(request: HttpRequest, id_: Optional[int] = None) -> HttpResp stats = [] for school_term in school_terms: stat = {} - personal_notes = PersonalNote.objects.filter( - person=person, - ).filter( + personal_notes = PersonalNote.objects.filter(person=person,).filter( Q(lesson_period__lesson__validity__school_term=school_term) | Q(extra_lesson__school_term=school_term) | Q(event__school_term=school_term) diff --git a/pyproject.toml b/pyproject.toml index 13197940261f1aeab62e33486e72c17718553219..759cac17c8e175968e8fa17228d9204188321da6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,12 +24,9 @@ authors = [ "mirabilos <thorsten.glaser@teckids.org>", "Tom Teichler <tom.teichler@teckids.org>" ] -maintainers = [ - "Dominik George <dominik.george@teckids.org>", - "Jonathan Weth <dev@jonathanweth.de>", -] -license = "EUPL-1.2" -homepage = "https://aleksis.org/" +maintainers = ["Jonathan Weth <dev@jonathanweth.de>", "Dominik George <dominik.george@teckids.org>"] +license = "EUPL-1.2-or-later" +homepage = "https://aleksis.org" repository = "https://edugit.org/AlekSIS/official/AlekSIS-App-Alsijil" documentation = "https://aleksis.edugit.io/AlekSIS/docs/html/" classifiers = [ @@ -41,30 +38,72 @@ classifiers = [ "Typing :: Typed", ] +[[tool.poetry.source]] +name = "PyPI" +priority = "primary" + [[tool.poetry.source]] name = "gitlab" url = "https://edugit.org/api/v4/projects/461/packages/pypi/simple" -secondary = true - +priority = "supplemental" [tool.poetry.dependencies] python = "^3.9" aleksis-core = "^3.0" aleksis-app-chronos = "^3.0" aleksis-app-stoelindeling = { version = "^2.0", optional = true } -[tool.poetry.dev-dependencies] -aleksis-builddeps = "*" - [tool.poetry.extras] seatingplans = ["aleksis-app-stoelindeling"] [tool.poetry.plugins."aleksis.app"] alsijil = "aleksis.apps.alsijil.apps:AlsijilConfig" + +[tool.poetry.group.dev.dependencies] +django-stubs = "^4.2" + +safety = "^2.3.5" + +flake8 = "^6.0.0" +flake8-django = "~1.2.0" +flake8-fixme = "^1.1.1" +flake8-mypy = "^17.8.0" +flake8-bandit = "^4.1.1" +flake8-builtins = "^2.0.0" +flake8-docstrings = "^1.5.0" +flake8-rst-docstrings = "^0.3.0" + +black = ">=21.0" +flake8-black = "^0.3.0" + +isort = "^5.0.0" +flake8-isort = "^6.0.0" + +curlylint = "^0.13.0" + +[tool.poetry.group.test.dependencies] +pytest = "^7.2" +pytest-django = "^4.1" +pytest-django-testing-postgresql = "^0.2" +pytest-cov = "^4.0.0" +pytest-sugar = "^0.9.2" +selenium = "<4.10.0" +freezegun = "^1.1.0" + +[tool.poetry.group.docs] +optional = true + +[tool.poetry.group.docs.dependencies] +sphinx = "^7.0" +sphinxcontrib-django = "^2.3.0" +sphinxcontrib-svg2pdfconverter = "^1.1.1" +sphinx-autodoc-typehints = "^1.7" +sphinx_material = "^0.0.35" + [tool.black] line-length = 100 exclude = "/migrations/" [build-system] -requires = ["poetry>=1.0"] -build-backend = "poetry.masonry.api" +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api"