Skip to content

Commit

Permalink
fix: Standardise license homepage on one format
Browse files Browse the repository at this point in the history
  • Loading branch information
kovalch committed Aug 26, 2024
1 parent c13a28c commit 1023359
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions ckanext/dcatapchharvest/license.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
skosxl:literalForm "NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired"@en ;
rdfs:label "NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired"@en
] ;
foaf:homepage <https://opendata.swiss/terms-of-use/#terms_open> .
foaf:homepage <https://opendata.swiss/terms-of-use#terms_open> .

<http://dcat-ap.ch/vocabulary/licenses/terms_by>
a skos:Concept ;
Expand All @@ -46,7 +46,7 @@
skosxl:literalForm "NonCommercialAllowed-CommercialAllowed-ReferenceRequired"@en ;
rdfs:label "NonCommercialAllowed-CommercialAllowed-ReferenceRequired"@de
] ;
foaf:homepage <https://opendata.swiss/terms-of-use/#terms_by> .
foaf:homepage <https://opendata.swiss/terms-of-use#terms_by> .

<http://dcat-ap.ch/vocabulary/licenses/terms_ask>
a skos:Concept ;
Expand All @@ -61,7 +61,7 @@
skosxl:literalForm "NonCommercialAllowed-CommercialWithPermission-ReferenceNotRequired"@en ;
rdfs:label "NonCommercialAllowed-CommercialWithPermission-ReferenceNotRequired"@de
] ;
foaf:homepage <https://opendata.swiss/terms-of-use/#terms_ask> .
foaf:homepage <https://opendata.swiss/terms-of-use#terms_ask> .

<http://dcat-ap.ch/vocabulary/licenses/terms_by_ask>
a skos:Concept ;
Expand All @@ -76,7 +76,7 @@
skosxl:literalForm "NonCommercialAllowed-CommercialWithPermission-ReferenceRequired"@en ;
rdfs:label "NonCommercialAllowed-CommercialWithPermission-ReferenceRequired"@de
] ;
foaf:homepage <https://opendata.swiss/terms-of-use/#terms_by_ask> .
foaf:homepage <https://opendata.swiss/terms-of-use#terms_by_ask> .

<https://creativecommons.org/publicdomain/zero/1.0/>
a skos:Concept, cc:License ;
Expand Down
4 changes: 2 additions & 2 deletions ckanext/dcatapchharvest/tests/fixtures/dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
},
{
Expand Down
8 changes: 4 additions & 4 deletions ckanext/dcatapchharvest/tests/test_dcatap_ch_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1023359

Please sign in to comment.