Skip to content

Commit

Permalink
Fixes #154
Browse files Browse the repository at this point in the history
Fix issue #154 

The error is caused by a change of logic in the json files: this script expects an empty field for `pseudocode score` when there is no pseudocode.
See warnings in error log: https://github.com/GraphicsReplicability/replicability.graphics/runs/898876115?check_suite_focus=true#step:3:761

Fix: Check only the pseudocode state when pseudocode is available.
  • Loading branch information
nmellado authored Jul 23, 2020
1 parent 29d2356 commit d34b876
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions scripts/generatePagesFromConsolidatedJSON.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,13 +1096,14 @@ def write_index_step2(findex, data):
fbrowse.write("<td>"+ hasPseudoCode+"</td>")
#Pseudo score
pscore = variant['If pseudo-code, could the paper be trivially implemented? {0..4}']
if ( pscore != ''):
if (not variant["If code not available, pseudo-code available (boolean)"]):
print( "[WARNING] Inconsistent choice for pseudo-code availability and score [ https://replicability.graphics/papers/" + doiclean+"/index.html "+ variant['DOI'] + "]" )
if( pscore >= 4 ) :
step2dataYear[5] = step2dataYear[5] + 1
else :
step2dataYear[6] = step2dataYear[6] + 1
if hasPseudoCode==True:
if ( pscore != ''):
if( pscore >= 4 ) :
step2dataYear[5] = step2dataYear[5] + 1
else :
step2dataYear[6] = step2dataYear[6] + 1
else:
print( "[WARNING] Inconsistent choice for pseudo-code availability and score [ https://replicability.graphics/papers/" + doiclean+"/index.html "+ variant['DOI'] + "]" )
fbrowse.write("<td>"+str(pscore)+"</td>")
#Doc score
fbrowse.write("<td>"+str(variant['Documentation score {0=NA,1,2,3}'])+"</td>")
Expand Down

0 comments on commit d34b876

Please sign in to comment.