diff --git a/setup.cfg b/setup.cfg index 0c228f022..6f1d7669f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 6.24.0 +current_version = 6.24.1 commit = True tag = True diff --git a/setup.py b/setup.py index 2a99df9b8..5b59b2aa0 100644 --- a/setup.py +++ b/setup.py @@ -103,6 +103,6 @@ test_suite="tests", tests_require=test_requirements, url="https://github.com/esm-tools/esm_tools", - version="6.24.0", + version="6.24.1", zip_safe=False, ) diff --git a/src/esm_archiving/__init__.py b/src/esm_archiving/__init__.py index 6293bd272..fa3ef7dc3 100644 --- a/src/esm_archiving/__init__.py +++ b/src/esm_archiving/__init__.py @@ -4,7 +4,7 @@ __author__ = """Paul Gierz""" __email__ = "pgierz@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .esm_archiving import (archive_mistral, check_tar_lists, delete_original_data, determine_datestamp_location, diff --git a/src/esm_calendar/__init__.py b/src/esm_calendar/__init__.py index 94c67905b..6550c088e 100644 --- a/src/esm_calendar/__init__.py +++ b/src/esm_calendar/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .esm_calendar import * diff --git a/src/esm_cleanup/__init__.py b/src/esm_cleanup/__init__.py index 533aead28..572aa2b0f 100644 --- a/src/esm_cleanup/__init__.py +++ b/src/esm_cleanup/__init__.py @@ -2,4 +2,4 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" diff --git a/src/esm_database/__init__.py b/src/esm_database/__init__.py index 2616c6107..30820bd57 100644 --- a/src/esm_database/__init__.py +++ b/src/esm_database/__init__.py @@ -2,4 +2,4 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" diff --git a/src/esm_environment/__init__.py b/src/esm_environment/__init__.py index 992494754..9e35d93d4 100644 --- a/src/esm_environment/__init__.py +++ b/src/esm_environment/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .esm_environment import * diff --git a/src/esm_master/__init__.py b/src/esm_master/__init__.py index 53450f87c..12f89bf9d 100644 --- a/src/esm_master/__init__.py +++ b/src/esm_master/__init__.py @@ -2,7 +2,7 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from . import database diff --git a/src/esm_motd/__init__.py b/src/esm_motd/__init__.py index ccef34bbe..4861e6d18 100644 --- a/src/esm_motd/__init__.py +++ b/src/esm_motd/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .esm_motd import * diff --git a/src/esm_parser/__init__.py b/src/esm_parser/__init__.py index 60013b452..8ffab88b2 100644 --- a/src/esm_parser/__init__.py +++ b/src/esm_parser/__init__.py @@ -2,7 +2,7 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .esm_parser import * diff --git a/src/esm_parser/esm_parser.py b/src/esm_parser/esm_parser.py index a06bfe090..956a2b4da 100644 --- a/src/esm_parser/esm_parser.py +++ b/src/esm_parser/esm_parser.py @@ -262,11 +262,23 @@ def initialize_from_yaml(filepath): ) return user_config +def check_for_empty_components_in_user_config(user_config): + for model in list(user_config): + if user_config[model] is None or user_config[model] == "" or not user_config[model]: + user_note( + f"Warning: YAML syntax", + f"The component ``{model}`` in your configuration " + f"file ``{user_config['general']['runscript_abspath']}`` is empty. " + "No further variables are set for this component in your runscript." + ) + del user_config[model] + return user_config def complete_config(user_config): if not "general" in user_config: user_config["general"] = {} user_config["general"]["additional_files"] = [] + user_config = check_for_empty_components_in_user_config(user_config) while True: for model in list(user_config): diff --git a/src/esm_parser/yaml_to_dict.py b/src/esm_parser/yaml_to_dict.py index 56faede97..36af45bc2 100644 --- a/src/esm_parser/yaml_to_dict.py +++ b/src/esm_parser/yaml_to_dict.py @@ -199,8 +199,6 @@ def yaml_file_to_dict(filepath): yaml_load["computer"]["runtime_environment_changes"][ "add_export_vars" ] = add_export_vars - # Check for empty components/models - # check_for_empty_components(yaml_load, filepath + extension) return yaml_load except IOError as error: logger.debug( diff --git a/src/esm_plugin_manager/__init__.py b/src/esm_plugin_manager/__init__.py index 516986fc0..7dbbfe74d 100644 --- a/src/esm_plugin_manager/__init__.py +++ b/src/esm_plugin_manager/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi, Paul Gierz, Sebastian Wahl""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .esm_plugin_manager import * diff --git a/src/esm_profile/__init__.py b/src/esm_profile/__init__.py index 2c119694c..f3491fccf 100644 --- a/src/esm_profile/__init__.py +++ b/src/esm_profile/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .esm_profile import * diff --git a/src/esm_runscripts/__init__.py b/src/esm_runscripts/__init__.py index b397b75f3..38d255d79 100644 --- a/src/esm_runscripts/__init__.py +++ b/src/esm_runscripts/__init__.py @@ -2,7 +2,7 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .batch_system import * from .chunky_parts import * diff --git a/src/esm_runscripts/config_initialization.py b/src/esm_runscripts/config_initialization.py index b038e7da8..d037fbd1f 100644 --- a/src/esm_runscripts/config_initialization.py +++ b/src/esm_runscripts/config_initialization.py @@ -96,7 +96,10 @@ def get_user_config_from_command_line(command_line_config): except SystemExit as sysexit: sys.exit(sysexit) except: - raise("An error occurred reading the config file from the command line") + esm_parser.user_error( + "Syntax error", + f"An error occurred while reading the config file " + f"``{command_line_config['runscript_abspath']}`` from the command line.") # NOTE(PG): I really really don't like this. But I also don't want to # re-introduce black/white lists diff --git a/src/esm_tests/__init__.py b/src/esm_tests/__init__.py index ecfa9142b..0795045a9 100644 --- a/src/esm_tests/__init__.py +++ b/src/esm_tests/__init__.py @@ -2,7 +2,7 @@ __author__ = """Miguel Andres-Martinez""" __email__ = "miguel.andres-martinez@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .initialization import * from .read_shipped_data import * diff --git a/src/esm_tools/__init__.py b/src/esm_tools/__init__.py index dc8a9ce7f..74db7da65 100644 --- a/src/esm_tools/__init__.py +++ b/src/esm_tools/__init__.py @@ -23,7 +23,7 @@ __author__ = """Dirk Barbi, Paul Gierz""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" import functools import inspect diff --git a/src/esm_utilities/__init__.py b/src/esm_utilities/__init__.py index a9bff467a..123eb3580 100644 --- a/src/esm_utilities/__init__.py +++ b/src/esm_utilities/__init__.py @@ -2,6 +2,6 @@ __author__ = """Paul Gierz""" __email__ = "pgierz@awi.de" -__version__ = "6.24.0" +__version__ = "6.24.1" from .utils import *