Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardise license homepage on one format #109

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading