Migrate Datasources interface patterns
This commit is contained in:
@@ -34,6 +34,7 @@ from govoplan_core.core.provider_governance import (
|
||||
ModuleArchitectureDocumentation,
|
||||
ModuleMaturityEvidence,
|
||||
)
|
||||
from govoplan_core.core.views import ViewSurface
|
||||
from govoplan_core.db.base import Base
|
||||
from govoplan_datasources.backend.db import models as datasource_models
|
||||
from govoplan_datasources.backend.service import (
|
||||
@@ -284,6 +285,14 @@ manifest = ModuleManifest(
|
||||
order=70,
|
||||
),
|
||||
),
|
||||
view_surfaces=(
|
||||
ViewSurface(id="datasources.page", module_id=MODULE_ID, kind="route", label="Datasources", order=70),
|
||||
ViewSurface(id="datasources.catalogue", module_id=MODULE_ID, kind="section", label="Datasource catalogue", order=10),
|
||||
ViewSurface(id="datasources.staging", module_id=MODULE_ID, kind="section", label="Datasource staging", order=20),
|
||||
ViewSurface(id="datasources.origins", module_id=MODULE_ID, kind="section", label="Datasource origins", order=30),
|
||||
ViewSurface(id="datasources.governance", module_id=MODULE_ID, kind="action", label="Datasource governance", order=40),
|
||||
ViewSurface(id="datasources.preview", module_id=MODULE_ID, kind="section", label="Datasource preview and materializations", order=50),
|
||||
),
|
||||
),
|
||||
route_factory=_router,
|
||||
capability_factories={
|
||||
@@ -352,6 +361,83 @@ manifest = ModuleManifest(
|
||||
"risk_compliance",
|
||||
),
|
||||
order=70,
|
||||
metadata={
|
||||
"seed": True,
|
||||
"help_contexts": [
|
||||
"datasources.page",
|
||||
"datasources.catalogue",
|
||||
"datasources.staging",
|
||||
"datasources.origins",
|
||||
"datasources.preview",
|
||||
],
|
||||
},
|
||||
),
|
||||
DocumentationTopic(
|
||||
id="datasources.governance",
|
||||
title="Datasource authority and governance",
|
||||
summary="Explain who owns data meaning, authority, correction, privacy, quality, freshness, retention, and dependent uses.",
|
||||
body=(
|
||||
"Authority mode states whether GovOPlaN, an external system, a synchronized projection, an overlay, or a linked reference "
|
||||
"controls the data. The authoritative source, owner, steward, responsible organization/function, schema owner, privacy "
|
||||
"profile, retention policy, transfer agreement, legal basis, holds, correction procedure, purposes, official keys, and "
|
||||
"known limits provide discoverable institutional context. Freshness and quality policies are typed JSON contracts retained "
|
||||
"with materialization evidence; enforcement remains with the provider or consuming control that declares support. Metadata "
|
||||
"visibility never grants row access."
|
||||
),
|
||||
layer="available",
|
||||
documentation_types=("admin", "user"),
|
||||
audience=("operator", "module_admin", "data_steward", "product_owner"),
|
||||
related_modules=("policy", "organizations", "idm", "dataflow", "reporting", "risk_compliance"),
|
||||
order=71,
|
||||
metadata={
|
||||
"seed": True,
|
||||
"help_contexts": [
|
||||
"datasources.governance",
|
||||
"datasources.field.authority-mode",
|
||||
"datasources.field.authoritative-source",
|
||||
"datasources.field.classification",
|
||||
"datasources.field.publication-state",
|
||||
"datasources.field.freshness-policy",
|
||||
"datasources.field.quality-policy",
|
||||
],
|
||||
},
|
||||
),
|
||||
DocumentationTopic(
|
||||
id="datasources.reference.fields-and-consequences",
|
||||
title="Datasource fields and lifecycle consequences",
|
||||
summary="Live, cached, static, staging, promotion, refresh, freeze, and retirement semantics.",
|
||||
body=(
|
||||
"A Datasource key is the stable catalogue identity used by consumers. Live mode reads through an available origin; cached "
|
||||
"mode refreshes an origin into immutable revisions; static mode promotes uploaded content from staging. Stages are bounded, "
|
||||
"inspectable, and non-consumable until promoted. Promotion creates or updates a governed Datasource and appends an immutable "
|
||||
"materialization. Refresh appends a new cached revision without rewriting older evidence. Freeze labels an immutable, "
|
||||
"addressable state for reproducible execution. Retirement removes the Datasource from new definitions while retained "
|
||||
"materialization references remain governed. Connector absence disables origin registration but leaves local catalogue and "
|
||||
"staging behavior available."
|
||||
),
|
||||
layer="available",
|
||||
documentation_types=("admin", "user"),
|
||||
audience=("operator", "module_admin", "power_user", "product_owner"),
|
||||
related_modules=("connectors", "dataflow", "workflow_engine", "reporting", "audit"),
|
||||
order=72,
|
||||
metadata={
|
||||
"seed": True,
|
||||
"help_contexts": [
|
||||
"datasources.field.origin",
|
||||
"datasources.field.key",
|
||||
"datasources.field.mode",
|
||||
"datasources.action.promote",
|
||||
"datasources.action.refresh",
|
||||
"datasources.action.freeze",
|
||||
"datasources.action.retire",
|
||||
],
|
||||
"consequence_classes": {
|
||||
"promote": "Creates or updates a governed Datasource and appends an immutable materialization revision.",
|
||||
"refresh": "Reads the cached origin and appends a new immutable materialization revision.",
|
||||
"freeze": "Creates a labelled immutable state for reproducible consumers and evidence.",
|
||||
"retire": "Prevents new selection while retained materialization references remain governed.",
|
||||
},
|
||||
},
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user