From d027746c6d835eaf5a91e1acb1e17baacb788ef0 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Sun, 12 Jul 2026 09:32:16 +0200 Subject: [PATCH] Make Access optional for Evaluation --- README.md | 7 +++++++ pyproject.toml | 1 - src/govoplan_evaluation/backend/manifest.py | 11 +++++++---- tests/test_manifest.py | 5 ++++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fdd1494..28f5b3d 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,13 @@ Evaluation does not own: - generic form rendering and submission runtime; those belong in `govoplan-forms` and `govoplan-forms-runtime` - BI dashboards and long-term reporting infrastructure +## Optional Access Integration + +`govoplan-access` is optional. With Access installed, Evaluation can use +identity resolution, permission checks, and role templates. Without Access, +Evaluation remains usable for reduced flows such as public-link questionnaires, +local participant lists, or tenant-local response collection. + ## Development Install ```bash diff --git a/pyproject.toml b/pyproject.toml index fb19754..3e32662 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,6 @@ license = { file = "LICENSE" } authors = [{ name = "GovOPlaN" }] dependencies = [ "govoplan-core>=0.1.8", - "govoplan-access>=0.1.8", ] [tool.setuptools.packages.find] diff --git a/src/govoplan_evaluation/backend/manifest.py b/src/govoplan_evaluation/backend/manifest.py index bc546b0..ea87f01 100644 --- a/src/govoplan_evaluation/backend/manifest.py +++ b/src/govoplan_evaluation/backend/manifest.py @@ -65,7 +65,10 @@ DOCUMENTATION = ( body=( "Evaluation owns structured post-process feedback, surveys, scoring, rubrics, recurring " "evaluation runs, aggregation, and export-ready results. It may import poll response " - "collections as context, but lightweight decision and availability polls remain owned by Poll." + "collections as context, but lightweight decision and availability polls remain owned by Poll. " + "Access is optional: when installed, Evaluation can use principal resolution, permission " + "evaluation, and role templates; without it, reduced local or public-link response flows " + "remain possible." ), layer="available", documentation_types=("admin",), @@ -79,9 +82,9 @@ manifest = ModuleManifest( id=MODULE_ID, name=MODULE_NAME, version=MODULE_VERSION, - dependencies=("access",), - optional_dependencies=("poll", "scheduling", "calendar", "campaigns", "forms", "forms-runtime", "files", "reporting", "dashboard", "portal", "mail", "notifications"), - required_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR), + dependencies=(), + optional_dependencies=("access", "poll", "scheduling", "calendar", "campaigns", "forms", "forms-runtime", "files", "reporting", "dashboard", "portal", "mail", "notifications"), + optional_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR), provides_interfaces=( ModuleInterfaceProvider(name="evaluation.feedback", version="0.1.8"), ModuleInterfaceProvider(name="evaluation.scoring", version="0.1.8"), diff --git a/tests/test_manifest.py b/tests/test_manifest.py index 58ff904..1171ae4 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -12,7 +12,10 @@ class EvaluationManifestTests(unittest.TestCase): self.assertIsInstance(manifest, ModuleManifest) self.assertEqual(manifest.id, "evaluation") - self.assertIn("access", manifest.dependencies) + self.assertNotIn("access", manifest.dependencies) + self.assertIn("access", manifest.optional_dependencies) + self.assertFalse(manifest.required_capabilities) + self.assertIn("auth.principalResolver", manifest.optional_capabilities) self.assertIn("poll", manifest.optional_dependencies) self.assertIn("evaluation.result_aggregation", {interface.name for interface in manifest.provides_interfaces}) self.assertIn("poll.response_collection", {interface.name for interface in manifest.requires_interfaces})