Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions relecov_tools/assets/schema_utils/custom_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def validate_with_exceptions(schema, data, errors):
if (
error.validator == "type"
and error.instance
== relecov_tools.config_json.ConfigJson().get_topic_data(
== relecov_tools.config_json.ConfigJson(extra_config=True).get_topic_data(
"generic", "not_provided_field"
)
and prop_schema.get("type") in ["integer", "number"]
Expand All @@ -43,7 +43,7 @@ def validate_with_exceptions(schema, data, errors):
if (
error.validator == "format"
and error.instance
== relecov_tools.config_json.ConfigJson().get_topic_data(
== relecov_tools.config_json.ConfigJson(extra_config=True).get_topic_data(
"generic", "not_provided_field"
)
and prop_schema.get("type") == "string"
Expand Down
2 changes: 1 addition & 1 deletion relecov_tools/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
"""Initializes the sftp object"""
super().__init__(output_dir=output_dir, called_module="download")
self.log.info("Initiating download process")
config_json = ConfigJson()
config_json = ConfigJson(extra_config=True)
self.allowed_file_ext = config_json.get_topic_data(
"sftp_handle", "allowed_file_extensions"
)
Expand Down
2 changes: 1 addition & 1 deletion relecov_tools/sftp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SftpClient:

def __init__(self, conf_file=None, username=None, password=None):
if not conf_file:
config_json = ConfigJson()
config_json = ConfigJson(extra_config=True)
self.sftp_server = config_json.get_topic_data("sftp_handle", "sftp_server")
self.sftp_port = config_json.get_topic_data("sftp_handle", "sftp_port")
else:
Expand Down
2 changes: 1 addition & 1 deletion relecov_tools/upload_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
self.logsum = self.parent_log_summary()

# Load configuration early to access update_db settings
self.config_json = ConfigJson()
self.config_json = ConfigJson(extra_config=True)
self.data_upload_types = self._load_data_upload_types()
self.full_update_steps = self._load_full_update_steps()

Expand Down
12 changes: 6 additions & 6 deletions relecov_tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ def read_excel_file(f_name, sheet_name, header_flag, leave_empty=True):
data_row[heading[idx]] = (
None
if leave_empty
else relecov_tools.config_json.ConfigJson().get_topic_data(
"generic", "not_provided_field"
)
else relecov_tools.config_json.ConfigJson(
extra_config=True
).get_topic_data("generic", "not_provided_field")
)
else:
data_row[heading[idx]] = l_row[idx]
Expand Down Expand Up @@ -133,9 +133,9 @@ def read_excel_file(f_name, sheet_name, header_flag, leave_empty=True):
data_row[heading[idx]] = (
None
if leave_empty
else relecov_tools.config_json.ConfigJson().get_topic_data(
"generic", "not_provided_field"
)
else relecov_tools.config_json.ConfigJson(
extra_config=True
).get_topic_data("generic", "not_provided_field")
)
else:
data_row[heading[idx]] = val
Expand Down
Loading