Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not download and build database twice on RTD or GHA #309

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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