Skip to content

Commit

Permalink
Add test data
Browse files Browse the repository at this point in the history
  • Loading branch information
duncandewhurst committed Sep 1, 2023
1 parent 2b63d13 commit a9b7b6e
Show file tree
Hide file tree
Showing 4 changed files with 235 additions and 0 deletions.
99 changes: 99 additions & 0 deletions test_data/all_errors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"datasets": [
{
"title": "",
"risk_data_type": "wrong_code",
"publisher": {
"name": 1,
"url": "www.example.com"
},
"spatial": {
"scale": "national",
"bbox": [
0
],
"centroid": [
0,
0,
0
],
"countries": "example"
},
"license": "commercial",
"contact_point": {
"name": "Example contact point",
"email": "example.com"
},
"creator": {
},
"attributions": [],
"resources": [
{
"id": "1",
"title": "Example resource",
"description": "A resource",
"format": "geotiff",
"url": "http://www.example.com",
"spatial_resolution": 0,
"authorNames": [
"a",
"a"
],
"temporal": {
"start": "11"
},
"date_published": "1st Jan"
}
],
"hazard": {
"event_sets": [
{
"id": "1",
"hazards": [
{
"id": "1",
"type": "coastal_flood",
"processes": [
"coastal_flood"
]
}
],
"analysis_type": "deterministic",
"events": [
{
"id": "1",
"calculation_method": "inferred",
"hazard": {
"id": "1",
"type": "coastal_flood",
"processes": [
"coastal_flood"
],
"occurrence": {
"probabalistic": {
"return_period": -1,
"probability": {
"value": 10,
"span": "a"
}
}
}
}
}
]
}
]
},
"links": [
{
"href": "https://raw.githubusercontent.com/GFDRR/rdl-standard/0__2__0/schema/rdls_schema.json",
"rel": "wrongrel"
},
{
"href": "https://raw.githubusercontent.com/GFDRR/rdl-standard/0__2__0/schema/rdls_schema.json",
"rel": "describedby"
}
]
}
]
}
41 changes: 41 additions & 0 deletions test_data/invalid_countries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"datasets": [
{
"id": "1",
"title": "Example dataset",
"risk_data_type": "hazard",
"publisher": {
"name": "Example publisher",
"url": "https://www.example.com"
},
"spatial": {
"scale": "national",
"countries": ["A", "B"]
},
"license": "commercial",
"contact_point": {
"name": "Example contact point",
"email": "mail@example.com"
},
"creator": {
"name": "Example creator",
"email": "mail@example.com"
},
"resources": [
{
"id": "1",
"title": "Example resource",
"description": "A resource",
"format": "geotiff",
"url": "http://www.example.com"
}
],
"links": [
{
"href": "https://raw.githubusercontent.com/GFDRR/rdl-standard/0__2__0/schema/rdls_schema.json",
"rel": "describedby"
}
]
}
]
}
55 changes: 55 additions & 0 deletions test_data/invalid_resource_ids.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"datasets": [
{
"id": "1",
"title": "Example dataset",
"risk_data_type": "hazard",
"publisher": {
"name": "Example publisher",
"url": "https://www.example.com"
},
"spatial": {
"scale": "national",
"countries": [1,2,3]
},
"license": "commercial",
"contact_point": {
"name": "Example contact point",
"email": "mail@example.com"
},
"creator": {
"name": "Example creator",
"email": "mail@example.com"
},
"resources": [
{
"id": "1",
"title": "Example resource",
"description": "A resource",
"format": "geotiff",
"url": "http://www.example.com"
},
{
"id": 1,
"title": "Example resource",
"description": "A resource",
"format": "geotiff",
"url": "http://www.example.com"
},
{
"id": 2,
"title": "Example resource",
"description": "A resource",
"format": "geotiff",
"url": "http://www.example.com"
}
],
"links": [
{
"href": "https://raw.githubusercontent.com/GFDRR/rdl-standard/0__2__0/schema/rdls_schema.json",
"rel": "describedby"
}
]
}
]
}
40 changes: 40 additions & 0 deletions test_data/valid_template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"datasets": [
{
"id": "1",
"title": "Example dataset",
"risk_data_type": "hazard",
"publisher": {
"name": "Example publisher",
"url": "https://www.example.com"
},
"spatial": {
"scale": "national"
},
"license": "commercial",
"contact_point": {
"name": "Example contact point",
"email": "mail@example.com"
},
"creator": {
"name": "Example creator",
"email": "mail@example.com"
},
"resources": [
{
"id": "1",
"title": "Example resource",
"description": "A resource",
"format": "geotiff",
"url": "http://www.example.com"
}
],
"links": [
{
"href": "https://raw.githubusercontent.com/GFDRR/rdl-standard/0__2__0/schema/rdls_schema.json",
"rel": "describedby"
}
]
}
]
}

0 comments on commit a9b7b6e

Please sign in to comment.