diff --git a/asv.conf.json b/asv.conf.json index 235171c5480..6833cfb0682 100644 --- a/asv.conf.json +++ b/asv.conf.json @@ -3,18 +3,30 @@ "project": "tardis", "project_url": "https://tardis-sn.github.io/tardis", "repo": ".", - "install_command": ["in-dir={env_dir} python -mpip install {wheel_file}"], - "uninstall_command": ["return-code=any python -mpip uninstall -y {project}"], + "install_command": [ + "in-dir={env_dir} python -mpip install {wheel_file}" + ], + "uninstall_command": [ + "return-code=any python -mpip uninstall -y {project}" + ], "build_command": [ "python setup.py build", "PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}" ], - "branches": ["origin/master", "HEAD"], + "branches": [ + "origin/master", + "HEAD" + ], "environment_type": "mamba", "show_commit_url": "https://github.com/tardis-sn/tardis/commit/", "conda_environment_file": "tardis_env3.yml", "benchmark_dir": "benchmarks", "env_dir": ".asv/env", "results_dir": ".asv/results", - "html_dir": ".asv/html" -} + "html_dir": ".asv/html", + "matrix": { + "env": { + "TARDIS_REF_PATH": "tardis-refdata/atom_data" + } + } +} \ No newline at end of file diff --git a/benchmarks/benchmark_base.py b/benchmarks/benchmark_base.py index cc4c19a349e..6cff7575694 100644 --- a/benchmarks/benchmark_base.py +++ b/benchmarks/benchmark_base.py @@ -1,4 +1,5 @@ import functools +import os from copy import deepcopy from pathlib import Path @@ -61,7 +62,7 @@ def config_rpacket_tracking(self): def tardis_ref_path(self): ref_data_path = Path( Path(__file__).parent.parent, - "tardis-refdata" + os.environ.get("TARDIS_REF_PATH") ).resolve() return ref_data_path @@ -78,7 +79,7 @@ def atomic_dataset(self) -> AtomData: @functools.cached_property def atomic_data_fname(self): atomic_data_fname = ( - f"{self.tardis_ref_path}/atom_data/kurucz_cd23_chianti_H_He.h5" + f"{self.tardis_ref_path}/kurucz_cd23_chianti_H_He.h5" ) if not Path(atomic_data_fname).exists():