Skip to content

Commit

Permalink
change publications' type order (papers, presentations, ...)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinaatalay committed Oct 24, 2024
1 parent 5b5b73c commit 1c0419a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/assets/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,15 @@ def group_publications_by_type(
publications: list[Publication],
) -> dict[str, list[Publication]]:
"""Group the publications by type."""
return group_publications(publications, "type")
grouped_publications = group_publications(publications, "type")
# Sort it as "Papers", "Presentations", "Patents", and any other type
sorted_grouped_publications = {}
for publication_type in get_args(available_types):
if publication_type in grouped_publications:
sorted_grouped_publications[publication_type] = grouped_publications[
publication_type
]
return sorted_grouped_publications


def group_publications_by_category(
Expand Down

0 comments on commit 1c0419a

Please sign in to comment.