File tree Expand file tree Collapse file tree 4 files changed +19
-7
lines changed
Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 22
33__author__ = """Dirk Barbi"""
44__email__ = 'dirk.barbi@awi.de'
5- __version__ = "5.1.7 "
5+ __version__ = "5.1.8 "
66
77
88from .yaml_to_dict import yaml_file_to_dict
Original file line number Diff line number Diff line change @@ -2643,18 +2643,30 @@ def _config_init(self, user_config):
26432643 user_config ["defaults" ] = {}
26442644
26452645 default_infos = {}
2646- for i in os .listdir (DEFAULTS_DIR ):
2647- file_contents = yaml_file_to_dict (DEFAULTS_DIR + "/" + i )
2648- default_infos .update (file_contents )
26492646
2647+ # get the files in the defaults directory and exclude general.yaml
2648+ yaml_files = os .listdir (DEFAULTS_DIR )
2649+ if 'general.yaml' in yaml_files :
2650+ yaml_files .remove ('general.yaml' )
2651+
2652+ for yaml_file in yaml_files :
2653+ file_contents = yaml_file_to_dict (DEFAULTS_DIR + "/" + yaml_file )
2654+ default_infos .update (file_contents )
26502655
2656+ # construct the `defaults` section of the configuration
26512657 user_config ["defaults" ].update (default_infos )
26522658
26532659 computer_file = determine_computer_from_hostname ()
26542660 computer_config = yaml_file_to_dict (computer_file )
2661+
2662+ if 'general.yaml' in os .listdir (DEFAULTS_DIR ):
2663+ general_config = yaml_file_to_dict (f"{ DEFAULTS_DIR } /general.yaml" )
2664+ else :
2665+ general_config = {}
2666+
26552667 setup_config = {
26562668 "computer" : computer_config ,
2657- "general" : {} ,
2669+ "general" : general_config ,
26582670 }
26592671 for attachment in CONFIGS_TO_ALWAYS_ATTACH_AND_REMOVE :
26602672 attach_to_config_and_remove (setup_config ["computer" ], attachment ,
Original file line number Diff line number Diff line change 11[bumpversion]
2- current_version = 5.1.7
2+ current_version = 5.1.8
33commit = True
44tag = True
55
Original file line number Diff line number Diff line change 5454 test_suite = 'tests' ,
5555 tests_require = test_requirements ,
5656 url = 'https://gitlab.awi.de/esm_tools/esm_parser' ,
57- version = "5.1.7 " ,
57+ version = "5.1.8 " ,
5858 zip_safe = False ,
5959)
You can’t perform that action at this time.
0 commit comments