diff --git a/src/fmu/sumo/sim2sumo/sim2sumo.py b/src/fmu/sumo/sim2sumo/sim2sumo.py index 8838e7cc..be1e81df 100644 --- a/src/fmu/sumo/sim2sumo/sim2sumo.py +++ b/src/fmu/sumo/sim2sumo/sim2sumo.py @@ -45,7 +45,9 @@ def give_name(datafile_path: str) -> str: str: derived name """ datafile_path_posix = Path(datafile_path) - base_name = datafile_path_posix.name.replace(datafile_path_posix.suffix, "") + base_name = datafile_path_posix.name.replace( + datafile_path_posix.suffix, "" + ) while base_name[-1].isdigit() or base_name.endswith("-"): base_name = base_name[:-1] return base_name @@ -175,7 +177,9 @@ def read_config(config, datafile=None, datatype=None): try: simconfig = config["sim2sumo"] except KeyError: - logger.warning("No specification in config, will use defaults %s", defaults) + logger.warning( + "No specification in config, will use defaults %s", defaults + ) simconfig = defaults if isinstance(simconfig, bool): simconfig = defaults @@ -263,7 +267,14 @@ def export_with_config(config_path, datafile=None, datatype=None): return export_folder, suffixes -def upload(upload_folder, suffixes, env="prod", threads=5, start_del="real"): +def upload( + upload_folder, + suffixes, + env="prod", + threads=5, + start_del="real", + config_path="fmuconfig/output/global_variables.yml", +): """Upload to sumo Args: @@ -288,6 +299,7 @@ def upload(upload_folder, suffixes, env="prod", threads=5, start_del="real"): env, case_meta_path, threads, + config_path, ) logger.debug("Uploaded") except TypeError: @@ -399,8 +411,11 @@ def upload_with_config(config_path, datafile, datatype, env): logger.debug("Executing with:") logger.debug("config: %s: ", config_path) logger.debug("Sumo env: %s: ", env) - upload_folder, suffixes = export_with_config(config_path, datafile, datatype) - upload(upload_folder, suffixes, env) + + upload_folder, suffixes = export_with_config( + config_path, datafile, datatype + ) + upload(upload_folder, suffixes, env, config_path=config_path) def main(): @@ -410,7 +425,9 @@ def main(): try: print(give_help(args.help_on)) except AttributeError: - upload_with_config(args.config_path, args.datafile, args.datatype, args.env) + upload_with_config( + args.config_path, args.datafile, args.datatype, args.env + ) if __name__ == "__main__":