From b499175aeaebb9da9bb90d3a83c85284383d2548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PPP=20Asoci=C4=81cija=20=28PPPA=29=2C=20Country=20as=20Cod?= =?UTF-8?q?e?= Date: Sat, 10 Oct 2026 07:11:56 +0000 Subject: [PATCH] =?UTF-8?q?Datu=20l=C4=ABgums=20(ODCS=20v3)=20no=20XSD:=20?= =?UTF-8?q?B14=20MI=20strat=C4=93=C4=A3ija?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016679RwmHsuTFfxt26wP6rk --- README.md | 6 + contracts/B14-mi-strategija.odcs.yaml | 269 ++++++++++++++++++++++++++ 2 files changed, 275 insertions(+) create mode 100644 contracts/B14-mi-strategija.odcs.yaml diff --git a/README.md b/README.md index c16a22a..a1866f9 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,12 @@ Nozares priekšlikumi atpazīstami pēc atsauces `kind="avots"` (7 rīcības). Rīcībai paredzēts elements `Responsible` ar `@org` = CaC ID no Organizāciju reģistra (`SS-IIII`, sk. [Valdības deklarācijas datukopu](https://processgit.org/Country-as-Code/Valdibas-Deklaracija-as-Code)). Pašreizējā stratēģijas versijā atbildīgās institūcijas nav noteiktas nevienai no 27 rīcībām. +## Datu līgumi (ODCS) + +`contracts/*.odcs.yaml` — datu līgumi pēc Open Data Contract Standard v3, ģenerēti no XSD (shēma līgumā = shēma, pret kuru dati tiek validēti). +Līgumā: objekti un lauki ar tipiem, obligātumu, šabloniem un aprakstiem no XSD; kvalitātes noteikumi; atjaunošanas biežums; turētājs. +Datu ezers (lakehouse.weget.cc, „Valsts kā kods”) katru dienu ielādē datus kopā ar līgumu un pārbauda tos pret līgumu. + ## Rīki | Rīks | Lietojums | diff --git a/contracts/B14-mi-strategija.odcs.yaml b/contracts/B14-mi-strategija.odcs.yaml new file mode 100644 index 0000000..1b51536 --- /dev/null +++ b/contracts/B14-mi-strategija.odcs.yaml @@ -0,0 +1,269 @@ +# ODCS v3 datu līgums: B14 Latvijas Nacionālā MI stratēģija (PPPA piedāvājums) +# Ģenerēts no schemas/mi-strategija-0.1.xsd (tools/xsd_to_odcs.py, lakehouse). Shēmas daļu nelabot ar roku — labot XSD un ģenerēt no jauna. +apiVersion: v3.0.2 +kind: DataContract +id: urn:pppa:cac:contract:B14 +name: Latvijas Nacionālā MI stratēģija (PPPA piedāvājums) +version: 0.1.0 +status: active +domain: Valsts kā kods (Country as Code) +dataProduct: MI stratēģijas datukopa +tenant: PPP Asociācija (PPPA) +description: + purpose: Stratēģijas pīlāri, mērķi un rīcības ar mērķa izpildes mērījumu, termiņu un atsaucēm; rīcībai paredzēta atbildīgā institūcija (CaC + ID). + usage: Mašīnlasāma datu apmaiņa; ielāde datu ezerā katru dienu. + limitations: Pašreizējā versijā atbildīgās institūcijas nav noteiktas. +servers: +- server: processgit + type: custom + format: xml + description: ProcessGit repozitorijs (Gitea API v1) + customProperties: + - property: url + value: https://processgit.org/Country-as-Code/AI-Strategija + - property: ref + value: main + - property: path + value: data/pppa-mis-*.xml + - property: schema + value: https://processgit.org/Country-as-Code/AI-Strategija/src/branch/main/schemas/mi-strategija-0.1.xsd +schema: +- name: AIStrategy + logicalType: object + physicalType: xml-element + physicalName: AIStrategy + description: '' + properties: + - name: id + logicalType: string + required: true + logicalTypeOptions: + pattern: pppa-mis-[0-9]{4}-[0-9]{2}-[0-9]{2} + primaryKey: true + unique: true + - name: version + logicalType: string + required: true + - name: Title + logicalType: string + required: true + - name: Author + logicalType: string + required: true + - name: Status + logicalType: string + required: true + - name: Updated + logicalType: string + required: true + description: Datums kā publicēts (piem. „30.06.2027.”) un @value ISO formā. Ja termiņš nav noteikts (piem. „Precizējams”), @value nav. + - name: Updated@value + logicalType: date + required: false + - name: ProposalsOpened + logicalType: string + required: false + description: Datums kā publicēts (piem. „30.06.2027.”) un @value ISO formā. Ja termiņš nav noteikts (piem. „Precizējams”), @value nav. + - name: ProposalsOpened@value + logicalType: date + required: false + - name: SourceUrl + logicalType: string + required: true + - name: Vision + logicalType: string + required: true + - name: ProposalsNote + logicalType: string + required: false + - name: ProposalsNote@actions + logicalType: array + required: false + customProperties: + - property: lakehouseTable + value: cac_bronze.mis_strategy +- name: Pillar + logicalType: object + physicalType: xml-element + physicalName: Pillar + description: '' + properties: + - name: id + logicalType: string + required: true + logicalTypeOptions: + pattern: pppa-mis-[0-9]{4}-[0-9]{2}-[0-9]{2}\.(p[0-9]+|m[0-9]+|r[0-9]{2,3}|pr[0-9]+|a[0-9]+) + primaryKey: true + unique: true + - name: number + logicalType: string + required: true + logicalTypeOptions: + pattern: '[IVX]+' + - name: Name + logicalType: string + required: true + - name: ShortTitle + logicalType: string + required: false + - name: Heading + logicalType: string + required: true + - name: Summary + logicalType: string + required: false + - name: Description + logicalType: string + required: true + customProperties: + - property: lakehouseTable + value: cac_bronze.mis_action +- name: Goal + logicalType: object + physicalType: xml-element + physicalName: Goal + description: '' + properties: + - name: id + logicalType: string + required: true + logicalTypeOptions: + pattern: pppa-mis-[0-9]{4}-[0-9]{2}-[0-9]{2}\.(p[0-9]+|m[0-9]+|r[0-9]{2,3}|pr[0-9]+|a[0-9]+) + primaryKey: true + unique: true + - name: number + logicalType: string + required: true + - name: Title + logicalType: string + required: true + - name: Description + logicalType: string + required: true + customProperties: + - property: lakehouseTable + value: cac_bronze.mis_action +- name: Action + logicalType: object + physicalType: xml-element + physicalName: Action + description: '' + properties: + - name: id + logicalType: string + required: true + logicalTypeOptions: + pattern: pppa-mis-[0-9]{4}-[0-9]{2}-[0-9]{2}\.(p[0-9]+|m[0-9]+|r[0-9]{2,3}|pr[0-9]+|a[0-9]+) + primaryKey: true + unique: true + - name: number + logicalType: integer + required: true + - name: Tag + logicalType: array + required: false + description: Atzīme, kā publicēta (piem. „Flagmanis”, „Jauns”, „Pārvaldības rekomendācija”). + items: + logicalType: string + - name: Tag@kind + logicalType: string + required: false + - name: Title + logicalType: string + required: true + - name: Text + logicalType: string + required: true + - name: Measurement + logicalType: string + required: true + description: Mērķa izpildes mērījums. + - name: Deadline + logicalType: string + required: true + description: Datums kā publicēts (piem. „30.06.2027.”) un @value ISO formā. Ja termiņš nav noteikts (piem. „Precizējams”), @value nav. + - name: Deadline@value + logicalType: date + required: false + - name: Responsible + logicalType: array + required: false + description: Atbildīgā institūcija. @org = CaC ID no Organizāciju reģistra (SS-IIII). Pašreizējā versijā nav aizpildīts. + items: + logicalType: string + - name: Responsible@org + logicalType: string + required: false + logicalTypeOptions: + pattern: '[0-9]{2}-[0-9]{4}' + - name: Reference + logicalType: array + required: false + description: 'Atsauce: kind = saistits | avots | piemers. @actions norāda saistītās rīcības, @href — saites.' + items: + logicalType: string + - name: Reference@kind + logicalType: string + required: false + quality: + - type: library + rule: validValues + validValues: + - saistits + - avots + - piemers + - name: Reference@actions + logicalType: array + required: false + - name: Reference@href + logicalType: array + required: false + customProperties: + - property: lakehouseTable + value: cac_bronze.mis_action + - property: lakehouseTable + value: cac_silver.ai_action +quality: +- name: xsd_valid + type: custom + engine: xsd + implementation: schemas/mi-strategija-0.1.xsd + description: Datne atbilst XSD shēmai; neatbilstoša datne tiek reģistrēta kā kļūda + dimension: conformity +- name: filename_is_id + type: custom + engine: cac-lakehouse + implementation: Path(path).stem == root/@id + description: Datnes nosaukums = dokumenta identifikators + dimension: consistency +- name: action_has_responsible_org + type: custom + engine: cac-lakehouse + implementation: app.cac_processgit:action_has_responsible_org + description: Rīcībai norādīta atbildīgā institūcija ar CaC ID + dimension: completeness +slaProperties: +- property: frequency + value: 1 + unit: d + element: pull ingest (cron 03:30 UTC) +- property: retention + value: visas versijas (git vēsture) +team: +- role: owner + name: PPP Asociācija (PPPA) +- role: data steward + name: PPP Asociācija (PPPA) +support: +- channel: issues + url: https://processgit.org/Country-as-Code/AI-Strategija/issues +customProperties: +- property: sourceId + value: B14 +- property: namespace + value: urn:pppa:cac:mi-strategija:0.1 +- property: rootElement + value: AIStrategy +- property: identifiers + value: pppa-mis-GGGG-MM-DD; pīlārs .pN; mērķis .mN; rīcība .rNN