diff --git a/Jenkinsfile b/Jenkinsfile index d46901e0..b948d459 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,7 +40,7 @@ pipeline { dir('./gitrepo') { git( url: 'https://github.com/Knowledge-Graph-Hub/kg-covid-19', - branch: 'master' + branch: $BRANCH_NAME ) sh '/usr/bin/python3.7 -m venv venv' sh '. venv/bin/activate' diff --git a/kg_covid_19/utils/download_utils.py b/kg_covid_19/utils/download_utils.py index 53e96252..db78339e 100644 --- a/kg_covid_19/utils/download_utils.py +++ b/kg_covid_19/utils/download_utils.py @@ -4,18 +4,11 @@ import logging import os - import wget # type: ignore import yaml - from os import path - -from urllib.parse import urlparse from tqdm.auto import tqdm # type: ignore -from encodeproject import download as encode_download # type: ignore - - def download_from_yaml(yaml_file: str, output_dir: str, ignore_cache: bool = False) -> None: """Given an download info from an download.yaml file, download all files @@ -52,12 +45,6 @@ def download_from_yaml(yaml_file: str, output_dir: str, logging.info("Using cached version of {}".format(outfile)) continue - p = urlparse(item['url'], 'http') - if p.scheme == 'ftp': - logging.warning( - "Using wget for downloading FTP resource {}".format(item['url'])) - wget.download(url=item['url'], out=outfile) - else: - encode_download(url=item['url'], path=outfile) + wget.download(url=item['url'], out=outfile) return None diff --git a/setup.py b/setup.py index 6b03bd7a..65cfe157 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,6 @@ def find_version(*file_paths): # add package dependencies install_requires=[ 'tqdm', - 'encodeproject', 'tabula-py', 'obonet', 'wget',