Commit 93150026 authored by Robin's avatar Robin

wip: resource loading

parent b6d3857b
......@@ -52,10 +52,11 @@ RESOURCE_CONFIG = {
# example: modelname = FlowerBed
# example: modeltype = LD / V2
"NAME_CONVENTIONS": {
# Case sensitive
# modelname Case sensitive e.g. FlowerBed, modeltype Uppercase e.g. LD or V2
"FILE_NAME_CONVENTIONS": {
"SPECS": 'Specs_{modelname}.json',
"BLUEPRINTS": "{modeltype}_Blueprint_{modelname}.json",
# ""
},
# Upper Case
"URL_CONFIGNAME_CONVENTIONS": {
......
This diff is collapsed.
......@@ -112,6 +112,9 @@ class Connector(object):
# target_dir = Connector.add_backslashes_unix_(target_dir)
target_file = f'{model_version.upper()}_Blueprint_{model_type}.json'
target_path = f'{target_dir}{target_file}'
current_app.logger.info(f'<<{__name__}.Connector.load_blueprint_from_disk>> load from disk. Target: {target_path}')
try:
return self.load_json_from_disk(abs_path=target_path)
except OSError:
......@@ -137,7 +140,7 @@ class Connector(object):
target_file = f'Specs_{model_type}.json'
target_path = f'{target_dir}{target_file}'
current_app.logger.debug(f'<<{__name__}.Connector.load_specs_from_disk>> load from disk. Target: {target_path}')
current_app.logger.info(f'<<{__name__}.Connector.load_specs_from_disk>> load from disk. Target: {target_path}')
try:
return self.load_json_from_disk(abs_path=target_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment