mirror of
https://gitea.psi.ch/APOG/acsm-fairifier.git
synced 2025-07-08 17:08:03 +02:00
Update generate_flags.py to skip checking for cpc flags when not available
This commit is contained in:
@ -191,7 +191,7 @@ def generate_species_flags(data_table : pd.DataFrame, calib_param_dict : dict, f
|
|||||||
|
|
||||||
manual_json_flags, csv_flags = get_flags_from_folder(flagsFolderPath)
|
manual_json_flags, csv_flags = get_flags_from_folder(flagsFolderPath)
|
||||||
#print(manual_json_flags,csv_flags)
|
#print(manual_json_flags,csv_flags)
|
||||||
|
interpolated_cpc_flags = []
|
||||||
if csv_flags:
|
if csv_flags:
|
||||||
|
|
||||||
# Loop over CSV files in the flags folder
|
# Loop over CSV files in the flags folder
|
||||||
@ -264,6 +264,8 @@ def generate_species_flags(data_table : pd.DataFrame, calib_param_dict : dict, f
|
|||||||
|
|
||||||
numflag_columns = [col for col in data_table.columns if 'numflag_' in col]
|
numflag_columns = [col for col in data_table.columns if 'numflag_' in col]
|
||||||
|
|
||||||
|
if interpolated_cpc_flags:
|
||||||
|
|
||||||
data_table = reconcile_flags(data_table, interpolated_cpc_flags, 0, interpolated_cpc_flags.size, numflag_columns)
|
data_table = reconcile_flags(data_table, interpolated_cpc_flags, 0, interpolated_cpc_flags.size, numflag_columns)
|
||||||
|
|
||||||
#print(numflag_columns)
|
#print(numflag_columns)
|
||||||
|
@ -67,6 +67,8 @@ def sync_yaml_files(src_filepath, dest_filepath):
|
|||||||
src_yaml = load_yaml(src_filepath)
|
src_yaml = load_yaml(src_filepath)
|
||||||
dest_yaml = load_yaml(dest_filepath)
|
dest_yaml = load_yaml(dest_filepath)
|
||||||
|
|
||||||
|
# TODO validate yaml files first before attempting syncronization
|
||||||
|
|
||||||
if src_yaml is None or dest_yaml is None:
|
if src_yaml is None or dest_yaml is None:
|
||||||
print(f"Skipping synchronization for {os.path.basename(src_filepath)} due to YAML loading errors.")
|
print(f"Skipping synchronization for {os.path.basename(src_filepath)} due to YAML loading errors.")
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user