From 5a15a028f8eb6abc0fc9e2152a9e0160868602a1 Mon Sep 17 00:00:00 2001 From: Justin Reese Date: Mon, 31 Aug 2020 09:22:11 -0700 Subject: [PATCH 1/3] Remove encodeproject dependency --- kg_covid_19/utils/download_utils.py | 8 +------- setup.py | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/kg_covid_19/utils/download_utils.py b/kg_covid_19/utils/download_utils.py index 53e96252..427503ed 100644 --- a/kg_covid_19/utils/download_utils.py +++ b/kg_covid_19/utils/download_utils.py @@ -52,12 +52,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', From 1b55296516fdbe2dc1445ee9e3494ecfa697326a Mon Sep 17 00:00:00 2001 From: Justin Reese Date: Mon, 31 Aug 2020 09:40:56 -0700 Subject: [PATCH 2/3] Remove import --- kg_covid_19/utils/download_utils.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kg_covid_19/utils/download_utils.py b/kg_covid_19/utils/download_utils.py index 427503ed..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 From 36057b4e60f37750fc6660e2e33dfc394b240150 Mon Sep 17 00:00:00 2001 From: Justin Reese Date: Mon, 31 Aug 2020 11:10:04 -0700 Subject: [PATCH 3/3] Change build kg_covid_19 stage to use --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'