Skip to content

Commit

Permalink
Databases init more transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
kbessonov1984 committed Sep 4, 2024
1 parent 0f84165 commit 635f1d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/github-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
python3 -m pip install --upgrade pip setuptools
pip3 install pytest fastcluster openpyxl pycurl pandas scipy "numpy<2"
python setup.py install
sistr_init
- name: Test with pytest
run: |
pytest -o log_cli=true --basetemp=tmp-pytest
3 changes: 2 additions & 1 deletion sistr/sistr_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def download_to_file(url,file):
c.setopt(pycurl.SSL_VERIFYHOST, 0)
c.perform()
c.close()


def extract(fname,outdir):
if (fname.endswith("tar.gz")):
Expand Down Expand Up @@ -241,7 +242,7 @@ def setup_sistr_dbs():
logging.error('Downloading databases failed, please check your internet connection and retry')
sys.exit(-1)
else:
logging.info('Downloading databases successful')
logging.info(f'Downloading databases successful installed at {os.path.abspath(resource_filename('sistr', 'data/'))}')
f = open(resource_filename('sistr', 'dbstatus.txt'),'w')
f.write("DB downloaded on : {} from {}".format(datetime.today().strftime('%Y-%m-%d'),SISTR_DB_URL))
f.close()
Expand Down

0 comments on commit 635f1d0

Please sign in to comment.