alignement: renomage des nom des fonctions

This commit is contained in:
Rémi Cérès 2019-11-26 01:19:36 -05:00
parent 965d8536c6
commit 4c094699ee
1 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ USER_AGENT = "WikimedicaDiseaseSearch/0.1 (https://gitlab.com/matteodelabre/wiki
session = requests.Session() session = requests.Session()
session.headers = {'User-Agent': USER_AGENT} session.headers = {'User-Agent': USER_AGENT}
def make_sparql_request_wikimedica(page, request): def request_wikimedica(page, request):
""" """
Effectue une requête SPARQL sur une page de WikiMedica Effectue une requête SPARQL sur une page de WikiMedica
@ -31,7 +31,7 @@ def make_sparql_request_wikimedica(page, request):
return [row.asdict() for row in qres] return [row.asdict() for row in qres]
def make_sparql_request_endpoint(endpoint, request): def request_endpoint(endpoint, request):
""" """
Effectue une requête SPARQL sur point d'accés Effectue une requête SPARQL sur point d'accés
@ -60,7 +60,7 @@ request_name_uri = """
} }
""" """
entitys_dic = make_sparql_request_wikimedica( entitys_dic = request_wikimedica(
SIGNES_ET_SYMPTOMES_WIKIMEDICA_PAGE, SIGNES_ET_SYMPTOMES_WIKIMEDICA_PAGE,
request_name_uri request_name_uri
) )
@ -83,7 +83,7 @@ for entity in entitys_dic:
}} }}
""".format(PREFIX_PROPERTY) """.format(PREFIX_PROPERTY)
prop_Wikidata_id = make_sparql_request_wikimedica( prop_Wikidata_id = request_wikimedica(
entity['uri'], entity['uri'],
request_prop_Wikidata_id request_prop_Wikidata_id
) )
@ -108,7 +108,7 @@ for entity in entitys_dic:
}} }}
""".format((entity['name']).lower(), (entity['name']).capitalize()) """.format((entity['name']).lower(), (entity['name']).capitalize())
list_wikidata_pages_uri = (make_sparql_request_endpoint( list_wikidata_pages_uri = (request_endpoint(
WIKIDATA_SPARQL_ENDPOINT, WIKIDATA_SPARQL_ENDPOINT,
request_search_by_name request_search_by_name
))['results']['bindings'] ))['results']['bindings']