Skip to content

Commit

Permalink
FIx test_shacl & update example ckan datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
mjanez committed Aug 22, 2024
1 parent 3ff0417 commit af0710a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
5 changes: 3 additions & 2 deletions ckanext/schemingdcat/tests/test_shacl.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def graph_from_dataset(dataset_key):
if not file_name.startswith("ckan/"):
file_name = "ckan/" + file_name
dataset_dict = json.loads(get_file_contents(file_name))

log.debug(json.dumps(dataset_dict, indent=2))

# Log the dataset_dict
log.info(f"Generated dataset_dict: {json.dumps(dataset_dict, indent=2)}")

dataset = call_action("package_create", **dataset_dict)

Expand Down
19 changes: 12 additions & 7 deletions examples/ckan/ckan_full_dataset_dcat_ap_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@
"en": "Some version notes.",
"es": "Notas sobre la versión."
},
"access_rights": "Statement about access rights",
"access_rights": "http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations",
"alternate_identifier":"alt-id-1",
"theme": [
"https://example.org/uri/theme1",
"https://example.org/uri/theme2",
"https://example.org/uri/theme3"
"http://inspire.ec.europa.eu/theme/hb",
"http://inspire.ec.europa.eu/theme/am"
],
"language": "es",
"language": "http://publications.europa.eu/resource/authority/language/SPA",
"documentation": [
"https://example.org/some-doc.html"
],
Expand All @@ -67,6 +66,8 @@
"http://data.europa.eu/eli/reg_impl/2023/138/oj_alt"
],
"encoding": "UTF-8",
"contact_name": "Contact 1",
"contact_email": "contact1@example.org",
"contact": [
{
"name": "Contact 1",
Expand Down Expand Up @@ -103,6 +104,7 @@
"temporal_resolution": "PT15M",
"reference_system": "http://www.opengis.net/def/crs/EPSG/0/25830",
"representation_type": "http://inspire.ec.europa.eu/metadata-codelist/SpatialRepresentationType/vector",
"topic": "http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/biota",
"spatial_coverage": [
{
"geom": {
Expand Down Expand Up @@ -197,9 +199,12 @@
"Standard 2",
"Standard 3"
],
"language": "es",
"documentation": [
"https://example.org/some-doc.html"
],
"language": "http://publications.europa.eu/resource/authority/language/SPA",
"provenance": "Sample provenance.",
"relation": "https://example.com/related/resource",
"resource_relation": "https://example.com/related/resource",
"access_services": [
{
"title": "Access Service 1",
Expand Down
4 changes: 2 additions & 2 deletions examples/ckan/ckan_full_dataset_dcat_ap_2_legacy.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
},
{
"key": "theme",
"value": "[\"https://example.org/uri/theme1\",\"https://example.org/uri/theme2\",\"https://example.org/uri/theme3\"]"
"value": "[\"http://inspire.ec.europa.eu/theme/hb\",\"http://inspire.ec.europa.eu/theme/am\"]"
},
{
"key": "language",
"value": "[\"en\",\"ca\",\"es\"]"
"value": "http://publications.europa.eu/resource/authority/language/SPA"
},
{
"key": "documentation",
Expand Down
19 changes: 11 additions & 8 deletions examples/ckan/ckan_full_dataset_dcat_ap_2_vocabularies.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@
"en": "Some version notes.",
"es": "Notas sobre la versión."
},
"access_rights": "http://publications.europa.eu/resource/authority/access-right/PUBLIC",
"alternate_identifier": "https://org1.example.org/datasets/alt-id-1",
"access_rights": "http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations",
"alternate_identifier":"alt-id-1",
"theme": [
"https://example.org/uri/theme1",
"https://example.org/uri/theme2",
"https://example.org/uri/theme3"
"http://inspire.ec.europa.eu/theme/hb",
"http://inspire.ec.europa.eu/theme/am"
],
"language": "http://publications.europa.eu/resource/authority/language/SPA",
"documentation": [
"https://example.org/some-doc.html"
],
"conforms_to": [
"https://joinup.ec.europa.eu/collection/semic-support-centre/solution/dcat-application-profile-data-portals-europe/release/211",
"https://joinup.ec.europa.eu/collection/semic-support-centre/solution/dcat-application-profile-data-portals-europe/release/210"
"Standard 1",
"Standard 2",
"Standard 3"
],
"is_referenced_by": [
"https://doi.org/10.1038/sdata.2018.22",
Expand All @@ -66,6 +66,8 @@
"http://data.europa.eu/eli/reg_impl/2023/138/oj_alt"
],
"encoding": "UTF-8",
"contact_name": "Contact 1",
"contact_email": "contact1@example.org",
"contact": [
{
"name": "Contact 1",
Expand Down Expand Up @@ -102,6 +104,7 @@
"temporal_resolution": "PT15M",
"reference_system": "http://www.opengis.net/def/crs/EPSG/0/25830",
"representation_type": "http://inspire.ec.europa.eu/metadata-codelist/SpatialRepresentationType/vector",
"topic": "http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/biota",
"spatial_coverage": [
{
"geom": {
Expand Down Expand Up @@ -189,7 +192,7 @@
"issued": "2024-05-01T01:20:33",
"modified": "2024-05-05T09:33:20",
"license": "http://publications.europa.eu/resource/authority/licence/CC_BYNC_4_0",
"rights": "http://publications.europa.eu/resource/authority/access-right/PUBLIC",
"rights": "http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations",
"conforms_to": [
"https://joinup.ec.europa.eu/collection/semic-support-centre/solution/dcat-application-profile-data-portals-europe/release/211",
"https://joinup.ec.europa.eu/collection/semic-support-centre/solution/dcat-application-profile-data-portals-europe/release/210"
Expand Down

0 comments on commit af0710a

Please sign in to comment.