Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions hrflow/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ class GeneralEntitySchema(BaseModel):
)


class Label(BaseModel):
board_key: str = Field(
..., description="Identification key of the Board attached to the Job."
)
job_key: str = Field(None, description="Identification key of the Job.")
job_reference: t.Optional[str] = Field(
None, description="Custom identifier of the Job."
)
stage: str = Field(..., description="Stage of the job")
date_stage: str = Field(..., description="Date when the job reached this stage")
rating: int = Field(..., description="Rating associated with the job")
date_rating: str = Field(..., description="Date when the rating was given")


class Skill(BaseModel):
name: str = Field(..., description="Identification name of the skill")
type: t.Optional[str] = Field(None, description="Type of the skill. hard or soft")
Expand Down Expand Up @@ -306,8 +320,8 @@ class HrFlowProfile(BaseModel):
None, description="Custom identifier of the Profile."
)
info: ProfileInfo = Field(..., description="Object containing the Profile's info.")
text_language: str = Field(
..., description="Code language of the Profile. type: string code ISO 639-1"
text_language: t.Optional[str] = Field(
None, description="Code language of the Profile. type: string code ISO 639-1"
)
text: str = Field(..., description="Full text of the Profile..")
archived_at: t.Optional[str] = Field(
Expand Down Expand Up @@ -362,6 +376,6 @@ class HrFlowProfile(BaseModel):
metadatas: t.Optional[t.List[GeneralEntitySchema]] = Field(
None, description="List of metadatas of the Profile."
)
labels: t.Optional[t.List[GeneralEntitySchema]] = Field(
labels: t.Optional[t.List[Label]] = Field(
None, description="List of labels of the Profile."
)
2 changes: 1 addition & 1 deletion hrflow/utils/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def is_valid_for_scoring(
return is_valid_for_searching(profile) and (
is_valid_experiences_for_scoring(profile.experiences)
or is_valid_educations_for_scoring(profile.educations)
or bool(profile.summary)
or bool(profile.info.summary)
or bool(profile.skills)
or bool(profile.tasks)
)