generated from ersilia-os/eos-template
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
b150e93
commit 84f3c9f
Showing
4 changed files
with
196 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import csv | ||
|
||
def check_non_null_outcomes_in_output_csv(csv_file_path): | ||
with open(csv_file_path, 'r') as csv_file: | ||
csv_reader = csv.reader(csv_file) | ||
header = next(csv_reader) | ||
row = next(csv_reader) | ||
for val in row[2:]: # Skip the first two columns (Inchikey and input) | ||
if val not in ['', None]: | ||
return False | ||
return True | ||
|
||
if __name__ == '__main__': | ||
# Read file path from command line | ||
import sys | ||
if len(sys.argv) < 2: | ||
print('Usage: python verify_model_output.py <output_csv_file>') | ||
exit(1) | ||
|
||
output_csv_file = sys.argv[1] | ||
|
||
if check_non_null_outcomes_in_output_csv(output_csv_file): | ||
# If there are null outcomes, exit with status code 1 | ||
print('All outcomes are null') | ||
else: | ||
print('Some outcomes are not null') | ||
|
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
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