From 212ac3414fd1ae92a50425b79fec65752de19f39 Mon Sep 17 00:00:00 2001 From: Ashley Sommer Date: Fri, 28 Jun 2024 14:10:58 +1000 Subject: [PATCH] Fix typo in connegp ontology prefix (#233) Replace typo across all instances in the codebase --- README-Dev.md | 2 +- prez/reference_data/prefixes/standard.ttl | 2 +- prez/reference_data/prez_ns.py | 2 +- prez/reference_data/profiles/catprez_default_profiles.ttl | 2 +- prez/reference_data/profiles/prez_default_profiles.ttl | 2 +- prez/reference_data/profiles/spaceprez_default_profiles.ttl | 2 +- prez/reference_data/profiles/vocprez_default_profiles.ttl | 2 +- prez/renderers/renderer.py | 2 +- prez/services/listings.py | 2 +- prez/services/objects.py | 2 +- prez/sparql/objects_listings.py | 4 ++-- tests/data/profiles/remote_profile.ttl | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README-Dev.md b/README-Dev.md index 0abf3fa9..f6bcd8c0 100644 --- a/README-Dev.md +++ b/README-Dev.md @@ -313,7 +313,7 @@ PREFIX dcat: PREFIX sh: PREFIX geo: PREFIX rdfs: -PREFIX altr-ext: +PREFIX altr-ext: PREFIX dcterms: PREFIX prez: PREFIX skos: diff --git a/prez/reference_data/prefixes/standard.ttl b/prez/reference_data/prefixes/standard.ttl index dbd2b56d..22d9ea1c 100644 --- a/prez/reference_data/prefixes/standard.ttl +++ b/prez/reference_data/prefixes/standard.ttl @@ -9,7 +9,7 @@ PREFIX sdoprof: ] . [ vann:preferredNamespacePrefix "altr-ext" ; - vann:preferredNamespaceUri + vann:preferredNamespaceUri ] . [ vann:preferredNamespacePrefix "exds" ; diff --git a/prez/reference_data/prez_ns.py b/prez/reference_data/prez_ns.py index 25a7f5fd..cf5f9a9c 100644 --- a/prez/reference_data/prez_ns.py +++ b/prez/reference_data/prez_ns.py @@ -2,5 +2,5 @@ PREZ = Namespace("https://prez.dev/") ONT = Namespace("https://prez.dev/ont/") -ALTREXT = Namespace("http://www.w3.org/ns/dx/conneg/altr-ext#") +ALTREXT = Namespace("http://www.w3.org/ns/dx/connegp/altr-ext#") REG = Namespace("http://purl.org/linked-data/registry#") diff --git a/prez/reference_data/profiles/catprez_default_profiles.ttl b/prez/reference_data/profiles/catprez_default_profiles.ttl index 67b42b05..4db61a7f 100644 --- a/prez/reference_data/profiles/catprez_default_profiles.ttl +++ b/prez/reference_data/profiles/catprez_default_profiles.ttl @@ -1,4 +1,4 @@ -PREFIX altr-ext: +PREFIX altr-ext: PREFIX dcat: PREFIX dcterms: PREFIX geo: diff --git a/prez/reference_data/profiles/prez_default_profiles.ttl b/prez/reference_data/profiles/prez_default_profiles.ttl index 71034b3b..3bd94497 100644 --- a/prez/reference_data/profiles/prez_default_profiles.ttl +++ b/prez/reference_data/profiles/prez_default_profiles.ttl @@ -1,4 +1,4 @@ -PREFIX altr-ext: +PREFIX altr-ext: PREFIX dcat: PREFIX dcterms: PREFIX geo: diff --git a/prez/reference_data/profiles/spaceprez_default_profiles.ttl b/prez/reference_data/profiles/spaceprez_default_profiles.ttl index 350fc09f..34dbdbcf 100644 --- a/prez/reference_data/profiles/spaceprez_default_profiles.ttl +++ b/prez/reference_data/profiles/spaceprez_default_profiles.ttl @@ -1,4 +1,4 @@ -PREFIX altr-ext: +PREFIX altr-ext: PREFIX dcat: PREFIX dcterms: PREFIX geo: diff --git a/prez/reference_data/profiles/vocprez_default_profiles.ttl b/prez/reference_data/profiles/vocprez_default_profiles.ttl index 9191f9f8..ad313d24 100644 --- a/prez/reference_data/profiles/vocprez_default_profiles.ttl +++ b/prez/reference_data/profiles/vocprez_default_profiles.ttl @@ -1,4 +1,4 @@ -PREFIX altr-ext: +PREFIX altr-ext: PREFIX dcat: PREFIX dcterms: PREFIX geo: diff --git a/prez/renderers/renderer.py b/prez/renderers/renderer.py index 5cecce8a..5a4faf00 100644 --- a/prez/renderers/renderer.py +++ b/prez/renderers/renderer.py @@ -158,7 +158,7 @@ async def return_profiles( for profile in items ] g = Graph(bind_namespaces="rdflib") - g.bind("altr-ext", Namespace("http://www.w3.org/ns/dx/conneg/altr-ext#")) + g.bind("altr-ext", Namespace("http://www.w3.org/ns/dx/connegp/altr-ext#")) for q in queries: g += profiles_graph_cache.query(q) return await return_from_graph( diff --git a/prez/services/listings.py b/prez/services/listings.py index a07e2d28..2eb43068 100644 --- a/prez/services/listings.py +++ b/prez/services/listings.py @@ -35,7 +35,7 @@ async def listing_function( listing_item.profile = prof_and_mt_info.profile if prof_and_mt_info.profile == URIRef( - "http://www.w3.org/ns/dx/conneg/altr-ext#alt-profile" + "http://www.w3.org/ns/dx/connegp/altr-ext#alt-profile" ): return await return_profiles( classes=frozenset(listing_item.selected_class), diff --git a/prez/services/objects.py b/prez/services/objects.py index b096bb69..16decbd7 100644 --- a/prez/services/objects.py +++ b/prez/services/objects.py @@ -61,7 +61,7 @@ async def object_function( selected_class=prof_and_mt_info.selected_class, ) if prof_and_mt_info.profile == URIRef( - "http://www.w3.org/ns/dx/conneg/altr-ext#alt-profile" + "http://www.w3.org/ns/dx/connegp/altr-ext#alt-profile" ): return await return_profiles( classes=frozenset(object_item.selected_class), diff --git a/prez/sparql/objects_listings.py b/prez/sparql/objects_listings.py index 8594223a..c60f1d7d 100644 --- a/prez/sparql/objects_listings.py +++ b/prez/sparql/objects_listings.py @@ -17,7 +17,7 @@ log = logging.getLogger(__name__) -ALTREXT = Namespace("http://www.w3.org/ns/dx/conneg/altr-ext#") +ALTREXT = Namespace("http://www.w3.org/ns/dx/connegp/altr-ext#") PREZ = Namespace("https://prez.dev/") @@ -756,7 +756,7 @@ def select_profile_mediatype( if requested_profile_token: requested_profile_uri = get_uri_for_curie_id(requested_profile_token) query = dedent( - f""" PREFIX altr-ext: + f""" PREFIX altr-ext: PREFIX dcat: PREFIX dcterms: PREFIX geo: diff --git a/tests/data/profiles/remote_profile.ttl b/tests/data/profiles/remote_profile.ttl index dba42432..b3caa154 100644 --- a/tests/data/profiles/remote_profile.ttl +++ b/tests/data/profiles/remote_profile.ttl @@ -1,4 +1,4 @@ -PREFIX altr-ext: +PREFIX altr-ext: PREFIX dcat: PREFIX dcterms: PREFIX geo: