Skip to content

Commit 98b0590

Browse files
authored
Remove TODO comments, delete unused ProblemGanttPlot.jsx file (#168)
* Remove TODO comments * Delete unused ProblemGanttPlot.jsx file
1 parent fc1fb2e commit 98b0590

32 files changed

Lines changed: 20 additions & 329 deletions

src/backups/email_hash_lookup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def find_emails_by_hashes(input_file, output_file, target_hashes):
3939
print(f"Error: The file '{input_file}' or '{output_file}' was not found.")
4040

4141

42-
# TODO parameterize as CLI
4342
if __name__ == "__main__":
4443
target_list = [
4544
"e3384165",

src/backups/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ def store(
237237
238238
If any arguments are not specified, this command will use the values in the CONFIG .json file.
239239
"""
240-
# TODO add prompt when overwriting db or actual files
241240
config_dict = read_config(config)
242241

243242
if course_endpoint is None:
@@ -298,7 +297,6 @@ def store(
298297
print(f"Finished storing backups in {database} in {end - start} seconds")
299298

300299

301-
# TODO need to rerun lint with new schema for 61a and c88c fa25
302300
@app.command()
303301
def lint(
304302
database: Annotated[
@@ -325,7 +323,6 @@ def lint(
325323
326324
If any arguments are not specified, this command will use the values in the CONFIG .json file.
327325
"""
328-
# TODO add prompt when overwriting db or actual files
329326
config_dict = read_config(config)
330327

331328
if database is None:
@@ -375,7 +372,6 @@ def backup_file_metadata(
375372
376373
If any arguments are not specified, this command will use the values in the CONFIG .json file.
377374
"""
378-
# TODO add prompt when overwriting db or actual files
379375
config_dict = read_config(config)
380376

381377
if database is None:

src/backups/storage.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
PREFIX = "../../data/private"
4242

43-
# TODO make this programmatically adjustable
4443
FILENAME_PREFIX = "/Users/rebeccadang/Desktop/Code/ucb/berkeley-cdss/assignment-snapshots/data/private/"
4544

4645

@@ -79,7 +78,6 @@ def create_backup_and_write_messages(
7978
continue
8079

8180
if kind not in MESSAGE_KIND_TO_CLASS:
82-
# TODO use typer error output formatting
8381
print(
8482
f"OkPy message kind {kind} in backup_id {backup_id} unrecognized, skipping"
8583
)

src/notebooks/cs_61a_fa25_ants_study.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,21 +236,20 @@
236236
},
237237
{
238238
"cell_type": "code",
239-
"execution_count": 12,
239+
"execution_count": null,
240240
"id": "3515e182",
241241
"metadata": {},
242242
"outputs": [],
243243
"source": [
244244
"print_debug_data = {\n",
245-
" # TODO find out why there is a path that is None\n",
246245
" \"backup_id\": [row[0] for row in file_paths if row[3]],\n",
247246
" \"student_email\": [row[1] for row in file_paths if row[3]],\n",
248247
" \"created\": [row[2] for row in file_paths if row[3]],\n",
249248
" \"num_occurrences_print\": [],\n",
250249
"}\n",
251250
"\n",
252251
"for path in [row[3] for row in file_paths]:\n",
253-
" if path: # TODO find out why there is a path that is None\n",
252+
" if path:\n",
254253
" print_debug_data[\"num_occurrences_print\"].append(\n",
255254
" count_search_string_in_file(path, \"print\")\n",
256255
" )"

src/notebooks/data_c88c_fa25_ants_study.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -835,21 +835,20 @@
835835
},
836836
{
837837
"cell_type": "code",
838-
"execution_count": 14,
838+
"execution_count": null,
839839
"id": "3515e182",
840840
"metadata": {},
841841
"outputs": [],
842842
"source": [
843843
"print_debug_data = {\n",
844-
" # TODO find out why there is a path that is None\n",
845844
" \"backup_id\": [row[0] for row in file_paths if row[3]],\n",
846845
" \"student_email\": [row[1] for row in file_paths if row[3]],\n",
847846
" \"created\": [row[2] for row in file_paths if row[3]],\n",
848847
" \"num_occurrences_print\": [],\n",
849848
"}\n",
850849
"\n",
851850
"for path in [row[3] for row in file_paths]:\n",
852-
" if path: # TODO find out why there is a path that is None\n",
851+
" if path:\n",
853852
" print_debug_data[\"num_occurrences_print\"].append(\n",
854853
" count_search_string_in_file(path, \"print\")\n",
855854
" )"

src/snapshots-app/app/controllers/api/backup_file_metadata_controller.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ def show
2929
return
3030
end
3131

32-
# TODO error if student doesn't have any backups for this assignment and course
33-
3432
assignment_file_names = AssignmentFile.where(assignment_id: assignment_id).map { |af| af.file_name }
3533
backup_metadata = BackupMetadatum.where(course: course.okpy_endpoint, assignment: assignment.okpy_endpoint, student_email: student.email).order(:created)
3634
file_contents_locations = backup_metadata.filter_map do |backup|

src/snapshots-app/app/controllers/api/backups_controller.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# TODO update tests
2-
31
class Api::BackupsController < ApplicationController
42
def show
53
course_id = params[:course_id].to_i
@@ -24,8 +22,6 @@ def show
2422
return
2523
end
2624

27-
# TODO error if student doesn't have any backups for this assignment and course
28-
2925
assignment_file_names = AssignmentFile.where(assignment_id: assignment_id).map { |af| af.file_name }
3026
assignment_problem_names = AssignmentProblem.where(assignment_id: assignment_id).map { |ap| ap.display_name }
3127
backup_metadata = BackupMetadatum.where(course: course.okpy_endpoint, assignment: assignment.okpy_endpoint, student_email: student.email).order(:created)

src/snapshots-app/app/controllers/api/debugging/autograder_spam_controller.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO unit tests
21
class Api::Debugging::AutograderSpamController < ApplicationController
32
def show
43
# Validate params
@@ -29,8 +28,6 @@ def show
2928
return
3029
end
3130

32-
# TODO error if student doesn't have any backups for this assignment and course
33-
3431
backups = BackupMetadatum.where(
3532
course: course.okpy_endpoint,
3633
assignment: assignment.okpy_endpoint,

src/snapshots-app/app/controllers/api/debugging/print_statements_controller.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# TODO unit tests
21
class Api::Debugging::PrintStatementsController < ApplicationController
32
CACHE_TTL = 1.hour
43

5-
# TODO: don't hardcode this
64
IGNORE_LINES = [
75
"print('All bees are vanquished. You win!')",
86
"print('The bees reached homebase or the queen ant queen has perished. Please try again :(')",
@@ -12,7 +10,6 @@ class Api::Debugging::PrintStatementsController < ApplicationController
1210
# Regex for Python print statements: print(...)
1311
PRINT_REGEX = /^\s*print\s*\(.*\)/
1412

15-
# TODO deduplicate from FilesController
1613
def fetch_file_from_local(object_key)
1714
file_path = Rails.root.join("../../data/private/#{object_key}")
1815
if File.exist?(file_path)
@@ -65,8 +62,6 @@ def show
6562
return
6663
end
6764

68-
# TODO error if student doesn't have any backups for this assignment and course
69-
7065
backups = BackupMetadatum.where(
7166
course: course.okpy_endpoint,
7267
assignment: assignment.okpy_endpoint,
@@ -95,14 +90,12 @@ def show
9590
problem: problem_names.join(", "),
9691
timestamp: backup.created,
9792
passing: is_passing,
98-
# TODO don't hardcode this (other assignments may have multiple files)
9993
files: [ { name: "ants.py", contents: contents, hasPrint: has_print } ],
10094
has_print: has_print # internal flag for grouping
10195
}
10296
end
10397

10498
# Identify the indices of backups that contain prints
105-
# TODO investigate why problem name can be empty. perhaps they just ran `python3 ok` without specifying a problem?
10699
print_indices = all_data.each_index.select { |i| all_data[i][:has_print] and all_data[i][:problem] != "" }
107100

108101
return render json: [] if print_indices.empty?

src/snapshots-app/app/controllers/api/problem_calendar_controller.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ def show
2323
return
2424
end
2525

26-
# TODO error if student doesn't have any backups for this assignment and course
27-
2826
calendar_data = BackupMetadatum
2927
.where(
3028
course: course.okpy_endpoint,

0 commit comments

Comments
 (0)