Skip to content

Commit

Permalink
remove duplicates from searchable courses.json
Browse files Browse the repository at this point in the history
  • Loading branch information
au5ton committed Feb 10, 2023
1 parent 135b8b7 commit 3e17f3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bundler/bundle/publications_courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def process(source: Path, destination: Path):
f'{row["SUBJECT"].strip()} {row["CATALOG NBR"].strip()}',
row["COURSE DESCR"]
) for row in records])))
# get a HashMap from a course name to the description
courseName2Description = dict(unique_courses_with_descriptions)
# de-duplicate by recreating
unique_courses_with_descriptions = sorted([(item, courseName2Description[item]) for item in courseName2Description.keys()])

results = []
missing_desc_counter = 0
Expand Down

0 comments on commit 3e17f3d

Please sign in to comment.