File tree 2 files changed +20
-1
lines changed
2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 3
3
from os import environ
4
4
import tests .cobra
5
5
import tests .yaml
6
+ import tests .memote
6
7
7
8
API_ENDPOINT = 'https://api.github.com/graphql'
8
9
API_TOKEN = environ ['GH_TOKEN' ]
@@ -89,9 +90,10 @@ def validate(nameWithOwner):
89
90
file .write (response .text )
90
91
test_results .update (tests .yaml .validate (model ))
91
92
test_results .update (tests .cobra .validate (model ))
93
+ test_results .update (tests .memote .get_consistency (model ))
92
94
else :
93
95
print ('is not following standard' )
94
96
release_data = { 'standard-GEM' : [ { standard_version : gem_is_standard }, { 'test_results' : test_results } ] }
95
97
data [nameWithOwner ].append ({ model_release : release_data })
96
98
with open ('results/{}_{}.json' .format (owner , model ), 'w' ) as output :
97
- output .write (json .dumps (data , indent = 2 , sort_keys = True ))
99
+ output .write (json .dumps (data , indent = 2 , sort_keys = True ))
Original file line number Diff line number Diff line change
1
+ import memote
2
+ import cobra
3
+ import json
4
+ from memote .support import consistency
5
+ # needed by memote.support.consitency
6
+ from memote .support import consistency_helpers as con_helpers
7
+
8
+ def get_consistency (model_filename ):
9
+ try :
10
+ model = cobra .io .read_sbml_model (model_filename + '.xml' )
11
+ except Exception as e :
12
+ errors = json .dumps (str (e ))
13
+ print (e )
14
+
15
+ is_consistent = consistency .check_stoichiometric_consistency (model )
16
+
17
+ return {'memote-tests' : { memote .__version__ : is_consistent , 'errors' : errors } }
You can’t perform that action at this time.
0 commit comments