basedosdados / sdk

⚙️ Código de manutenção do datalake (metadados e pacotes de acesso) | 📖 Docs: https://basedosdados.github.io/mais/
https://info.basedosdados.org/links
MIT License
394 stars 89 forks source link

fix `_set_config_variables` is not defined #1729

Closed aspeddro closed 1 month ago

aspeddro commented 3 months ago

Introduzido em https://github.com/basedosdados/mais/pull/1712. A função foi removida

Reproduzindo:

cd /tmp
mkdir bd-beta-21
cd bd-beta-21
python -m venv .venv
source .venv/bin/activate
python -m pip install "basedosdados[upload]==2.0.0b21"
python --version                                      
Python 3.9.17
touch test.py

test.py:

import basedosdados as bd

df = bd.read_sql(
    "select * from `basedosdados-dev.br_inep_saeb_staging.dicionario`",
    billing_project_id="basedosdados-dev",
)

print(df)

python test.py

Traceback (most recent call last):
  File "/tmp/bd-beta-21/test.py", line 3, in <module>
    df = bd.read_sql(
  File "/tmp/bd-beta-21/.venv/lib/python3.9/site-packages/basedosdados/download/download.py", line 57, in read_sql
    billing_project_id, from_file = _set_config_variables(
NameError: name '_set_config_variables' is not defined