79
79
import re
80
80
import uuid
81
81
82
- # MACRO for printing the 'print' statement values.
83
- # 0 prints nothing in the console.
84
- # 1 prints all print statements in the console.
85
- DEBUG = 0
86
-
87
82
def _create_ayjid (aulast = None , auinit = None , date = None , jtitle = None , ** kwargs ):
88
83
"""
89
84
Convert aulast, auinit, and jtitle into the fuzzy identifier ayjid
@@ -380,8 +375,6 @@ def _parse_cr(ref):
380
375
if match :
381
376
# remove the [] and make it a proper one.
382
377
name = name [match .start ()+ 1 :match .end ()- 1 ]
383
- if DEBUG :
384
- print 'stripped name: ' , name
385
378
386
379
name_tokens = name .split (' ' )
387
380
if len (name_tokens ) < 2 :
@@ -391,9 +384,6 @@ def _parse_cr(ref):
391
384
paper ['aulast' ] = [name_tokens [0 ]]
392
385
paper ['auinit' ] = ['' .join (name_tokens [1 :]).replace ('.' ,'' )]
393
386
394
- if DEBUG :
395
- print "Final Meta Dicts" , paper ['aulast' ], paper ['auinit' ]
396
-
397
387
# Temp Solution for #62809724
398
388
if paper ['auinit' ] == 'None' or paper ['aulast' ] == 'None' :
399
389
raise ("The Cited References field is not in the expeceted format" )
@@ -729,9 +719,6 @@ def _validate(wos_data):
729
719
ValueError - according to the severity of the issue,
730
720
whether the wrong format will affect the further processing.
731
721
"""
732
- if DEBUG :
733
- print wos_data
734
-
735
722
736
723
# Create a translator dict whose keys are the fields which needs to be
737
724
# validated from the input.
@@ -743,8 +730,6 @@ def _validate(wos_data):
743
730
for wos_dict in wos_data :
744
731
#direct translations
745
732
for key in translator .iterkeys ():
746
- if DEBUG :
747
- print wos_dict [key ]
748
733
# Validate for 'CR' field
749
734
if wos_dict ['CR' ] is not None :
750
735
for cr in wos_dict ['CR' ]:
0 commit comments