diff --git a/Jenkinsfile b/Jenkinsfile index 56f43b2a..b633042d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -191,7 +191,7 @@ pipeline { // // put $S3PROJECTDIR/$BUILDSTARTDATE/ and $S3PROJECTDIR/current in s3 bucket // - sh '. venv/bin/activate && python3.8 ./go-site/scripts/directory_indexer.py -v --inject ./go-site/scripts/directory-index-template.html --directory $S3PROJECTDIR --prefix https://kg-hub.berkeleybop.io/$S3PROJECTDIR/ -x -u' + sh '. venv/bin/activate && python3.8 multi_indexer -v --directory $S3PROJECTDIR --prefix https://kg-hub.berkeleybop.io/$S3PROJECTDIR/ -x -u' // for existing builds on s3, we just made an index.html that will clobber the existing (correct) s3 index.html // here we download the existing index.html and clobber the local one instead sh ". venv/bin/activate && for dir in `s3cmd ls s3://kg-hub-public-data/kg-covid-19/ | grep '\\/\$' | awk '{print \$NF}' | grep -w -v -E 'raw|current' | xargs -n1 basename`; do s3cmd get --force --continue s3://kg-hub-public-data/kg-covid-19/\$dir/index.html $S3PROJECTDIR/\$dir/ || true; done" @@ -200,7 +200,7 @@ pipeline { // Build the top level index.html // "External" packages required to run these scripts. - sh '. venv/bin/activate && python3.8 ./go-site/scripts/bucket-indexer.py --credentials $AWS_JSON --bucket kg-hub-public-data --inject ./go-site/scripts/directory-index-template.html --prefix https://kg-hub.berkeleybop.io/ > top-level-index.html' + sh '. venv/bin/activate && python3.8 multi_indexer --bucket kg-hub-public-data --prefix https://kg-hub.berkeleybop.io/ > top-level-index.html' sh '. venv/bin/activate && s3cmd -c $S3CMD_CFG put --acl-public --mime-type=text/html --cf-invalidate top-level-index.html s3://kg-hub-public-data/index.html' // Invalidate the CDN now that the new files are up. diff --git a/kg_covid_19/download.py b/kg_covid_19/download.py index 6a0170c2..7fb10ab9 100644 --- a/kg_covid_19/download.py +++ b/kg_covid_19/download.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- -from .utils import download_from_yaml +from kghub_downloader.download_utils import download_from_yaml # type: ignore def download(yaml_file: str, output_dir: str, ignore_cache: bool = False) -> None: diff --git a/setup.py b/setup.py index 835413ae..caef7b7e 100644 --- a/setup.py +++ b/setup.py @@ -77,10 +77,12 @@ def find_version(*file_paths): 'pyyaml', 'bmt', 'ensmallen_graph==0.4.3', - 'elasticsearch', + 'elasticsearch==7.17.1', 'sphinx', 'sphinx_rtd_theme', 'recommonmark', + 'kghub-downloader', + 'multi-indexer' ], extras_require=extras, )