-
Notifications
You must be signed in to change notification settings - Fork 69
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
✨ Add types for Categories and Subcategories #2458
Conversation
Report for the pull request #2458🚀 Test the model from the website: https://preprod.nosgestesclimat.fr?PR=2458 🌐 Translation status
Rules
Personas
👫 Personas changesTest personas bilans against preprodIn detailsMarie
Yoram
Corentin
Sandy
Mehdi
Sylviane
Jessica
Nolan
Anne Claire
Gérard
Test personas bilans against productionShowMarie
Yoram
Corentin
Sandy
Mehdi
Sylviane
Jessica
Nolan
Anne Claire
Gérard
|
prepack.mjs
Outdated
'services sociétaux' | ||
] | ||
function generateCategoriesTypes(destPath) { | ||
const rawData = fs.readFileSync(destPath) |
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.
Ca sert pas rawData si ?
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.
Tout à fait, ce qui me fait remarquer que nous n'avons pas de linter côté modèle pour les fichiers JS ?
fs.writeFileSync( | ||
'./types/subcategories.d.ts', | ||
generateSubcategoriesTypes(destPath) | ||
) |
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.
Sync, sync, sync everywhere ! We should have a main async function and use sf promises
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.
Salut @paulsouche, j'ai pas mal contribué sur cette base de code et en particulier sur les scripts de compilation du modèle.
Je ne suis pas très calé en JS et me demandais pourquoi il serait préférable d'utiliser des promises ici ? Le code étant séquentiel et les fichiers petits, je ne vois pas trop ce que ça apporterait 🤔
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.
Hello ! Tu peux faire plusieurs opérations en parallèle au lieu de bloquer le thread
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 précis, j'ai peur que ça complexifie le code pour pas de réels gains de performances.
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.
Pas d'opinion forte ici, je propose de merger cette PR qui n'a pas trait au refactoring de ce script 😄
* Modifs linge + cuisine * Suppression division par foyer * Voiture propriétaire par défaut * Hausse lessives par habitant * Fix par défaut voiture * par défaut voiture modif * Plus d'eau jardin * Hausse cuisine + vaisselle * Encore plus de lessives * Ajout lien ressource ADEME eau domestique * Traductions * Ajout de notes * Français devient humain * Traductions * Fix trads * ✨ Add types for Categories and Subcategories (#2458) * ✨ Add types for Categories and Subcategories * ♻️ Remove unused var * Ch model adaptations (#2454) * Modifications CH-fr model June 2024 * Add notes and small modification CH-fr July 2024 * Modification August on Actions/agir * Fix CH-fr model to renamed base rules keys + translate CH-es and CH-en using DeepL * Minor Fix requested by NGC.fr team --------- Co-authored-by: jrichard <[email protected]> Co-authored-by: Benjamin Arias <[email protected]> * 🔖 Release 3.3.0 * 🗑️ Remove unused translations --------- Co-authored-by: JuliePouliquen <[email protected]> Co-authored-by: Cedric Gampert <[email protected]> Co-authored-by: jrichard <[email protected]>
No description provided.