Skip to content

Commit

Permalink
Move values to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
d-shree committed Dec 27, 2023
1 parent a0f1566 commit 29efa8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion skit_labels/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,6 @@

EXPECTED_COLUMNS_MAPPING = {
"conversation_tagging": ['scenario', 'scenario_category', 'situation_str', 'call']
}
}

CONVERSATION_TAGGING = 'conversation_tagging'
2 changes: 1 addition & 1 deletion skit_labels/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def validate_headers(input_file, tagging_type):
def validate_input_data(tagging_type, input_file):
is_valid = True
error = ''
if tagging_type == 'conversation_tagging':
if tagging_type == const.CONVERSATION_TAGGING:
is_match, mismatch_headers = validate_headers(input_file, tagging_type)
if not is_match:
error = f'Headers in the input file does not match the expected fields. Mismatched fields = {mismatch_headers}'
Expand Down

0 comments on commit 29efa8b

Please sign in to comment.