Skip to content

Commit

Permalink
Backport PR #309: Do not download and build database twice on RTD or …
Browse files Browse the repository at this point in the history
…GHA (#310)

Co-authored-by: Will Barnes <will.t.barnes@gmail.com>
  • Loading branch information
meeseeksmachine and wtbarnes authored Sep 12, 2024
1 parent b879fe1 commit ceb6fd1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,17 @@

# On Read the Docs and CI, download the database and build a minimal HDF5 version
if (ON_RTD or ON_GHA):
from fiasco.util import build_hdf5_dbase, download_dbase, get_test_file_list
from fiasco.util import check_database, get_test_file_list
from fiasco.util.setup_db import CHIANTI_URL, LATEST_VERSION
from fiasco.util.util import FIASCO_HOME, FIASCO_RC
FIASCO_HOME.mkdir(exist_ok=True, parents=True)
ascii_dbase_root = FIASCO_HOME / 'chianti_dbase'
hdf5_dbase_root = FIASCO_HOME / 'chianti_dbase.h5'
download_dbase(CHIANTI_URL.format(version=LATEST_VERSION), ascii_dbase_root)
build_hdf5_dbase(
ascii_dbase_root,
hdf5_dbase_root,
check_database(
hdf5_dbase_root=hdf5_dbase_root,
ascii_dbase_root=ascii_dbase_root,
ascii_dbase_url = CHIANTI_URL.format(version=LATEST_VERSION),
ask_before=False,
files=get_test_file_list(),
)
with FIASCO_RC.open(mode='w') as f:
Expand Down

0 comments on commit ceb6fd1

Please sign in to comment.