Commit 60918cd3 authored by malte.vogl's avatar malte.vogl
Browse files

Merge branch 'main' of gitlab.gwdg.de:modelsen/semanticlayertools

parents 84de0c57 8d214457
......@@ -24,11 +24,8 @@ class GenerateTree:
while not dimcli.login_status():
try:
dimcli.login(key=api_key)
except HTTPError as e:
if e.response.status_code == 401:
raise
time.sleep(5)
pass
except HTTPError:
raise
self.dsl: dimcli.Dsl = dimcli.Dsl()
self._verbose = verbose
......@@ -163,15 +160,19 @@ class GenerateTree:
if querydf.shape[0] == 0:
return f"The dataset contains no entry for {startDoi}."
elif querydf['times_cited'].iloc[0] >= self.citationLimit:
return f"{startDoi} is cited {querydf['times_cited'].iloc[0]} times. You can try to change the limit, if possible."
return f"{startDoi} is cited {querydf['times_cited'].iloc[0]} times.\
You can try to change the limit, if possible."
try:
self.firstAuthor = doi2id.as_dataframe_authors()['last_name'].iloc[0]
except KeyError:
pass
self.pubids = querydf['id'].values[0]
self.pubrefs = list(
[x for y in querydf['reference_ids'].values for x in y]
)
try:
self.pubrefs = list(
[x for y in querydf['reference_ids'].values for x in y]
)
except KeyError:
return f"{startDoi} has no references listed."
self.dataframeList.append(
self._editDF(querydf, dftype="ref_l1")
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment