Make careers department helpers read from static list only. - #2802
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2802 +/- ##
==========================================
- Coverage 74.65% 74.14% -0.51%
==========================================
Files 19 19
Lines 2379 2352 -27
==========================================
- Hits 1776 1744 -32
- Misses 603 608 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the careers “department helper” logic to use a static in-repo department list (DEPARTMENT_LIST) rather than reading department metadata from Harvest, simplifying the careers pages and related JSON endpoints.
Changes:
- Removed Harvest dependency from department grouping/sorting helpers and the affected careers routes.
- Refactored department grouping to start from
DEPARTMENT_LISTand attach grouped vacancies under a"vacancies"key. - Renamed helper functions to public
get_sorted_departments/get_all_departmentsand updated call sites.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
webapp/careers.py |
Refactors department grouping/sorting helpers to be driven by the static department list and updates returned structures accordingly. |
webapp/app.py |
Updates careers routes to call the new helpers and removes unnecessary Harvest session creation for those endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def get_sorted_departments(greenhouse): | ||
| departments = _group_by_department(greenhouse.get_vacancies()) | ||
|
|
||
| sort_order = [ |
| def get_sorted_departments(greenhouse): | ||
| departments = _group_by_department(greenhouse.get_vacancies()) | ||
|
|
||
| sort_order = [ | ||
| "engineering", |
Order of deparments is now implicit because they are read them from a static dict.
42e1299 to
024d704
Compare
Done
Make careers department helpers read from static list only.
QA
Check all the careers pages that need the helpers to render, look similar to the same pages in staging/production.
Affected URLS: