diff --git a/pipelines/rj_sms/dump_azureblob_estoque_tpc/constants.py b/pipelines/rj_sms/dump_azureblob_estoque_tpc/constants.py index c12e01b26..d530c6e45 100644 --- a/pipelines/rj_sms/dump_azureblob_estoque_tpc/constants.py +++ b/pipelines/rj_sms/dump_azureblob_estoque_tpc/constants.py @@ -16,4 +16,4 @@ class constants(Enum): DATASET_ID = "brutos_estoque_central_tpc" TABLE_POSICAO_ID = "estoque_posicao" CONTAINER_NAME = "datalaketpc" - BLOB_PATH_POSICAO = "gold/logistico/cliente=prefeitura_rio/planta=sms_rio/estoque_local/estoque_local.csv" + BLOB_PATH_POSICAO = "gold/logistico/cliente=prefeitura_rio/planta=sms_rio/estoque_local/estoque_local.csv" # noqa: E501 diff --git a/pipelines/rj_sms/utils.py b/pipelines/rj_sms/utils.py index 6d3061d73..1f157ec5a 100644 --- a/pipelines/rj_sms/utils.py +++ b/pipelines/rj_sms/utils.py @@ -249,30 +249,6 @@ def callback(block): return output_path -@task -def download_url(url: str, file_name: str, file_folder: str) -> str: - """ - Downloads a file from a given URL and saves it to the specified folder with the given name. - - Args: - url (str): The URL of the file to download. - file_name (str): The name to give the downloaded file. - file_folder (str): The folder to save the downloaded file in. - - Returns: - str: The full path to the downloaded file. - """ - file_path = os.path.join(file_folder, file_name) - with open(file_path, "wb") as f: - c = pycurl.Curl() - c.setopt(c.URL, url) - c.setopt(c.WRITEDATA, f) - c.perform() - c.close() - - return file_path - - @task def list_files_ftp(host, user, password, directory): """ diff --git a/poetry.lock b/poetry.lock index 81378aa7d..ab214af7f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4732,16 +4732,6 @@ files = [ {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] -[[package]] -name = "pycurl" -version = "7.45.2" -description = "PycURL -- A Python Interface To The cURL library" -optional = false -python-versions = ">=3.5" -files = [ - {file = "pycurl-7.45.2.tar.gz", hash = "sha256:5730590be0271364a5bddd9e245c9cc0fb710c4cbacbdd95264a3122d23224ca"}, -] - [[package]] name = "pydantic" version = "1.10.11" @@ -7170,4 +7160,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<3.11" -content-hash = "157a1329dfbe07279d3b4f8c7a3b7ea0012448158196b8983c4d4273c687d03c" +content-hash = "25def0f1f743ec9ffb7356d4290563a684f93990c64ea09413e5572540e8d484" diff --git a/pyproject.toml b/pyproject.toml index 66518e00a..c0e5ad475 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,6 @@ xarray = "^2022.6.0" xgboost = "^1.7.4" azure-storage-blob = "^12.17.0" icecream = "^2.1.3" -pycurl = "^7.45.2" [tool.poetry.dev-dependencies] pylint = "^2.12.2"