From 271b3b6863de59efd4cfc234fcd949a99876db72 Mon Sep 17 00:00:00 2001 From: borisbolliet Date: Wed, 2 Oct 2024 11:32:55 +0100 Subject: [PATCH] update path names --- class-sz/download_emulators.sh | 32 ++++++++++++++++---------------- class-sz/python/classy.pyx | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/class-sz/download_emulators.sh b/class-sz/download_emulators.sh index 87635173..c1032527 100755 --- a/class-sz/download_emulators.sh +++ b/class-sz/download_emulators.sh @@ -19,28 +19,28 @@ touch build/.base # Depth for searching directories DEPTH=3 -# Function to find the cosmopower-organization directory -find_cosmopower_dir() { - find "$1" -maxdepth "$DEPTH" -type d -name "cosmopower-organization" -print -quit +# Function to find the class_sz_data_directory directory +find_class_sz_data_dir() { + find "$1" -maxdepth "$DEPTH" -type d -name "class_sz_data_directory" -print -quit } -COSMOPOWER_DIR=$(find_cosmopower_dir "..") +CLASS_SZ_DATA_DIR=$(find_class_sz_data_dir "..") -if [ -z "$COSMOPOWER_DIR" ]; then - COSMOPOWER_DIR=$(find_cosmopower_dir ".") +if [ -z "$CLASS_SZ_DATA_DIR" ]; then + CLASS_SZ_DATA_DIR=$(find_class_sz_data_dir ".") fi -if [ -n "$COSMOPOWER_DIR" ]; then - echo "Found cosmopower-organization directory at: $(realpath "$COSMOPOWER_DIR")" - PATH_TO_COSMOPOWER_ORGANIZATION=$(realpath "$COSMOPOWER_DIR") +if [ -n "$CLASS_SZ_DATA_DIR" ]; then + echo "Found class_sz_data_directory directory at: $(realpath "$CLASS_SZ_DATA_DIR")" + PATH_TO_CLASS_SZ_DATA=$(realpath "$CLASS_SZ_DATA_DIR") else - echo "--> cosmopower-organization directory not found within $DEPTH levels up or down." + echo "--> class_sz_data_directory directory not found within $DEPTH levels up or down." echo "--> We will install it one level up!" cd .. - mkdir cosmopower-organization - cd cosmopower-organization + mkdir class_sz_data_directory + cd class_sz_data_directory git clone https://github.com/cosmopower-organization/lcdm.git git clone https://github.com/cosmopower-organization/mnu.git git clone https://github.com/cosmopower-organization/mnu-3states.git @@ -48,13 +48,13 @@ else git clone https://github.com/cosmopower-organization/neff.git git clone https://github.com/cosmopower-organization/wcdm.git cd .. - PATH_TO_COSMOPOWER_ORGANIZATION=$(realpath "cosmopower-organization") + PATH_TO_CLASS_SZ_DATA=$(realpath "class_sz_data_directory") fi # Write environment setup to file -echo "export PATH_TO_COSMOPOWER_ORGANIZATION=${PATH_TO_COSMOPOWER_ORGANIZATION}" > "${MDIR}/../set_class_sz_env.sh" -echo "PATH_TO_COSMOPOWER_ORGANIZATION is set to ${PATH_TO_COSMOPOWER_ORGANIZATION}" +echo "export PATH_TO_CLASS_SZ_DATA=${PATH_TO_CLASS_SZ_DATA}" > "${MDIR}/../set_class_sz_env.sh" +echo "PATH_TO_CLASS_SZ_DATA is set to ${PATH_TO_CLASS_SZ_DATA}" # Export the variable -export PATH_TO_COSMOPOWER_ORGANIZATION="${PATH_TO_COSMOPOWER_ORGANIZATION}" +export PATH_TO_CLASS_SZ_DATA="${PATH_TO_CLASS_SZ_DATA}" \ No newline at end of file diff --git a/class-sz/python/classy.pyx b/class-sz/python/classy.pyx index 40ce9709..8a11e4b5 100755 --- a/class-sz/python/classy.pyx +++ b/class-sz/python/classy.pyx @@ -268,7 +268,7 @@ cdef class Class: property PATH_TO_CLASS_SZ_DATA: def __get__(self): - return classy_szfast.path_to_cosmopower_organization + '/class_sz/class-sz/' + return classy_szfast.path_to_class_sz_data + '/class_sz/class-sz/' @@ -358,7 +358,7 @@ cdef class Class: sprintf(self.fc.filename,"%s",dumc) self.ncp = set() if default: self.set_default() - # print('PATH_TO_CLASS_SZ_DATA',classy_szfast.path_to_cosmopower_organization) + def __dealloc__(self): if self.allocated: