-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feat/add profile json to parsing warehouse #223
Feat/add profile json to parsing warehouse #223
Conversation
91e426d
to
5d6bf5d
Compare
profile_text = profile.pop("text", "") | ||
profile_text_language = profile.pop("text_language", "") | ||
profile_experiences_duration = profile.pop("experiences_duration", 0) | ||
profile_educations_duration = profile.pop("educations_duration", 0) |
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.
Pourquoi est ce que tu fais pop
et pas get
?
C'est souhaité d'enlever ces clés de profile
?
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.
non, pas de raison. j'ai pas eu de directive à les enlever.
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.
Dans ce cas change pour faire get
pop
quand même ca a l'effet secondaire non négligeable d'enlever la clé du dictionnaire
profile_result["experiences_duration"] = ( | ||
profile_experiences_duration | ||
or profile_result.get("experiences_duration", 0) | ||
) |
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.
Si dans le profile
de base tu as experience_duration = 0
c'est quoi le résultat voulu ?
Parce que ici ce qui se passe c'est que 0 va evaluer à False
et tu coup tu vas passer à ce qu'il y'a dans profile_result
.
Est ce que c'est bien ca que tu veux ?
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.
L'idée c'est de faire fois à tous ce qu'est dans le profile json. Est-ce qu'on doit faire:
profile_experiences_duration=profile.get("experiences_duration") profile_result["experiences_duration"] = profile_experiences_duration if not None else profile_result.get("experiences_duration")
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.
Ce que je comprends de ce que tu dis c'est que dés que la clé est présente dans profile
et differente de None
tu veux prendre ca forcement.
Dans ce cas tu fais
profile_result["X"] = profile.get("X") if profile.get("X") is not None else profile_result.get("X")
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.
OK parfati! par contre pour les textes s'ils sont vides on ne va prendre que ce qui est parsé
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.
@the-forest-tree I did modify the code thanks
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.
Merci pour le travail j'ai mis deux questions
No description provided.