From 1023359671494d4e2ccfc4c2ef2e3ae6d9205bd9 Mon Sep 17 00:00:00 2001 From: kovalch Date: Mon, 26 Aug 2024 13:53:37 +0200 Subject: [PATCH] fix: Standardise license homepage on one format --- ckanext/dcatapchharvest/license.ttl | 8 ++++---- ckanext/dcatapchharvest/tests/fixtures/dataset.json | 4 ++-- ckanext/dcatapchharvest/tests/test_dcatap_ch_parse.py | 8 ++++---- ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ckanext/dcatapchharvest/license.ttl b/ckanext/dcatapchharvest/license.ttl index 720da79..f93e607 100644 --- a/ckanext/dcatapchharvest/license.ttl +++ b/ckanext/dcatapchharvest/license.ttl @@ -31,7 +31,7 @@ skosxl:literalForm "NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired"@en ; rdfs:label "NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired"@en ] ; - foaf:homepage . + foaf:homepage . a skos:Concept ; @@ -46,7 +46,7 @@ skosxl:literalForm "NonCommercialAllowed-CommercialAllowed-ReferenceRequired"@en ; rdfs:label "NonCommercialAllowed-CommercialAllowed-ReferenceRequired"@de ] ; - foaf:homepage . + foaf:homepage . a skos:Concept ; @@ -61,7 +61,7 @@ skosxl:literalForm "NonCommercialAllowed-CommercialWithPermission-ReferenceNotRequired"@en ; rdfs:label "NonCommercialAllowed-CommercialWithPermission-ReferenceNotRequired"@de ] ; - foaf:homepage . + foaf:homepage . a skos:Concept ; @@ -76,7 +76,7 @@ skosxl:literalForm "NonCommercialAllowed-CommercialWithPermission-ReferenceRequired"@en ; rdfs:label "NonCommercialAllowed-CommercialWithPermission-ReferenceRequired"@de ] ; - foaf:homepage . + foaf:homepage . a skos:Concept, cc:License ; diff --git a/ckanext/dcatapchharvest/tests/fixtures/dataset.json b/ckanext/dcatapchharvest/tests/fixtures/dataset.json index ebd1883..4532d70 100644 --- a/ckanext/dcatapchharvest/tests/fixtures/dataset.json +++ b/ckanext/dcatapchharvest/tests/fixtures/dataset.json @@ -122,7 +122,7 @@ "https://example.com/documentation-resource-2" ], "rights": "http://www.opendefinition.org/licenses/cc-zero", - "license": "https://opendata.swiss/terms-of-use/#terms_open", + "license": "https://opendata.swiss/terms-of-use#terms_open", "format": "CSV", "issued": "2015-06-26T15:21:09.034694", "modified": "2015-06-30T15:21:09.000000" @@ -135,7 +135,7 @@ "https://example.com/documentation-resource-2" ], "rights": "http://dcat-ap.ch/vocabulary/licenses/terms_by", - "license": "https://opendata.swiss/terms-of-use/#terms_by", + "license": "https://opendata.swiss/terms-of-use#terms_by", "format": "HTML" }, { diff --git a/ckanext/dcatapchharvest/tests/test_dcatap_ch_parse.py b/ckanext/dcatapchharvest/tests/test_dcatap_ch_parse.py index 5866fd8..e796a07 100644 --- a/ckanext/dcatapchharvest/tests/test_dcatap_ch_parse.py +++ b/ckanext/dcatapchharvest/tests/test_dcatap_ch_parse.py @@ -32,8 +32,8 @@ def test_rights_license(self): # Resources eq_(len(dataset['resources']), 1) resource = dataset['resources'][0] - eq_(unicode(resource['rights']), u'https://opendata.swiss/terms-of-use/#terms_by') - eq_(unicode(resource['license']), u'https://opendata.swiss/terms-of-use/#terms_by_ask') + eq_(unicode(resource['rights']), u'https://opendata.swiss/terms-of-use#terms_by') + eq_(unicode(resource['license']), u'https://opendata.swiss/terms-of-use#terms_by_ask') def test_dataset_all_fields(self): @@ -146,7 +146,7 @@ def test_dataset_all_fields(self): eq_(resource['format'], u'html') eq_(resource['media_type'], u'text/html') eq_(resource['identifier'], u'346265-fr@bundesamt-fur-statistik-bfs') - eq_(resource['license'], u'https://opendata.swiss/terms-of-use/#terms_by') + eq_(resource['license'], u'https://opendata.swiss/terms-of-use#terms_by') eq_(resource['rights'], u'http://www.opendefinition.org/licenses/cc-zero') eq_(resource['language'], [u'fr']) eq_(resource['issued'], u'1900-12-31T00:00:00') @@ -402,7 +402,7 @@ def test_multiple_rights_statements(self): dataset = [d for d in p.datasets()][0] resource = dataset["resources"][0] - eq_(unicode(resource['rights']), u"https://opendata.swiss/terms-of-use/#terms_by_ask") + eq_(unicode(resource['rights']), u"https://opendata.swiss/terms-of-use#terms_by_ask") def test_eu_themes_mapping(self): contents = self._get_file_contents('catalog-themes.xml') diff --git a/ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py b/ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py index 333936b..d79000e 100644 --- a/ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py +++ b/ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py @@ -113,7 +113,7 @@ def test_graph_from_dataset(self): if resource_dict.get('rights') == "http://www.opendefinition.org/licenses/cc-zero": assert self._triple(g, distribution, DCT.rights, URIRef("https://creativecommons.org/publicdomain/zero/1.0/")) - if resource_dict.get('license') == "https://opendata.swiss/terms-of-use/#terms_open": + if resource_dict.get('license') == "https://opendata.swiss/terms-of-use#terms_open": assert self._triple(g, distribution, DCT.license, URIRef("http://dcat-ap.ch/vocabulary/licenses/terms_open")) # 28e75e40-e1a1-497b-a1b9-8c1834d60201