Skip to content

Make careers department helpers read from static list only. - #2802

Merged
jpmartinspt merged 4 commits into
mainfrom
careers-simplify-deparments
Aug 20, 2026
Merged

Make careers department helpers read from static list only.#2802
jpmartinspt merged 4 commits into
mainfrom
careers-simplify-deparments

Conversation

@jpmartinspt

@jpmartinspt jpmartinspt commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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:

/careers
/careers/all
/careers/roles.json
/careers/company-culture/progression
/careers/<department_slug>

@webteam-app

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.28571% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.14%. Comparing base (2da5c0f) to head (4098377).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
webapp/app.py 90.90% 2 Missing ⚠️
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     
Flag Coverage Δ
python 74.14% <94.28%> (-0.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_LIST and attach grouped vacancies under a "vacancies" key.
  • Renamed helper functions to public get_sorted_departments / get_all_departments and 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.

Comment thread webapp/careers.py
Comment thread webapp/careers.py Outdated
Comment on lines 83 to 86
def get_sorted_departments(greenhouse):
departments = _group_by_department(greenhouse.get_vacancies())

sort_order = [
Comment thread webapp/careers.py Outdated
Comment on lines 83 to 87
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.
@jpmartinspt
jpmartinspt force-pushed the careers-simplify-deparments branch from 42e1299 to 024d704 Compare August 12, 2026 15:38
@jpmartinspt
jpmartinspt marked this pull request as ready for review August 12, 2026 15:38
@jpmartinspt
jpmartinspt merged commit 27629df into main Aug 20, 2026
18 checks passed
@jpmartinspt
jpmartinspt deleted the careers-simplify-deparments branch August 20, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants