fix: simplify official source labels
This commit is contained in:
@@ -22,6 +22,8 @@
|
|||||||
- Added focused source, clipping, metric, pagination, packaging and UI tests.
|
- Added focused source, clipping, metric, pagination, packaging and UI tests.
|
||||||
- Added compatibility for the official comma-separated grain and horticulture
|
- Added compatibility for the official comma-separated grain and horticulture
|
||||||
group labels after live source validation exposed their exact wording.
|
group labels after live source validation exposed their exact wording.
|
||||||
|
- Replaced internal agriculture/BWK/Waterinfo source identifiers with concise
|
||||||
|
authority labels in the shared end-user dataset display path.
|
||||||
|
|
||||||
## Sprint 204 Governed BWK and Natura 2000 for Mol (2026-07-15)
|
## Sprint 204 Governed BWK and Natura 2000 for Mol (2026-07-15)
|
||||||
|
|
||||||
|
|||||||
@@ -263,6 +263,7 @@ def test_operator_uses_canonical_upload_and_is_packaged_for_runtime() -> None:
|
|||||||
readiness = (ROOT / "scripts" / "run_readiness_check.sh").read_text(encoding="utf-8")
|
readiness = (ROOT / "scripts" / "run_readiness_check.sh").read_text(encoding="utf-8")
|
||||||
map_workspace = (ROOT / "frontend" / "src" / "components" / "map" / "MapWorkspace.tsx").read_text(encoding="utf-8")
|
map_workspace = (ROOT / "frontend" / "src" / "components" / "map" / "MapWorkspace.tsx").read_text(encoding="utf-8")
|
||||||
source_catalog = (ROOT / "frontend" / "src" / "components" / "datasets" / "SourceCatalogPanel.tsx").read_text(encoding="utf-8")
|
source_catalog = (ROOT / "frontend" / "src" / "components" / "datasets" / "SourceCatalogPanel.tsx").read_text(encoding="utf-8")
|
||||||
|
dataset_display = (ROOT / "frontend" / "src" / "lib" / "datasetDisplay.ts").read_text(encoding="utf-8")
|
||||||
|
|
||||||
assert "/datasets/upload" in operator
|
assert "/datasets/upload" in operator
|
||||||
assert "VectorFeature" not in operator
|
assert "VectorFeature" not in operator
|
||||||
@@ -273,6 +274,8 @@ def test_operator_uses_canonical_upload_and_is_packaged_for_runtime() -> None:
|
|||||||
assert "py_compile scripts/provision_agricultural_parcel_history.py" in readiness
|
assert "py_compile scripts/provision_agricultural_parcel_history.py" in readiness
|
||||||
assert "id: 'agriculture'" in map_workspace
|
assert "id: 'agriculture'" in map_workspace
|
||||||
assert "Landbouwgebruikspercelen" in source_catalog
|
assert "Landbouwgebruikspercelen" in source_catalog
|
||||||
|
assert "agriculture: 'Landbouwgebruikspercelen'" in dataset_display
|
||||||
|
assert "agentschap_landbouw_zeevisserij_agricultural_parcels: 'Agentschap Landbouw en Zeevisserij'" in dataset_display
|
||||||
|
|
||||||
|
|
||||||
def test_upload_contract_is_annual_definitive_and_scope_specific(tmp_path: Path) -> None:
|
def test_upload_contract_is_annual_definitive_and_scope_specific(tmp_path: Path) -> None:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { DatasetCreateResponse } from '../../types'
|
import type { DatasetCreateResponse } from '../../types'
|
||||||
|
import { getDatasetSourceDisplayName } from '../../lib/datasetDisplay'
|
||||||
|
|
||||||
interface SourceCatalogPanelProps {
|
interface SourceCatalogPanelProps {
|
||||||
datasets: DatasetCreateResponse[]
|
datasets: DatasetCreateResponse[]
|
||||||
@@ -139,7 +140,7 @@ export function SourceCatalogPanel({ datasets }: SourceCatalogPanelProps): JSX.E
|
|||||||
otherMethodCount: matches.length - comparableObservations.length,
|
otherMethodCount: matches.length - comparableObservations.length,
|
||||||
firstYear: years.length ? Math.min(...years) : null,
|
firstYear: years.length ? Math.min(...years) : null,
|
||||||
lastYear: years.length ? Math.max(...years) : null,
|
lastYear: years.length ? Math.max(...years) : null,
|
||||||
source: latest?.source_name ?? latest?.source ?? null,
|
source: latest ? getDatasetSourceDisplayName(latest) : null,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -159,7 +160,7 @@ export function SourceCatalogPanel({ datasets }: SourceCatalogPanelProps): JSX.E
|
|||||||
<article className="source-catalog-card" key={theme.theme}>
|
<article className="source-catalog-card" key={theme.theme}>
|
||||||
<div>
|
<div>
|
||||||
<strong>{theme.label}</strong>
|
<strong>{theme.label}</strong>
|
||||||
<span>{theme.source ? theme.source.replaceAll('_', ' ') : 'Nog niet ingeladen'}</span>
|
<span>{theme.source ?? 'Nog niet ingeladen'}</span>
|
||||||
</div>
|
</div>
|
||||||
<b>{theme.datasetCount > 0 ? 'Beschikbaar' : 'Ontbreekt'}</b>
|
<b>{theme.datasetCount > 0 ? 'Beschikbaar' : 'Ontbreekt'}</b>
|
||||||
<p>{timelineSummary(
|
<p>{timelineSummary(
|
||||||
|
|||||||
@@ -7,15 +7,22 @@ const DATASET_LABEL_BY_LAYER: Record<string, string> = {
|
|||||||
parcels: 'Percelen',
|
parcels: 'Percelen',
|
||||||
population: 'Bevolking',
|
population: 'Bevolking',
|
||||||
forest: 'Bos en groen',
|
forest: 'Bos en groen',
|
||||||
|
nature_value: 'Natuurwaarde',
|
||||||
|
agriculture: 'Landbouwgebruikspercelen',
|
||||||
regional_boundary: 'Grens vervoerregio Kempen',
|
regional_boundary: 'Grens vervoerregio Kempen',
|
||||||
municipality_boundaries: 'Gemeentegrenzen Kempen',
|
municipality_boundaries: 'Gemeentegrenzen Kempen',
|
||||||
}
|
}
|
||||||
|
|
||||||
const DATASET_SOURCE_LABELS: Record<string, string> = {
|
const DATASET_SOURCE_LABELS: Record<string, string> = {
|
||||||
department_omgeving_land_use: 'Departement Omgeving',
|
department_omgeving_land_use: 'Departement Omgeving',
|
||||||
|
agentschap_landbouw_zeevisserij_agricultural_parcels: 'Agentschap Landbouw en Zeevisserij',
|
||||||
|
digitaal_vlaanderen_orthophoto: 'Digitaal Vlaanderen',
|
||||||
grb: 'GRB',
|
grb: 'GRB',
|
||||||
|
historical_landuse: 'Digitaal Vlaanderen',
|
||||||
|
inbo_bwk_natura2000: 'INBO',
|
||||||
statbel: 'Statbel',
|
statbel: 'Statbel',
|
||||||
vrbg: 'Digitaal Vlaanderen',
|
vrbg: 'Digitaal Vlaanderen',
|
||||||
|
waterinfo: 'Waterinfo Vlaanderen',
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDatasetSourceDisplayName(dataset: DatasetCreateResponse): string {
|
export function getDatasetSourceDisplayName(dataset: DatasetCreateResponse): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user