feat: implement governed datasource catalogue metadata
This commit is contained in:
@@ -29,6 +29,11 @@ from govoplan_core.core.modules import (
|
||||
PermissionDefinition,
|
||||
RoleTemplate,
|
||||
)
|
||||
from govoplan_core.core.provider_governance import (
|
||||
ModuleArchitectureDeclaration,
|
||||
ModuleArchitectureDocumentation,
|
||||
ModuleMaturityEvidence,
|
||||
)
|
||||
from govoplan_core.db.base import Base
|
||||
from govoplan_datasources.backend.db import models as datasource_models
|
||||
from govoplan_datasources.backend.service import (
|
||||
@@ -45,6 +50,58 @@ MODULE_NAME = "Datasources"
|
||||
MODULE_VERSION = "0.1.14"
|
||||
DATASOURCE_INTERFACE_VERSION = "0.1.0"
|
||||
|
||||
ARCHITECTURE = ModuleArchitectureDeclaration(
|
||||
layer="data_reporting_integration",
|
||||
kind="foundation",
|
||||
maturity="vertical_slice",
|
||||
evidence=(
|
||||
ModuleMaturityEvidence(
|
||||
kind="test",
|
||||
reference="tests/test_lifecycle.py",
|
||||
summary="Exercises staging, immutable materialization, publication, and typed governance behavior.",
|
||||
),
|
||||
ModuleMaturityEvidence(
|
||||
kind="documentation",
|
||||
reference="docs/CONCEPT.md",
|
||||
summary="Defines datasource ownership and connector/dataflow boundaries.",
|
||||
),
|
||||
ModuleMaturityEvidence(
|
||||
kind="migration",
|
||||
reference="tests/test_migrations.py",
|
||||
summary="Migrates and validates the governed catalogue schema.",
|
||||
),
|
||||
),
|
||||
known_limits=(
|
||||
"Governance references are stable provider-neutral refs; dedicated selectors depend on the owning optional modules.",
|
||||
"Quality and freshness policies are stored and snapshotted but enforcement remains provider-specific.",
|
||||
),
|
||||
supported_authority_modes=(
|
||||
"native_authoritative",
|
||||
"external_authoritative",
|
||||
"external_mirror",
|
||||
"governed_sync",
|
||||
"governance_overlay",
|
||||
"linked_reference",
|
||||
),
|
||||
owned_concepts=(
|
||||
"datasource catalogue identity",
|
||||
"datasource governance metadata",
|
||||
"staging and immutable materializations",
|
||||
"datasource publication lifecycle",
|
||||
),
|
||||
non_owned_concepts=(
|
||||
"external transport and credentials",
|
||||
"dataflow transformation semantics",
|
||||
"report presentation",
|
||||
),
|
||||
documentation=ModuleArchitectureDocumentation(
|
||||
migration=("tests/test_migrations.py",),
|
||||
recovery=("docs/CONCEPT.md",),
|
||||
security=("docs/CONCEPT.md",),
|
||||
operations=("docs/CONCEPT.md",),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def _permission(scope: str, label: str, description: str) -> PermissionDefinition:
|
||||
module_id, resource, action = scope.split(":", 2)
|
||||
@@ -265,18 +322,23 @@ manifest = ModuleManifest(
|
||||
label="Datasources",
|
||||
),
|
||||
),
|
||||
architecture=ARCHITECTURE,
|
||||
documentation=(
|
||||
DocumentationTopic(
|
||||
id="datasources.lifecycle",
|
||||
title="Datasource lifecycle",
|
||||
summary="Governed live, cached, and static data with staging and frozen states.",
|
||||
summary="Governed live, cached, and static data/register entries with staging, frozen states, provenance, and institutional ownership context.",
|
||||
body=(
|
||||
"Datasources is the provider-neutral catalogue consumed by Dataflow, "
|
||||
"Workflow, Reporting, and policy-aware modules. Static data is staged "
|
||||
"before promotion. Cached data refreshes connector origins into immutable "
|
||||
"materializations. Live data is read through a connector and may be frozen "
|
||||
"for reproducible evidence. Connectors owns protocols and credentials; "
|
||||
"Datasources owns data identity, provenance, lifecycle, and read semantics."
|
||||
"Datasources owns data identity, provenance, lifecycle, read semantics, "
|
||||
"and the typed governance catalogue for authority, purpose, quality, "
|
||||
"freshness, classification, correction, and dependent services, flows, "
|
||||
"reports, controls, and decisions. Governance metadata visibility does not "
|
||||
"grant access to protected rows."
|
||||
),
|
||||
layer="available",
|
||||
documentation_types=("admin", "user"),
|
||||
|
||||
Reference in New Issue
Block a user