-
-
Notifications
You must be signed in to change notification settings - Fork 6
#50 Ajout d'une fonction qui permet de compter les modifs et de print ce compte. #61
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: dev
Are you sure you want to change the base?
The head ref may contain hidden characters: "50-Comptage-nb_march\u00E9s"
Conversation
|
|
||
|
|
||
|
|
||
| def count_and_print_modifications(json_path, i_modif=None, i_marche_modifie=None): |
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.
Peux-tu documenter les paramètres en entrée de la fonction ? Leur rôle n'est pas très clair :)
Par exemple avec une docstring sous la signature du la fonction
"""Param1 : ...
Param2 : ...
etc.
"""
src/tasks/analyse.py
Outdated
| return compteur | ||
|
|
||
|
|
||
| count_and_print_modifications("data/decp-2022.json",i_modif=11) |
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 l'appel de fonction n'utilise pas le paramètre i_marche_modifie ?
|
Salut @ColinMaudry |
|
Salut ! J'oublie pas ta PR 😉 C'est juste que la rentrée c'est un peu le rush... Le code de base a bougé depuis que tu as écrit ton code (ça bouge vite en ce moment !). Par exemple tu comptes les modifications dans le JSON plutôt que dans les données que le dataframe qu'on produit. Je vais quand même prendre le temps de réviser en imaginant que c'était l'object 👍🏻 |
count_and_print_modifications(json_path, i_modif=None, i_marche_modifie=None):
Si i_modif et i_marche_modifie restent None la fonction retourne uniquement la liste des modifications.
Si i_modif = 4 cela retournera tout les marchés modifiés avec 4 modifications et si i_marche_modifie a une valeur alors le code retournera uniquement le i_marche_modifie ème marché avec 4 modifications.
La PR a peut être des conflits tenez moi au courant.