Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions algorithm_catalog/dhi/record.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"id": "dhi",
"type": "Feature",
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
],
"properties": {
"created": "2025-12-03T13:00:00Z",
"updated": "2025-12-03T13:00:00Z",
"type": "algoritm_provider",
"title": "DHI Group",
"description": "",
"keywords": [],
"language": {
"code": "en-US",
"name": "English (United States)"
},
"languages": [
{
"code": "en-US",
"name": "English (United States)"
}
],
"contacts": [],
"themes": [],
"license": "other"
},
"linkTemplates": [],
"links": [
{
"rel": "website",
"type": "text/html",
"title": "DHI",
"href": "https://www.dhigroup.com/"
},
{
"rel": "logo",
"type": "image/png",
"title": "Logo",
"href": "https://cms.dhigroup.com/media/a0lpraol/dhi-white-logo.svg?v=1d9818c2cbe8bf0"
}
]
}
43 changes: 43 additions & 0 deletions algorithm_catalog/eurac/record.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"id": "eurac",
"type": "Feature",
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
],
"properties": {
"created": "2025-12-03T13:00:00Z",
"updated": "2025-12-03T13:00:00Z",
"type": "algoritm_provider",
"title": "Eurac Research",
"description": "",
"keywords": [],
"language": {
"code": "en-US",
"name": "English (United States)"
},
"languages": [
{
"code": "en-US",
"name": "English (United States)"
}
],
"contacts": [],
"themes": [],
"license": "other"
},
"linkTemplates": [],
"links": [
{
"rel": "website",
"type": "text/html",
"title": "EURAC",
"href": "https://www.eurac.edu"
},
{
"rel": "logo",
"type": "image/png",
"title": "Logo",
"href": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Eurac_Research_logo.svg/2560px-Eurac_Research_logo.svg.png"
}
]
}
43 changes: 43 additions & 0 deletions algorithm_catalog/terradue/record.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"id": "terradue",
"type": "Feature",
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
],
"properties": {
"created": "2025-12-03T13:00:00Z",
"updated": "2025-12-03T13:00:00Z",
"type": "algoritm_provider",
"title": "Terradue Srl",
"description": "",
"keywords": [],
"language": {
"code": "en-US",
"name": "English (United States)"
},
"languages": [
{
"code": "en-US",
"name": "English (United States)"
}
],
"contacts": [],
"themes": [],
"license": "other"
},
"linkTemplates": [],
"links": [
{
"rel": "website",
"type": "text/html",
"title": "Terradue",
"href": "https://www.terradue.com/portal/"
},
{
"rel": "logo",
"type": "image/png",
"title": "Logo",
"href": "https://www.terradue.com/wp-content/uploads/2017/02/logo-03-01-1.svg"
}
]
}
43 changes: 43 additions & 0 deletions algorithm_catalog/vito/record.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"id": "vito",
"type": "Feature",
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
],
"properties": {
"created": "2025-12-03T13:00:00Z",
"updated": "2025-12-03T13:00:00Z",
"type": "algoritm_provider",
"title": "Vlaams Instituut voor Technologisch Onderzoek",
"description": "",
"keywords": [],
"language": {
"code": "en-US",
"name": "English (United States)"
},
"languages": [
{
"code": "en-US",
"name": "English (United States)"
}
],
"contacts": [],
"themes": [],
"license": "other"
},
"linkTemplates": [],
"links": [
{
"rel": "website",
"type": "text/html",
"title": "VITO",
"href": "https://vito.be"
},
{
"rel": "logo",
"type": "image/png",
"title": "Logo",
"href": "https://vito.be/themes/custom/vitotheme/logo.svg"
}
]
}
43 changes: 43 additions & 0 deletions algorithm_catalog/wur/record.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"id": "wur",
"type": "Feature",
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
],
"properties": {
"created": "2025-12-03T13:00:00Z",
"updated": "2025-12-03T13:00:00Z",
"type": "algoritm_provider",
"title": "Wageningen University & Research",
"description": "",
"keywords": [],
"language": {
"code": "en-US",
"name": "English (United States)"
},
"languages": [
{
"code": "en-US",
"name": "English (United States)"
}
],
"contacts": [],
"themes": [],
"license": "other"
},
"linkTemplates": [],
"links": [
{
"rel": "website",
"type": "text/html",
"title": "Wageningen University & Research",
"href": "https://www.wur.nl/"
},
{
"rel": "logo",
"type": "image/png",
"title": "Logo",
"href": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRng0u0PfPV21hj3R-y9VRh1z_Sj5b61g6Djo4p2mMoJ4GjHkVd3Mm9o0ig9Ubldgk-b0E&usqp=CAU"
}
]
}
8 changes: 8 additions & 0 deletions qa/tools/apex_algorithm_qa_tools/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def get_platform_ogc_record_schema() -> dict:
return _get_ogc_record_schema("platform.json")


def get_provider_ogc_record_schema() -> dict:
return _get_ogc_record_schema("provider.json")


def _get_ogc_records(folder: str, glob: str) -> List[Any]:
records = []
for path in (get_project_root() / folder).glob(glob):
Expand All @@ -37,3 +41,7 @@ def get_service_ogc_records() -> List[Any]:

def get_platform_ogc_records() -> List[Any]:
return _get_ogc_records("platform_catalog", "*.json")


def get_provider_ogc_records() -> List[Any]:
return _get_ogc_records("algorithm_catalog", "*/record.json")
27 changes: 27 additions & 0 deletions qa/unittests/tests/test_records.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import jsonschema

import pytest
from apex_algorithm_qa_tools.common import get_project_root
from pathlib import Path
from apex_algorithm_qa_tools.records import (
get_service_ogc_records,
get_service_ogc_record_schema,
get_platform_ogc_records,
get_platform_ogc_record_schema,
get_provider_ogc_records,
get_provider_ogc_record_schema,
)


Expand Down Expand Up @@ -44,3 +48,26 @@ def test_service_record_validation(record):
)
def test_platform_record_validation(record):
jsonschema.validate(instance=record, schema=get_platform_ogc_record_schema())


def test_algorithm_provider_records_():
# Test that there is at least one provider record based on the folder structure in the algorithm_repo directory.
# For each subfolder in the `algorithm_catalog` folder, there should be exactly one provider record with a matching `record.json`.
algorithm_catalog_dir: Path = get_project_root() / "algorithm_catalog"
subdirs = [p.name for p in algorithm_catalog_dir.iterdir() if p.is_dir()]
assert len(subdirs) > 0, "No subfolders found under algorithm_catalog"

for subdir in subdirs:
assert (algorithm_catalog_dir / subdir / "record.json").exists(), f"Missing record.json for provider '{subdir}'"


@pytest.mark.parametrize(
"record",
[
# Use scenario id as parameterization id to give nicer test names.
pytest.param(record, id=record["id"])
for record in get_provider_ogc_records()
],
)
def test_provider_record_validation(record):
jsonschema.validate(instance=record, schema=get_provider_ogc_record_schema())
Loading