digital-science / dimcli

Python client and CLI for scientometrics and research analytics using the Dimensions API.
https://digital-science.github.io/dimcli/getting-started.html
MIT License
43 stars 6 forks source link

Loop queries should continue after errors #56

Closed lambdamusic closed 4 years ago

lambdamusic commented 4 years ago

eg

search publications
    where research_orgs.id = "grid.170205.1"
    and year in [2011:2012]
    return publications[id+doi+title+times_cited+recent_citations+field_citation_ratio+category_for+authors]

# leads to

1 EvaluationError found
Query is too long or complex. Please see https://docs.dimensions.ai/dsl/faq.html for more information. [code: 2]

If that's within a loop query, we should continue the iteration after notifying the user.

https://github.com/digital-science/dimcli/blob/master/dimcli/core/api.py#L184

lambdamusic commented 4 years ago

Cannot be done easily cause the recursion has no state about tot numbers of records available (= iterations left), unless it gets it from the payload.

Also not clear why this would be useful as one would get an incomplete dataset.

I've added a more informative error message instead ie suggesting to use the limit keyword.

V 0.63