Skip to content

Commit 21fcba0

Browse files
committed
feat: added provider record
1 parent ae10702 commit 21fcba0

File tree

8 files changed

+660
-0
lines changed

8 files changed

+660
-0
lines changed

algorithm_catalog/dhi/record.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"id": "dhi",
3+
"type": "Feature",
4+
"conformsTo": [
5+
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
6+
],
7+
"properties": {
8+
"created": "2025-12-03T13:00:00Z",
9+
"updated": "2025-12-03T13:00:00Z",
10+
"type": "algoritm_provider",
11+
"title": "DHI Group",
12+
"description": "",
13+
"keywords": [],
14+
"language": {
15+
"code": "en-US",
16+
"name": "English (United States)"
17+
},
18+
"languages": [
19+
{
20+
"code": "en-US",
21+
"name": "English (United States)"
22+
}
23+
],
24+
"contacts": [],
25+
"themes": [],
26+
"license": "other"
27+
},
28+
"linkTemplates": [],
29+
"links": [
30+
{
31+
"rel": "website",
32+
"type": "text/html",
33+
"title": "DHI",
34+
"href": "https://www.dhigroup.com/"
35+
},
36+
{
37+
"rel": "logo",
38+
"type": "image/png",
39+
"title": "Logo",
40+
"href": "https://cms.dhigroup.com/media/a0lpraol/dhi-white-logo.svg?v=1d9818c2cbe8bf0"
41+
}
42+
]
43+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"id": "eurac",
3+
"type": "Feature",
4+
"conformsTo": [
5+
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
6+
],
7+
"properties": {
8+
"created": "2025-12-03T13:00:00Z",
9+
"updated": "2025-12-03T13:00:00Z",
10+
"type": "algoritm_provider",
11+
"title": "Eurac Research",
12+
"description": "",
13+
"keywords": [],
14+
"language": {
15+
"code": "en-US",
16+
"name": "English (United States)"
17+
},
18+
"languages": [
19+
{
20+
"code": "en-US",
21+
"name": "English (United States)"
22+
}
23+
],
24+
"contacts": [],
25+
"themes": [],
26+
"license": "other"
27+
},
28+
"linkTemplates": [],
29+
"links": [
30+
{
31+
"rel": "website",
32+
"type": "text/html",
33+
"title": "EURAC",
34+
"href": "https://www.eurac.edu"
35+
},
36+
{
37+
"rel": "logo",
38+
"type": "image/png",
39+
"title": "Logo",
40+
"href": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Eurac_Research_logo.svg/2560px-Eurac_Research_logo.svg.png"
41+
}
42+
]
43+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"id": "terradue",
3+
"type": "Feature",
4+
"conformsTo": [
5+
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
6+
],
7+
"properties": {
8+
"created": "2025-12-03T13:00:00Z",
9+
"updated": "2025-12-03T13:00:00Z",
10+
"type": "algoritm_provider",
11+
"title": "Terradue Srl",
12+
"description": "",
13+
"keywords": [],
14+
"language": {
15+
"code": "en-US",
16+
"name": "English (United States)"
17+
},
18+
"languages": [
19+
{
20+
"code": "en-US",
21+
"name": "English (United States)"
22+
}
23+
],
24+
"contacts": [],
25+
"themes": [],
26+
"license": "other"
27+
},
28+
"linkTemplates": [],
29+
"links": [
30+
{
31+
"rel": "website",
32+
"type": "text/html",
33+
"title": "Terradue",
34+
"href": "https://www.terradue.com/portal/"
35+
},
36+
{
37+
"rel": "logo",
38+
"type": "image/png",
39+
"title": "Logo",
40+
"href": "https://www.terradue.com/wp-content/uploads/2017/02/logo-03-01-1.svg"
41+
}
42+
]
43+
}

algorithm_catalog/vito/record.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"id": "vito",
3+
"type": "Feature",
4+
"conformsTo": [
5+
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
6+
],
7+
"properties": {
8+
"created": "2025-12-03T13:00:00Z",
9+
"updated": "2025-12-03T13:00:00Z",
10+
"type": "algoritm_provider",
11+
"title": "Vlaams Instituut voor Technologisch Onderzoek",
12+
"description": "",
13+
"keywords": [],
14+
"language": {
15+
"code": "en-US",
16+
"name": "English (United States)"
17+
},
18+
"languages": [
19+
{
20+
"code": "en-US",
21+
"name": "English (United States)"
22+
}
23+
],
24+
"contacts": [],
25+
"themes": [],
26+
"license": "other"
27+
},
28+
"linkTemplates": [],
29+
"links": [
30+
{
31+
"rel": "website",
32+
"type": "text/html",
33+
"title": "VITO",
34+
"href": "https://vito.be"
35+
},
36+
{
37+
"rel": "logo",
38+
"type": "image/png",
39+
"title": "Logo",
40+
"href": "https://vito.be/themes/custom/vitotheme/logo.svg"
41+
}
42+
]
43+
}

