Skip to content

Commit 27e2bd4

Browse files
[Refactor:Plagiarism] Change format of regex field (#61)
* Switch regex to use an array of selectors instead of a comma-separated string * Update tests
1 parent 08ca336 commit 27e2bd4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bin/concatenate_all.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def parse_args():
7373

7474
def validate(config, args):
7575
# load parameters from the config to be checked
76-
regex_patterns = config["regex"].split(',')
76+
regex_patterns = config["regex"]
7777
regex_dirs = config["regex_dirs"]
7878
language = config["language"]
7979
threshold = int(config["threshold"])
@@ -139,7 +139,7 @@ def main():
139139
course = config["course"]
140140
gradeable = config["gradeable"]
141141
version_mode = config["version"]
142-
regex_patterns = config["regex"].split(',')
142+
regex_patterns = config["regex"]
143143
regex_dirs = config["regex_dirs"]
144144
prior_term_gradeables = config["prior_term_gradeables"]
145145
users_to_ignore = config["ignore_submissions"]

tests/data/test_lichen/repeated_sequences/expected_output/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"gradeable": "repeated_sequences",
55
"config_id": "1",
66
"version": "all_versions",
7-
"regex": "",
7+
"regex": [""],
88
"regex_dirs": [
99
"submissions"
1010
],
@@ -13,4 +13,4 @@
1313
"sequence_length": 4,
1414
"prior_term_gradeables": [],
1515
"ignore_submissions": []
16-
}
16+
}

tests/data/test_lichen/repeated_sequences/input/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"gradeable": "repeated_sequences",
55
"config_id": "1",
66
"version": "all_versions",
7-
"regex": "",
7+
"regex": [""],
88
"regex_dirs": [
99
"submissions"
1010
],

0 commit comments

Comments
 (0)