Skip to content

Commit 30e371a

Browse files
authored
do not download and build twice on RTD or GHA (#309)
1 parent e93bcd7 commit 30e371a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/conf.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,17 @@
138138

139139
# On Read the Docs and CI, download the database and build a minimal HDF5 version
140140
if (ON_RTD or ON_GHA):
141-
from fiasco.util import build_hdf5_dbase, download_dbase, get_test_file_list
141+
from fiasco.util import check_database, get_test_file_list
142142
from fiasco.util.setup_db import CHIANTI_URL, LATEST_VERSION
143143
from fiasco.util.util import FIASCO_HOME, FIASCO_RC
144144
FIASCO_HOME.mkdir(exist_ok=True, parents=True)
145145
ascii_dbase_root = FIASCO_HOME / 'chianti_dbase'
146146
hdf5_dbase_root = FIASCO_HOME / 'chianti_dbase.h5'
147-
download_dbase(CHIANTI_URL.format(version=LATEST_VERSION), ascii_dbase_root)
148-
build_hdf5_dbase(
149-
ascii_dbase_root,
150-
hdf5_dbase_root,
147+
check_database(
148+
hdf5_dbase_root=hdf5_dbase_root,
149+
ascii_dbase_root=ascii_dbase_root,
150+
ascii_dbase_url = CHIANTI_URL.format(version=LATEST_VERSION),
151+
ask_before=False,
151152
files=get_test_file_list(),
152153
)
153154
with FIASCO_RC.open(mode='w') as f:

0 commit comments

Comments
 (0)