Skip to content

Commit

Permalink
Addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cip999 committed Jan 15, 2023
1 parent 71086e8 commit e3f4552
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions p2d/parse_polygon_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def parse_samples_explanations(notes):
exit(1)
assert(test_id != -1)
assert(test_id not in explanations)
curr = curr[0].upper() + curr[1:] # Capitalize first letter.
curr = curr[0].upper() + curr[1:] # Capitalize first letter.
explanations[test_id] = curr
curr = ''
test_id = -1
Expand Down Expand Up @@ -116,11 +116,9 @@ def pol_path(*path):
'statements', 'english', 'problem-properties.json')
with open(statement_json_path) as f:
statement_json = json.load(f)
problem['statement']['legend'] = statement_json['legend']
problem['statement']['input'] = statement_json['input']
problem['statement']['output'] = statement_json['output']
problem['statement']['interaction'] = statement_json['interaction']
problem['statement']['tutorial'] = statement_json['tutorial']
for section in ['legend', 'input', 'output', 'interaction', 'tutorial']:
content = statement_json[section]
problem['statement'][section] = content if content is not None else ''
explanations = parse_samples_explanations(statement_json['notes'])

sample_id = 1
Expand Down
2 changes: 1 addition & 1 deletion p2d/tex_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def generate_statement_tex(problem, tex_dir):
'LEGEND': problem['statement']['legend'],
'INPUT': problem['statement']['input'],
'OUTPUT': problem['statement']['output'],
'INTERACTION': '' if problem['statement']['interaction'] is None else problem['statement']['interaction'],
'INTERACTION': problem['statement']['interaction'],
'SAMPLES': samples_tex
}
for placeholder in replacements_statement:
Expand Down

0 comments on commit e3f4552

Please sign in to comment.