Skip to content

Commit b5a8f15

Browse files
jackruethctrueden
jackrueth
authored andcommitted
Add new coments to process_cell
1 parent 6ea51f6 commit b5a8f15

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

_search/server/tutorials.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def parse_java_source(path):
2222
logger.debug(f'Parsing Java source file {path}...')
2323

2424
with open(path) as f:
25-
lines = json.read(f)
25+
lines = json.load(f)
2626

2727
# This is dumb -- do we want to do better?
2828
doc = {}
@@ -35,7 +35,7 @@ def parse_notebook(path):
3535
logger.debug(f'Parsing notebook {path}...')
3636

3737
with open(path) as f:
38-
data = json.read(f)
38+
data = json.load(f)
3939

4040
doc = {}
4141
doc['content'] = ''
@@ -45,10 +45,15 @@ def parse_notebook(path):
4545

4646
return doc
4747

48+
# type of cell is dict for reference
49+
# 2 cases: java file or a notebook
50+
# case 1: notebook -> need info inside cells and then info from output lines
51+
# case 2: java file -> need class name and class javadoc for description
4852
def process_cell(cell):
49-
# 2 cases: java file or a notebook
50-
# case 1: notebook -> need info inside cells and then info from output lines
51-
# case 2: java file -> need class name and class javadoc for description
53+
# case 1: notebook
54+
55+
# case 2: java files
56+
5257
return type(cell)
5358

5459

0 commit comments

Comments
 (0)