Skip to content

Commit

Permalink
rename to CELLAR_WEBAPI_SPARQL_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
duprijil committed Sep 29, 2023
1 parent e9b5804 commit 7b5d632
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ted_sws/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def TED_API_URL(self, config_value: str) -> str:
return config_value

@env_property(config_resolver_class=AirflowAndEnvConfigResolver)
def TED_WEBAPI_SPARQL_URL(self, config_value: str) -> str:
def CELLAR_WEBAPI_SPARQL_URL(self, config_value: str) -> str:
return config_value


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def check_availability_of_notice_in_cellar(notice_uri: str, endpoint_url: str =
:return:
"""
if not endpoint_url:
endpoint_url = config.TED_WEBAPI_SPARQL_URL
endpoint_url = config.CELLAR_WEBAPI_SPARQL_URL
query_template = NOTICE_AVAILABILITY_SPARQL_QUERY_TEMPLATE_PATH.read_text(encoding="utf-8")
query = query_template.format(notice_uri=notice_uri)
result = SPARQLTripleStoreEndpoint(endpoint_url=endpoint_url).with_query(sparql_query=query).fetch_tree()
Expand All @@ -40,7 +40,7 @@ def check_availability_of_notices_in_cellar(notice_uries: List[str], endpoint_ur
:return:
"""
if not endpoint_url:
endpoint_url = config.TED_WEBAPI_SPARQL_URL
endpoint_url = config.CELLAR_WEBAPI_SPARQL_URL
query_template = NOTICES_AVAILABILITY_SPARQL_QUERY_TEMPLATE_PATH.read_text(encoding="utf-8")
notice_uries = " ".join([f"<{notice_uri}>" for notice_uri in notice_uries])
query = query_template.format(notice_uries=notice_uries)
Expand Down

0 comments on commit 7b5d632

Please sign in to comment.