Skip to content

Commit

Permalink
Merge 36057b4 into 5e3b274
Browse files Browse the repository at this point in the history
  • Loading branch information
justaddcoffee committed Aug 31, 2020
2 parents 5e3b274 + 36057b4 commit aefe2df
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
15 changes: 1 addition & 14 deletions kg_covid_19/utils/download_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def find_version(*file_paths):
# add package dependencies
install_requires=[
'tqdm',
'encodeproject',
'tabula-py',
'obonet',
'wget',
Expand Down

0 comments on commit aefe2df

Please sign in to comment.