Skip to content

Commit

Permalink
changing so that all invalid infores ids are output in the logs, not …
Browse files Browse the repository at this point in the history
…just the first one encountered
  • Loading branch information
EvanDietzMorris committed Dec 11, 2023
1 parent bb1468c commit 40e71e6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Common/kgx_file_normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,12 @@ def normalize_edge_file(self):
self.logger.warning(f'Normalization found a deprecated infores identifier: {knowledge_source}')
elif infores_status == INFORES_STATUS_INVALID:
invalid_infores_ids.append(knowledge_source)
warning_message = f'Normalization found an invalid infores identifier: {knowledge_source}'
self.logger.warning(warning_message)
if self.normalization_scheme.strict:
raise NormalizationFailedError(warning_message)

if invalid_infores_ids:
warning_message = f'Normalization found invalid infores identifiers: {invalid_infores_ids}'
self.logger.warning(warning_message)
if self.normalization_scheme.strict:
raise NormalizationFailedError(warning_message)

try:
self.logger.debug(f'Writing normalized edges to file...')
Expand Down

0 comments on commit 40e71e6

Please sign in to comment.