Skip to content

Commit 743c86b

Browse files
authored
Fix jupytext notebook load error. (#366)
* Fix jupytext notebook load error. * Update jupytext version in all the notebooks * Set notebook interpreter to python3.7 * Update start.sh and README * Remove incompatible notebook deps functools32 and futures * Replace google.datalab with google.cloud for bigquery in notebooks * Using google-cloud-bigquery because datalab in python3.7 yields syntax error (see googledatalab/pydatalab#711) [ci skip]
1 parent 712f219 commit 743c86b

25 files changed

+90
-103
lines changed

data_steward/analytics/cdr_ops/conformance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
# text_representation:
55
# extension: .py
66
# format_name: light
7-
# format_version: '1.4'
8-
# jupytext_version: 1.2.3
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
99
# kernelspec:
10-
# display_name: Python 2
10+
# display_name: Python 3
1111
# language: python
12-
# name: python2
12+
# name: python3
1313
# ---
1414

1515
# # Conformance

data_steward/analytics/cdr_ops/coverage.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
# text_representation:
55
# extension: .py
66
# format_name: light
7-
# format_version: '1.4'
8-
# jupytext_version: 1.2.3
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
99
# kernelspec:
10-
# display_name: Python 2
10+
# display_name: Python 3
1111
# language: python
12-
# name: python2
12+
# name: python3
1313
# ---
1414

1515
import warnings

data_steward/analytics/cdr_ops/curation_dashboard.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
# text_representation:
55
# extension: .py
66
# format_name: light
7-
# format_version: '1.4'
8-
# jupytext_version: 1.2.3
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
99
# kernelspec:
10-
# display_name: Python 2
10+
# display_name: Python 3
1111
# language: python
12-
# name: python2
12+
# name: python3
1313
# ---
1414

1515
# +

data_steward/analytics/cdr_ops/deid_race.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# + {}
2+
# +
33
from notebooks import bq, render, parameters
44
import pandas as pd
55

data_steward/analytics/cdr_ops/ehr_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
# text_representation:
55
# extension: .py
66
# format_name: light
7-
# format_version: '1.4'
8-
# jupytext_version: 1.2.3
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
99
# kernelspec:
10-
# display_name: Python 2
10+
# display_name: Python 3
1111
# language: python
12-
# name: python2
12+
# name: python3
1313
# ---
1414

1515
# # EHR Operations

data_steward/analytics/cdr_ops/list_tables_with_duplicate_domain_ids.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
# text_representation:
55
# extension: .py
66
# format_name: light
7-
# format_version: '1.4'
8-
# jupytext_version: 1.2.3
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
99
# kernelspec:
10-
# display_name: Python 2
10+
# display_name: Python 3
1111
# language: python
12-
# name: python2
12+
# name: python3
1313
# ---
1414

1515
import google.datalab.bigquery as bq

data_steward/analytics/table_metrics/Table_Metrics_part_1.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# ---
22
# jupyter:
33
# jupytext:
4-
# formats: ipynb,py:light
54
# text_representation:
65
# extension: .py
76
# format_name: light
8-
# format_version: '1.4'
9-
# jupytext_version: 1.2.1
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
109
# kernelspec:
11-
# display_name: Python 2
10+
# display_name: Python 3
1211
# language: python
13-
# name: python2
12+
# name: python3
1413
# ---
1514

1615
# +
@@ -1665,4 +1664,3 @@ def cstr(s, color='black'):
16651664
success_rate
16661665

16671666
success_rate.to_csv("data\\concept.csv")
1668-
# -

data_steward/analytics/table_metrics/Table_Metrics_part_2.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# ---
22
# jupyter:
33
# jupytext:
4-
# formats: ipynb,py:light
54
# text_representation:
65
# extension: .py
76
# format_name: light
8-
# format_version: '1.4'
9-
# jupytext_version: 1.2.1
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
109
# kernelspec:
11-
# display_name: Python 2
10+
# display_name: Python 3
1211
# language: python
13-
# name: python2
12+
# name: python3
1413
# ---
1514

1615
# +

data_steward/analytics/table_metrics/Table_Metrics_part_3.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# ---
22
# jupyter:
33
# jupytext:
4-
# formats: ipynb,py:light
4+
# cell_metadata_json: true
55
# text_representation:
66
# extension: .py
77
# format_name: light
8-
# format_version: '1.4'
9-
# jupytext_version: 1.2.1
8+
# format_version: '1.5'
9+
# jupytext_version: 1.3.0
1010
# kernelspec:
11-
# display_name: Python 2
11+
# display_name: Python 3
1212
# language: python
13-
# name: python2
13+
# name: python3
1414
# ---
1515

1616
# + {"pycharm": {"name": "#%%\n"}}
@@ -222,6 +222,7 @@ def cstr(s, color='black'):
222222
# + {"pycharm": {"name": "#%%\n"}}
223223

224224

225+
225226
# + {"pycharm": {"name": "#%%\n"}}
226227
total_wrong = temporal_df['wrong_date_rows'].sum()
227228
total_wrong
@@ -300,6 +301,7 @@ def cstr(s, color='black'):
300301
# + {"pycharm": {"name": "#%%\n"}}
301302

302303

304+
303305
# + {"pycharm": {"name": "#%%\n"}}
304306
total_wrong = temporal_df['wrong_date_rows'].sum()
305307
total_wrong
@@ -1221,7 +1223,10 @@ def cstr(s, color='black'):
12211223
# + {"pycharm": {"name": "#%%\n"}}
12221224

12231225

1226+
12241227
# + {"pycharm": {"name": "#%%\n"}}
12251228

12261229

1230+
12271231
# + {"pycharm": {"name": "#%%\n"}}
1232+

data_steward/analytics/table_metrics/Table_Metrics_part_4.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# ---
22
# jupyter:
33
# jupytext:
4-
# formats: ipynb,py:light
54
# text_representation:
65
# extension: .py
76
# format_name: light
8-
# format_version: '1.3'
9-
# jupytext_version: 1.0.5
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
109
# kernelspec:
1110
# display_name: Python 3
1211
# language: python
@@ -2329,10 +2328,8 @@ def cstr(s, color='black'):
23292328
40163765, 40165789, 19125668, 40165776, 40165769, 40171412, 19127398, 19013174, 40163759, 974169, 1310756, 40165755,
23302329
19129688, 40163763)
23312330

2332-
# +
23332331
drugs = antibiotics + ccb + diuretics + opioids + statins + msknaids + oralhypo + painnsaids + vaccine + aceinhibitor
23342332

2335-
# -
23362333

23372334
# ## Antibiotics
23382335

data_steward/analytics/table_metrics/Table_Metrics_part_5.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# ---
22
# jupyter:
33
# jupytext:
4-
# formats: ipynb,py:light
54
# text_representation:
65
# extension: .py
76
# format_name: light
8-
# format_version: '1.3'
9-
# jupytext_version: 1.0.5
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
109
# kernelspec:
1110
# display_name: Python 3
1211
# language: python

data_steward/analytics/table_metrics/Table_Metrics_part_6.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# ---
22
# jupyter:
33
# jupytext:
4-
# formats: ipynb,py:light
54
# text_representation:
65
# extension: .py
76
# format_name: light
8-
# format_version: '1.3'
9-
# jupytext_version: 1.0.5
7+
# format_version: '1.5'
8+
# jupytext_version: 1.3.0
109
# kernelspec:
1110
# display_name: Python 3
1211
# language: python

data_steward/analytics/tools/concept_success_rates_visualizations.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# text_representation:
66
# extension: .py
77
# format_name: light
8-
# format_version: '1.4'
9-
# jupytext_version: 1.2.4
8+
# format_version: '1.5'
9+
# jupytext_version: 1.3.0
1010
# kernelspec:
11-
# display_name: Python 2
11+
# display_name: Python 3
1212
# language: python
13-
# name: python2
13+
# name: python3
1414
# ---
1515

1616
# NOTES:
@@ -414,4 +414,3 @@
414414

415415
img_name = name_of_interest + "_concept_success_line_graph.jpg"
416416
# plt.savefig(img_name, bbox_extraartist=(lgd,), bbox_inches='tight')
417-
# -

data_steward/analytics/tools/data_after_death_visualizations.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# text_representation:
66
# extension: .py
77
# format_name: light
8-
# format_version: '1.4'
9-
# jupytext_version: 1.2.4
8+
# format_version: '1.5'
9+
# jupytext_version: 1.3.0
1010
# kernelspec:
11-
# display_name: Python 2
11+
# display_name: Python 3
1212
# language: python
13-
# name: python2
13+
# name: python3
1414
# ---
1515

1616
# NOTES:
@@ -393,4 +393,3 @@
393393

394394
img_name = name_of_interest + "_data_after_death_line_graph.jpg"
395395
# plt.savefig(img_name, bbox_extraartist=(lgd,), bbox_inches='tight')
396-
# -

data_steward/analytics/tools/duplicates_visualizations.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# text_representation:
66
# extension: .py
77
# format_name: light
8-
# format_version: '1.4'
9-
# jupytext_version: 1.2.4
8+
# format_version: '1.5'
9+
# jupytext_version: 1.3.0
1010
# kernelspec:
11-
# display_name: Python 2
11+
# display_name: Python 3
1212
# language: python
13-
# name: python2
13+
# name: python3
1414
# ---
1515

1616
# NOTES:
@@ -387,4 +387,3 @@
387387

388388
img_name = name_of_interest + "_duplicates_line_graph.jpg"
389389
# plt.savefig(img_name, bbox_extraartist=(lgd,), bbox_inches='tight')
390-
# -

data_steward/analytics/tools/email_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def print_error_info(error_dict, starting_msg, percent,
297297
###########################################################################
298298
# No longer defining functions #
299299
# We are now doing everything that comes BEFORE we print the message #
300-
###########################################################################
300+
# ##########################################################################
301301

302302

303303
# 1. Loading the files
@@ -372,7 +372,7 @@ def print_error_info(error_dict, starting_msg, percent,
372372
# Now we are actually printing out the 'problem' information for the site #
373373
# This is admittedly clunky but I decided to not implement a standard #
374374
# function in order to allow the text feel more 'natural.' #
375-
###########################################################################
375+
# ##########################################################################
376376

377377

378378
# same for all of the sites

data_steward/analytics/tools/end_dates_before_start_dates_visualizations.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# text_representation:
66
# extension: .py
77
# format_name: light
8-
# format_version: '1.4'
9-
# jupytext_version: 1.2.4
8+
# format_version: '1.5'
9+
# jupytext_version: 1.3.0
1010
# kernelspec:
11-
# display_name: Python 2
11+
# display_name: Python 3
1212
# language: python
13-
# name: python2
13+
# name: python3
1414
# ---
1515

1616
# NOTES:
@@ -363,4 +363,3 @@
363363

364364
img_name = name_of_interest + "_end_before_start_data_line_graph.jpg"
365365
# plt.savefig(img_name, bbox_extraartist=(lgd,), bbox_inches='tight')
366-
# -

data_steward/analytics/tools/ingredient_usage_visualizations.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# text_representation:
66
# extension: .py
77
# format_name: light
8-
# format_version: '1.4'
9-
# jupytext_version: 1.2.4
8+
# format_version: '1.5'
9+
# jupytext_version: 1.3.0
1010
# kernelspec:
11-
# display_name: Python 2
11+
# display_name: Python 3
1212
# language: python
13-
# name: python2
13+
# name: python3
1414
# ---
1515

1616
# NOTES:
@@ -432,4 +432,3 @@
432432

433433
img_name = name_of_interest + "_drug_integration_line_graph.jpg"
434434
# plt.savefig(img_name, bbox_extraartist=(lgd,), bbox_inches='tight')
435-
# -

data_steward/analytics/tools/measurement_integration_visualizations.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# text_representation:
66
# extension: .py
77
# format_name: light
8-
# format_version: '1.4'
9-
# jupytext_version: 1.2.4
8+
# format_version: '1.5'
9+
# jupytext_version: 1.3.0
1010
# kernelspec:
11-
# display_name: Python 2
11+
# display_name: Python 3
1212
# language: python
13-
# name: python2
13+
# name: python3
1414
# ---
1515

1616
# NOTES:
@@ -401,4 +401,3 @@
401401

402402
img_name = name_of_interest + "_measurement_integration_line_graph.jpg"
403403
# plt.savefig(img_name, bbox_extraartist=(lgd,), bbox_inches='tight')
404-
# -

0 commit comments

Comments
 (0)