[Feature] Server pagination implementation (#243)

## Major Changes
- Implement a REST style API app in epapi
- Currently implements a GET method for all entity types in the browse menu (both package level and global)
- Provides paginated results per default with query style filtering for reviewed vs unreviewed.
- Provides new paginated templates with thin wrappers per entity types for easier maintainability
- Implements e2e tests for the API

## Minor changes
- Added more comprehensive gitignore to cover coverage reports and other test/node.js etc. data.
- Add additional CI file for API tests that only gets triggered on API relevant changes.

## ⚠️ Currently only works with session-based authentication. Token based will be added in new PR.

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Co-authored-by: jebus <lorsbach@envipath.com>
Reviewed-on: enviPath/enviPy#243
Co-authored-by: Tobias O <tobias.olenyi@envipath.com>
Co-committed-by: Tobias O <tobias.olenyi@envipath.com>
This commit is contained in:
2025-12-15 11:34:53 +13:00
committed by jebus
parent d2d475b990
commit 8adb93012a
59 changed files with 3101 additions and 620 deletions

View File

@ -9,7 +9,8 @@ dependencies = [
"django>=5.2.1",
"django-extensions>=4.1",
"django-model-utils>=5.0.0",
"django-ninja>=1.4.1",
"django-ninja>=1.4.5",
"django-ninja-extra>=0.30.6",
"django-oauth-toolkit>=3.0.1",
"django-polymorphic>=4.1.0",
"enviformer",
@ -47,6 +48,7 @@ dev = [
"ruff>=0.13.3",
"pytest-playwright>=0.7.1",
"pytest-django>=4.11.1",
"pytest-cov>=7.0.0",
]
[tool.ruff]
@ -121,3 +123,22 @@ collectstatic = { cmd = "uv run python manage.py collectstatic --noinput", help
] }
frontend-test-setup = { cmd = "playwright install", help = "Install the browsers required for frontend testing" }
[tool.pytest.ini_options]
addopts = "--verbose --capture=no --durations=10"
testpaths = ["tests", "*/tests"]
pythonpath = ["."]
norecursedirs = [
"env",
"venv",
"envipy-plugins",
"envipy-additional-information",
"envipy-ambit",
"enviformer",
]
markers = [
"api: API tests",
"frontend: Frontend tests",
"end2end: End-to-end tests",
"slow: Slow tests",
]