diff --git a/dedal/spack_factory/SpackOperationUseCache.py b/dedal/spack_factory/SpackOperationUseCache.py index 1105a6e43e32f24d056433fdb138a442aabdcb5f..6575ba99a9fc20011031b2109f6b6e87b1232680 100644 --- a/dedal/spack_factory/SpackOperationUseCache.py +++ b/dedal/spack_factory/SpackOperationUseCache.py @@ -26,11 +26,15 @@ class SpackOperationUseCache(SpackOperation): os.environ.get('BUILDCACHE_OCI_PASSWORD'), cache_version=cache_version_build) - def setup_spack_env(self): - """Sets up the Spack environment using cached data. + def setup_spack_env(self) -> None: + """Set up the spack environment for using the cache. - Downloads the build cache, trusts the cached public key (if available), - and adds the build cache as a local mirror. + Downloads the build cache, adds the public key to trusted keys, + and adds the build cache mirror. + + Raises: + ValueError: If there is an issue with the build cache setup. + NoSpackEnvironmentException: If the spack environment is not set up. """ super().setup_spack_env() try: