mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-04 10:47:43 +00:00
81d0ac7185
* update data science docs part1 * update data science docs part2 * update data science docs part3 * update data science docs part4 * update data science docs part5 * format with isort * update data science docs part6 * add check environment scripts * format with isort * format with isort * merge env_check to health_check * format with isort * format with black * optimize code * use boolean cli options * replace fire with typer * replace fire with typer * optimizing parameter and variable naming
22 lines
653 B
Python
22 lines
653 B
Python
from pathlib import Path
|
|
|
|
# Check if our submission file exists
|
|
assert Path("submission.csv").exists(), "Error: submission.csv not found"
|
|
|
|
submission_lines = Path("submission.csv").read_text().splitlines()
|
|
test_lines = Path("submission_test.csv").read_text().splitlines()
|
|
|
|
is_valid = len(submission_lines) == len(test_lines)
|
|
|
|
if is_valid:
|
|
message = "submission.csv and submission_test.csv have the same number of lines."
|
|
else:
|
|
message = (
|
|
f"submission.csv has {len(submission_lines)} lines, while submission_test.csv has {len(test_lines)} lines."
|
|
)
|
|
|
|
print(message)
|
|
|
|
if not is_valid:
|
|
raise AssertionError("Submission is invalid")
|