-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Convert the Education section to Optional #495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Convert the Education section to Optional #495
Conversation
WalkthroughThe Pydantic schema for structured resumes was updated: Education.start_date and Education.end_date are now optional, and StructuredResumeModel.education is now an optional list with a default empty list via default_factory. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic analysis
No issues found across 1 file. Review in cubic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/backend/app/schemas/pydantic/structured_resume.py (1)
73-73
: NoEducation: null
occurrences found in fixtures
Thedefault_factory=list
already ensures that missing"Education"
deserializes to[]
. I ran a search through our sample payloads and didn’t find any instances of"Education": null
. That said, absence of evidence isn’t proof—if upstream systems might sendnull
, you can still opt in to coercing it:# Add at the top of apps/backend/app/schemas/pydantic/structured_resume.py from pydantic import field_validator # Inside StructuredResumeModel (below the field definitions) @field_validator("education", mode="before") @classmethod def _coerce_null_education(cls, v): return [] if v is None else vNo action is strictly required unless you’ve seen
null
payloads in production.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/backend/app/schemas/pydantic/structured_resume.py
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
apps/backend/app/schemas/**/*.py
📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)
Use Pydantic models for request/response schemas and validation
Files:
apps/backend/app/schemas/pydantic/structured_resume.py
🧬 Code Graph Analysis (1)
apps/backend/app/schemas/pydantic/structured_resume.py (2)
apps/backend/app/schemas/pydantic/resume_preview.py (2)
EducationItem
(25-30)ResumePreviewerModel
(33-38)apps/backend/app/schemas/pydantic/structured_job.py (2)
Qualifications
(79-81)StructuredJobModel
(95-112)
🔇 Additional comments (1)
apps/backend/app/schemas/pydantic/structured_resume.py (1)
58-59
: No downstream string-only usage of start_date/end_date detectedI searched the entire codebase for any
.start_date
or.end_date
references (including chained string methods) and found none. It’s safe to make these fields optional as there are no consumers assuming they’re always non-null strings.
Pull Request Title
Allow processing of resumes without having the Education section
Description
My resume doesn't have an Education section. Due to this, I was receiving an error (will be shown below)
After making the change, even resumes without Education listed can be processed.
Type
Proposed Changes
Screenshots / Code Snippets (if applicable)
Error looks like this:
[dev:backend] [2025-08-18T08:10:16+0300 - app.api.router.v1.resume - WARNING] Resume validation failed: Resume structure validation failed: Resume validation failed. Education -> 0 -> startDate: Input should be a valid string; Education -> 0 -> endDate: Input should be a valid string
How to Test
Testing doesn't change as the originally described.
Checklist
Additional Information
Although it is not a crucial "bug", not all resumes include Education for factors like working in a field or applying to a field that is not related to your education.
Summary by cubic
Resume validation no longer fails when the Education section is missing. Education is now optional, and date fields within Education are optional too.
Summary by CodeRabbit
New Features
Bug Fixes