Skip to content

Commit 08c7e03

Browse files
committed
Merge branch 'main' into communities-pages
2 parents 09b5ed9 + 6b43dee commit 08c7e03

19 files changed

Lines changed: 4373 additions & 801 deletions

backend/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ ENV LIBRARY_PATH=/lib:/usr/lib LD_LIBRARY_PATH=/lib:/usr/lib
7272

7373
RUN apt-get update -y && apt-get install -y curl
7474

75-
RUN groupadd -r app && useradd -r -g app app && mkdir -p ${FUNCTION_DIR} && chown -R app:app ${FUNCTION_DIR}
75+
RUN groupadd -r app && useradd -r -g app app && mkdir -p ${FUNCTION_DIR} && chown -R app:app ${FUNCTION_DIR} \
76+
&& mkdir -p /home/app/.cache/huggingface /home/app/nltk_data && chown -R app:app /home/app/.cache /home/app/nltk_data
77+
78+
ENV HF_HOME=/home/app/.cache/huggingface
79+
ENV NLTK_DATA=/home/app/nltk_data
7680

7781
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/
7882
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/widgets/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/widgets/

backend/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ dependencies = [
104104
"weasyprint>=63.1",
105105
"opencv-python-headless>=4.10.0.84",
106106
"psycopg[c]==3.2.12",
107+
"sentence-transformers>=3.0.0",
108+
"scikit-learn>=1.5.0",
109+
"bertopic>=0.16.0",
110+
"nltk>=3.8.0",
107111
]
108112
name = "backend"
109113
version = "0.1.0"

backend/reviews/adapters.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,38 +42,38 @@ class ReviewAdapter(Protocol):
4242
"""Protocol defining the interface for review type adapters."""
4343

4444
@property
45-
def recap_template(self) -> str:
46-
"""Template name for the recap view."""
45+
def shortlist_template(self) -> str:
46+
"""Template name for the shortlist view."""
4747
...
4848

4949
@property
5050
def review_template(self) -> str:
5151
"""Template name for the individual review view."""
5252
...
5353

54-
def get_recap_items_queryset(
54+
def get_shortlist_items_queryset(
5555
self,
5656
review_session: ReviewSession,
5757
) -> QuerySet:
58-
"""Return annotated queryset of items for the recap view."""
58+
"""Return annotated queryset of items for the shortlist view."""
5959
...
6060

61-
def get_recap_context(
61+
def get_shortlist_context(
6262
self,
6363
request: HttpRequest,
6464
review_session: ReviewSession,
6565
items: QuerySet,
6666
admin_site: AdminSite,
6767
) -> dict[str, Any]:
68-
"""Return template context for the recap view."""
68+
"""Return template context for the shortlist view."""
6969
...
7070

71-
def process_recap_post(
71+
def process_shortlist_post(
7272
self,
7373
request: HttpRequest,
7474
review_session: ReviewSession,
7575
) -> None:
76-
"""Process and save decisions from the recap form."""
76+
"""Process and save decisions from the shortlist form."""
7777
...
7878

7979
def get_review_context(
@@ -111,18 +111,18 @@ class ProposalsReviewAdapter:
111111
"""Adapter for handling Proposals (Submissions) reviews."""
112112

113113
@property
114-
def recap_template(self) -> str:
115-
return "proposals-recap.html"
114+
def shortlist_template(self) -> str:
115+
return "proposals-shortlist.html"
116116

117117
@property
118118
def review_template(self) -> str:
119119
return "proposal-review.html"
120120

121-
def get_recap_items_queryset(
121+
def get_shortlist_items_queryset(
122122
self,
123123
review_session: ReviewSession,
124124
) -> QuerySet[Submission]:
125-
"""Return submissions annotated with scores for the recap view."""
125+
"""Return submissions annotated with scores for the shortlist view."""
126126
review_session_id = review_session.id
127127

128128
return (
@@ -159,14 +159,14 @@ def get_recap_items_queryset(
159159
)
160160
)
161161

162-
def get_recap_context(
162+
def get_shortlist_context(
163163
self,
164164
request: HttpRequest,
165165
review_session: ReviewSession,
166166
items: QuerySet,
167167
admin_site: AdminSite,
168168
) -> dict[str, Any]:
169-
"""Return template context for the proposals recap view."""
169+
"""Return template context for the proposals shortlist view."""
170170
conference = review_session.conference
171171
speakers_ids = items.values_list("speaker_id", flat=True)
172172

@@ -197,10 +197,10 @@ def get_recap_context(
197197
submission_types=conference.submission_types.all(),
198198
review_session_repr=str(review_session),
199199
all_statuses=[choice for choice in Submission.STATUS],
200-
title="Recap",
200+
title="Shortlist",
201201
)
202202

203-
def process_recap_post(
203+
def process_shortlist_post(
204204
self,
205205
request: HttpRequest,
206206
review_session: ReviewSession,
@@ -359,18 +359,18 @@ class GrantsReviewAdapter:
359359
"""Adapter for handling Grants (Financial Aid) reviews."""
360360

361361
@property
362-
def recap_template(self) -> str:
363-
return "grants-recap.html"
362+
def shortlist_template(self) -> str:
363+
return "grants-shortlist.html"
364364

365365
@property
366366
def review_template(self) -> str:
367367
return "grant-review.html"
368368

369-
def get_recap_items_queryset(
369+
def get_shortlist_items_queryset(
370370
self,
371371
review_session: ReviewSession,
372372
) -> QuerySet[Grant]:
373-
"""Return grants annotated with scores and std_dev for the recap view."""
373+
"""Return grants annotated with scores and std_dev for the shortlist view."""
374374
review_session_id = review_session.id
375375

376376
return (
@@ -433,14 +433,14 @@ def get_recap_items_queryset(
433433
)
434434
)
435435

436-
def get_recap_context(
436+
def get_shortlist_context(
437437
self,
438438
request: HttpRequest,
439439
review_session: ReviewSession,
440440
items: QuerySet,
441441
admin_site: AdminSite,
442442
) -> dict[str, Any]:
443-
"""Return template context for the grants recap view."""
443+
"""Return template context for the grants shortlist view."""
444444
proposals = {
445445
submission.id: submission
446446
for submission in Submission.objects.non_cancelled()
@@ -468,10 +468,10 @@ def get_recap_context(
468468
conference=review_session.conference
469469
),
470470
review_session=review_session,
471-
title="Recap",
471+
title="Shortlist",
472472
)
473473

474-
def process_recap_post(
474+
def process_shortlist_post(
475475
self,
476476
request: HttpRequest,
477477
review_session: ReviewSession,

0 commit comments

Comments
 (0)