Skip to content

Add a Platform column read from oaPlatform - #2

Merged
kevin-2023-code merged 1 commit into
mainfrom
feat/oa-platform-column
Nov 26, 2026
Merged

kevin-2023-code merged 1 commit into
mainfrom
feat/oa-platform-column

Conversation

@kevin-2023-code

@kevin-2023-code kevin-2023-code commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

What

A Platform column (HackerRank, CodeSignal, Codility, ...) on every OA row: the company tables, each companies/<company>/oa.csv, and data/questions.csv / data/questions.jsonl (platform key). Column order: Title, Format, Platform, Difficulty, Level, Role, Last Reported, Link.

Where it comes from

The TrueInterview public API's new oaPlatform field on a Question. It is set only when a candidate's report names the platform (the techscrape OA_platform stage, deterministic, with verbatim evidence kept). It is never guessed from the company, so most rows stay empty. Today 102 of the 835 live OA questions (12%) have one: CodeSignal 57, HackerRank 43, CoderPad 2.

Safe before the API ships it

oaPlatform is not a required field. A catalog with no such key, a null, or a value that is not a short string (40 chars max) reads as unknown, and the cell stays empty (- in the markdown tables, which matches the other empty columns). The hourly sync keeps working whether or not the field is live. A test covers this (test_a_catalog_without_the_field_still_renders_with_the_column_empty).

Generated files are not touched in this PR. The first sync after merge re-renders them with the new column.

Do not merge yet

The column only fills once the site change (migration 0516_question_oa_platform + oaPlatform in /api/v1/questions) is promoted to production and the backfill has run. Merging before then is harmless, because the column just renders empty.

Tests

python3 -m unittest discover -s scripts -p "test_*.py": 40 tests pass (4 new, 7 updated for the shifted column index).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Assessment-platform information now appears in generated CSV files and company tables, alongside each question’s format and difficulty.
    • The platform field is left empty when a catalog does not provide a platform or a question has no valid platform value.
  • Documentation
    • Updated repository guidance and the README to explain the platform field and when it is left empty.

Each OA row now shows the assessment platform it was given on (HackerRank,
CodeSignal, Codility, ...) when a candidate's report names it: in the company
tables, the per-company oa.csv, and data/questions.csv|jsonl.

The field is read tolerantly: a catalog without `oaPlatform` (the API ships it
after this change), a null, or anything that is not a short string renders as
an empty cell, so the hourly sync keeps working before the field is live.
`oaPlatform` is not a required field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The catalog’s oaPlatform value is parsed into an optional question field. Generated CSV, JSONL, and company README tables include a Platform field. Documentation and tests cover populated values, empty values, and platform parsing.

Changes: Platform field

Layer / File(s) Summary
Platform parsing and question data
scripts/model.py, scripts/test_build.py
load reads oaPlatform and stores a normalized platform value on each question. The parser accepts nonempty strings up to 40 characters and trims whitespace.
Platform in generated outputs
scripts/build.py, scripts/test_build.py, CONTRIBUTING.md
Generated CSV and JSONL records and company README tables include Platform. Tests check populated and empty values, parsing, and table escaping. Documentation describes the field and its empty-value behavior.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant CatalogRow
  participant ModelLoad
  participant Question
  participant BuildOutput
  CatalogRow->>ModelLoad: oaPlatform value
  ModelLoad->>Question: parsed platform value
  Question->>BuildOutput: platform field
Loading

Suggested reviewers: claude

Merge Risk: Minimal · up to 5062f

This change adds an optional Platform column to generated outputs, and it stays empty when the API does not supply the field. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Add a Platform column read from oaPlatform" matches the main change. The PR adds a Platform column to company tables, companies//oa.csv, and data/questions.csv/jsonl, and reads the…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "Add a Platform column read from oaPlatform" matches the main change. The PR adds a Platform column to company tables, companies/<company>/oa.csv, and data/questions.csv/jsonl, and reads the value from the API's oaPlatform field. The title is short, specific, and a teammate scanning history can understand the primary change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 70190c5d-b78d-4951-827b-50d648c2ae26
Commits

Reviewing files that changed from the base of the PR and between 706166d and 5062f21.

Files selected for processing: 4

  • CONTRIBUTING.md
  • scripts/build.py
  • scripts/model.py
  • scripts/test_build.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@kevin-2023-code
kevin-2023-code merged commit 73e7ab1 into main Nov 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant