pybliometrics-dev / pybliometrics

Python-based API-Wrapper to access Scopus
https://pybliometrics.readthedocs.io/en/stable/
Other
407 stars 127 forks source link

create_config(): Prompt is not skipped when there are keys #274

Closed leoncena closed 1 year ago

leoncena commented 1 year ago

pybliometrics version: 3.4.0

Code to reproduce the bug:

import os
keys = ['aaaa', 'bbbb', 'cccc']
from pybliometrics.scopus.utils import create_config
create_config(keys=keys)

Expected behavior:

According to the documentation, the prompt should be skipped, if I understand it correctly. Unfortunately, this is not the case. Did I miss something or is this a bug?

Michael-E-Rose commented 1 year ago

I introduced these parameters last year in #245, but in fact they only work if config.ini does exist. If it does not exist, which is checked already while importing any pybliometrics function, https://github.com/pybliometrics-dev/pybliometrics/blob/master/pybliometrics/scopus/utils/startup.py#L8 kicks in.

I will update the documentation just now.