-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
31 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ curl | |
libxml2 | ||
tzdata | ||
wget | ||
zip | ||
zip | ||
parallel | ||
libgl1-mesa-glx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
"sklearn", | ||
"tensorflow", | ||
"torch", | ||
"cv2", | ||
] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
import os | ||
|
||
from pathlib import Path | ||
|
||
import pytest | ||
import pandas as pd | ||
from numpy.testing import assert_array_equal | ||
from pandas._testing import assert_index_equal | ||
|
||
SUBMISSION_PATH = Path("/code_execution/workdir/submission.csv") | ||
CHECK_SUBMISSION = os.environ.get("CHECK_SUBMISSION", "false") == "true" | ||
SUBMISSION_PATH = Path("/code_execution/submission/submission.csv") | ||
SUBMISSION_FORMAT_PATH = Path("/code_execution/data/submission_format.csv") | ||
|
||
|
||
@pytest.mark.skipif(not CHECK_SUBMISSION, reason="Not checking submission yet") | ||
def test_submission_exists(): | ||
assert SUBMISSION_PATH.exists() | ||
assert SUBMISSION_PATH.exists(), f"Expected submission at {SUBMISSION_PATH}" | ||
|
||
|
||
def test_submission_matches_submission_format(): | ||
assert SUBMISSION_FORMAT_PATH.exists(), "Submission format not found" | ||
|
||
submission = pd.read_csv(SUBMISSION_PATH) | ||
fmt = pd.read_csv(SUBMISSION_FORMAT_PATH) | ||
|
||
assert_array_equal(submission.columns, fmt.columns, err_msg="Columns not identical") | ||
assert_index_equal(submission.index, fmt.index), "Index not identical" | ||
|
||
for col in submission.columns: | ||
assert submission[col].dtype == fmt[col].dtype, f"dtype for columns not equal" |