Skip to content

Commit f65b66a

Browse files
committed
fix new line character
1 parent c4556b1 commit f65b66a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/src/preProcessNotebooks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ def modify_notebook(file_name, project_id, query1, query2):
1010
for cell in nb.cells:
1111
if cell.cell_type == "code":
1212
# Replace the line if it exists
13-
cell.source = cell.source.replace('my_ProjectID = "" #@param {type:"string"}', f"this project_id is injected for testing /n my_ProjectID='{project_id}'")
13+
cell.source = cell.source.replace('my_ProjectID = "" #@param {type:"string"}', f"#this project_id is injected for testing\nmy_ProjectID='{project_id}'")
1414
# Comment out another line
15-
cell.source = cell.source.replace('auth.authenticate_user()', '#while testing, the authentication is handled by using application default credentials /n #auth.authenticate_user()')
15+
cell.source = cell.source.replace('auth.authenticate_user()', '#while testing, the authentication is handled by using application default credentials\n#auth.authenticate_user()')
1616
cell.source = cell.source.replace('REPLACE THIS TEXT WITH YOUR QUERY!', query1)
1717
cell.source = cell.source.replace('# write the selection criteria under this line!', query2)
1818

@@ -30,6 +30,6 @@ def modify_notebook(file_name, project_id, query1, query2):
3030
for file_name in files:
3131

3232
project_id = 'idc-external-025'
33-
query1 = '#this query is injected for testing /n SELECT DISTINCT collection_tumorLocation FROM `bigquery-public-data.idc_current.dicom_all` ' if 'part2' in file_name else ''
34-
query2 = '#this query is injected for testing /n MODALITY=\'MR\' AND collection_tumorLocation=\'Lung\'' if 'part2' in file_name else ''
33+
query1 = '#this query is injected for testing\n SELECT DISTINCT collection_tumorLocation FROM `bigquery-public-data.idc_current.dicom_all` ' if 'part2' in file_name else ''
34+
query2 = '#this query is injected for testing\n MODALITY=\'MR\' AND collection_tumorLocation=\'Lung\'' if 'part2' in file_name else ''
3535
modify_notebook(file_name, project_id, query1, query2)

0 commit comments

Comments
 (0)