Skip to content

Feat: add validation for profile searching & scoring in utils#22

Merged
corentin-hrflow merged 5 commits intomasterfrom
feat/add-scoring-searching-profile-validation
Jun 27, 2024
Merged

Feat: add validation for profile searching & scoring in utils#22
corentin-hrflow merged 5 commits intomasterfrom
feat/add-scoring-searching-profile-validation

Conversation

@corentin-hrflow
Copy link
Copy Markdown
Contributor

@corentin-hrflow corentin-hrflow commented Jun 26, 2024

This PR will add validation for profile searching and scoring.

from hrflow.utils.searching import is_valid_for_searching
from hrflow.utils.scoring import is_valid_for_scoring

is_valid_for_searching(profile_dict)
is_valid_for_searching(profile_obj)
# return True or False

is_valid_for_scoring(profile_dict)
is_valid_for_scoring(profile_obj)
# return True or False

@corentin-hrflow corentin-hrflow added the enhancement New feature or request label Jun 26, 2024
@corentin-hrflow corentin-hrflow self-assigned this Jun 26, 2024
Copy link
Copy Markdown
Contributor

@Thomas65535 Thomas65535 left a comment

Choose a reason for hiding this comment

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

@corentin-hrflow
Cas d'usage:

  1. le développeur à un JSON d'un profil
  2. il utilise l'objet Profile HrFlow.ai pour valider le format
  3. il utilise la fonction is_valid_for_searching pour valider son profil
  4. il envoi son profil dans la source

Le problème que l'on rencontre actuellement, c'est lorsqu'un développeur (chez nous ou chez le client) souhaite migrer des profils déjà existants vers HrFlow.ai.

NB: L'autre cas, c'est lorsqu'on reçoit des CVs => il y a beaucoup moins de problème car le remplissage est gérée par le Parsing

Comment thread hrflow/utils/scoring.py Outdated
Comment thread hrflow/utils/scoring.py Outdated
Comment on lines +68 to +74
return (
is_valid_experiences_for_scoring(profile.experiences)
or is_valid_educations_for_scoring(profile.educations)
or bool(profile.summary)
or bool(profile.skills)
or bool(profile.tasks)
)
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.

@corentin-hrflow
Il faut que le profile soit searchable pour être scorable, il faut donc ajouter un is_valid_for_searching(...) and ...

@corentin-hrflow corentin-hrflow merged commit 678b232 into master Jun 27, 2024
@corentin-hrflow corentin-hrflow deleted the feat/add-scoring-searching-profile-validation branch June 27, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants