Skip to content

Commit 1fdd10d

Browse files
committed
Fix info files and sanity checks
1 parent 18d4b75 commit 1fdd10d

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

datasets/00074 - votepluriel/info.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Description: <p>This dataset contains data from the online experiment "Vote Plur
1212

1313
Required Citations: Karine Van der Straeten, Jean-François Laslier and André Blais; <em>Vote au pluriel: How people vote when offered to vote under different rules.</em>. Political Science and Politics, 2013.
1414

15+
Selected Studies:
16+
1517
file_name, modification_type, relates_to, title, description, publication_date
1618
00074-00000001.cat,original,,VotePluriel-approval,,2025-10-14
1719
00074-00000001.toc,induced,00074-00000001.cat,VotePluriel-approval,,2025-10-14

scripts/sanitychecks.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ def check_info_file(info_file_path, ds_dir, dataset_files, escalate_warnings):
4545
if set(infos["files"]) != set(actual_files):
4646
info_error_list.append("Mismatch between files listed in info and files in directory")
4747

48+
tag_mapping = {
49+
"Name:": "name",
50+
"Abbreviation:": "abb",
51+
"Tags:": "tags",
52+
"Series Number:": "series",
53+
"Publication Date:": "publication_date",
54+
"Description:": "description",
55+
"Required Citations:": "citations",
56+
"Selected Studies:": "studies",
57+
}
58+
for tag, short_tag in tag_mapping.items():
59+
if short_tag not in infos:
60+
info_error_list.append(f"The infor file does not seem to provide a value for the tag '{tag}'. Please add the tag even if the value is empty.")
61+
4862
# Report or escalate any errors found
4963
handle_errors(info_error_list, ds_dir, escalate_warnings)
5064

0 commit comments

Comments
 (0)