algorithm_catalog/wur/record.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"id": "wur",
3+
"type": "Feature",
4+
"conformsTo": [
5+
"http://www.opengis.net/spec/ogcapi-records-1/1.0/req/record-core"
6+
],
7+
"properties": {
8+
"created": "2025-12-03T13:00:00Z",
9+
"updated": "2025-12-03T13:00:00Z",
10+
"type": "algoritm_provider",
11+
"title": "Wageningen University & Research",
12+
"description": "",
13+
"keywords": [],
14+
"language": {
15+
"code": "en-US",
16+
"name": "English (United States)"
17+
},
18+
"languages": [
19+
{
20+
"code": "en-US",
21+
"name": "English (United States)"
22+
}
23+
],
24+
"contacts": [],
25+
"themes": [],
26+
"license": "other"
27+
},
28+
"linkTemplates": [],
29+
"links": [
30+
{
31+
"rel": "website",
32+
"type": "text/html",
33+
"title": "Wageningen University & Research",
34+
"href": "https://www.wur.nl/"
35+
},
36+
{
37+
"rel": "logo",
38+
"type": "image/png",
39+
"title": "Logo",
40+
"href": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRng0u0PfPV21hj3R-y9VRh1z_Sj5b61g6Djo4p2mMoJ4GjHkVd3Mm9o0ig9Ubldgk-b0E&usqp=CAU"
41+
}
42+
]
43+
}

qa/tools/apex_algorithm_qa_tools/records.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ def get_platform_ogc_record_schema() -> dict:
2222
return _get_ogc_record_schema("platform.json")
2323

2424

25+
def get_provider_ogc_record_schema() -> dict:
26+
return _get_ogc_record_schema("provider.json")
27+
28+
2529
def _get_ogc_records(folder: str, glob: str) -> List[Any]:
2630
records = []
2731
for path in (get_project_root() / folder).glob(glob):
@@ -37,3 +41,7 @@ def get_service_ogc_records() -> List[Any]:
3741

3842
def get_platform_ogc_records() -> List[Any]:
3943
return _get_ogc_records("platform_catalog", "*.json")
44+
45+
46+
def get_provider_ogc_records() -> List[Any]:
47+
return _get_ogc_records("algorithm_catalog", "*/record.json")

qa/unittests/tests/test_records.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import jsonschema
22

33
import pytest
4+
from apex_algorithm_qa_tools.common import get_project_root
5+
from pathlib import Path
46
from apex_algorithm_qa_tools.records import (
57
get_service_ogc_records,
68
get_service_ogc_record_schema,
79
get_platform_ogc_records,
810
get_platform_ogc_record_schema,
11+
get_provider_ogc_records,
12+
get_provider_ogc_record_schema,
913
)
1014

1115

@@ -44,3 +48,26 @@ def test_service_record_validation(record):
4448
)
4549
def test_platform_record_validation(record):
4650
jsonschema.validate(instance=record, schema=get_platform_ogc_record_schema())
51+
52+
53+
def test_algorithm_provider_records_():
54+
# Test that there is at least one provider record based on the folder structure in the algorithm_repo directory.
55+
# For each subfolder in the `algorithm_catalog` folder, there should be exactly one provider record with a matching `record.json`.
56+
algorithm_catalog_dir: Path = get_project_root() / "algorithm_catalog"
57+
subdirs = [p.name for p in algorithm_catalog_dir.iterdir() if p.is_dir()]
58+
assert len(subdirs) > 0, "No subfolders found under algorithm_catalog"
59+
60+
for subdir in subdirs:
61+
assert (algorithm_catalog_dir / subdir / "record.json").exists(), f"Missing record.json for provider '{subdir}'"
62+
63+
64+
@pytest.mark.parametrize(
65+
"record",
66+
[
67+
# Use scenario id as parameterization id to give nicer test names.
68+
pytest.param(record, id=record["id"])
69+
for record in get_provider_ogc_records()
70+
],
71+
)
72+
def test_provider_record_validation(record):
73+
jsonschema.validate(instance=record, schema=get_provider_ogc_record_schema())

0 commit comments

Comments
 (0)