@open3cl/engine 1.4.5 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -12
- package/dpe-sanitizer.service.js +25 -8
- package/engine.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,7 +83,12 @@ C'est un bon moyen de détecter un éventuel problème dans le dpe ou la librair
|
|
|
83
83
|
## Utilisation
|
|
84
84
|
|
|
85
85
|
```javascript
|
|
86
|
-
import {
|
|
86
|
+
import { @open3cl } from 'open3cl/engine';
|
|
87
|
+
import {
|
|
88
|
+
set_bug_for_bug_compat,
|
|
89
|
+
} from '@open3cl/engine/utils.js';
|
|
90
|
+
|
|
91
|
+
set_bug_for_bug_compat();
|
|
87
92
|
|
|
88
93
|
// Exemple d'objet JSON (partiel) issu d'un fichier XML DPE
|
|
89
94
|
const dpeData = {
|
|
@@ -316,20 +321,29 @@ Résultats des tests de corpus avec le mode de compatibilité activé.
|
|
|
316
321
|
| 1.4.3 | dpe_immeuble_chauffage_collectif.csv | 6149 | 61% | |
|
|
317
322
|
| 1.4.3 | dpe_immeuble_chauffage_mixte.csv | 4805 | 48% | |
|
|
318
323
|
| 1.4.3 | dpe_individuel_a_partir_dpe_immeuble_2026.csv | 2755 | 27% | |
|
|
324
|
+
| <ins>**1.4.4**<ins> | <ins>**corpus_dpe.csv**<ins> | <ins>**4560 (+4)**<ins> | <ins>**45%**<ins> | |
|
|
325
|
+
| 1.4.4 | dpe_logement_individuel_2025.csv | 8719 (+3) | 87% (+2%) | |
|
|
326
|
+
| 1.4.4 | dpe_maison_individuelle_2025.csv | 8715 | 87% | |
|
|
327
|
+
| 1.4.4 | dpe_appartement_individuel_chauffage_individuel_2025.csv | 9070 | 91% | |
|
|
328
|
+
| 1.4.4 | dpe_appartement_individuel_chauffage_collectif_2025.csv | 6803 (-1) | 68% | |
|
|
329
|
+
| 1.4.4 | dpe_immeuble_chauffage_individuel.csv | 7320 | 73% | |
|
|
330
|
+
| 1.4.4 | dpe_immeuble_chauffage_collectif.csv | 6149 | 61% | |
|
|
331
|
+
| 1.4.4 | dpe_immeuble_chauffage_mixte.csv | 4805 | 48% | |
|
|
332
|
+
| 1.4.4 | dpe_individuel_a_partir_dpe_immeuble_2026.csv | 2755 | 27% | |
|
|
319
333
|
|
|
320
334
|
</details>
|
|
321
335
|
|
|
322
|
-
| Version librairie | corpus | Nb en dessous du taux d'erreur | Taux de réussite
|
|
323
|
-
| :------------------ | -------------------------------------------------------- | ------------------------------ |
|
|
324
|
-
| <ins>**1.4.
|
|
325
|
-
| 1.4.
|
|
326
|
-
| 1.4.
|
|
327
|
-
| 1.4.
|
|
328
|
-
| 1.4.
|
|
329
|
-
| 1.4.
|
|
330
|
-
| 1.4.
|
|
331
|
-
| 1.4.
|
|
332
|
-
| 1.4.
|
|
336
|
+
| Version librairie | corpus | Nb en dessous du taux d'erreur | Taux de réussite | Description |
|
|
337
|
+
| :------------------ | -------------------------------------------------------- | ------------------------------ | ----------------------- | ----------- |
|
|
338
|
+
| <ins>**1.4.5**<ins> | <ins>**corpus_dpe.csv**<ins> | <ins>**4582 (+22)**<ins> | <ins>**46% (+1%)**<ins> | |
|
|
339
|
+
| 1.4.5 | dpe_logement_individuel_2025.csv | 8790 (+71) | 88% (+1%) | |
|
|
340
|
+
| 1.4.5 | dpe_maison_individuelle_2025.csv | 8791 (+76) | 88% (+1%) | |
|
|
341
|
+
| 1.4.5 | dpe_appartement_individuel_chauffage_individuel_2025.csv | 9143 (+73) | 91% | |
|
|
342
|
+
| 1.4.5 | dpe_appartement_individuel_chauffage_collectif_2025.csv | 6836 (+33) | 68% | |
|
|
343
|
+
| 1.4.5 | dpe_immeuble_chauffage_individuel.csv | 7371 (+51) | 74% (+1%) | |
|
|
344
|
+
| 1.4.5 | dpe_immeuble_chauffage_collectif.csv | 6155 (+6) | 61% | |
|
|
345
|
+
| 1.4.5 | dpe_immeuble_chauffage_mixte.csv | 4816 (+11S) | 48% | |
|
|
346
|
+
| 1.4.5 | dpe_individuel_a_partir_dpe_immeuble_2026.csv | 2755 | 27% | |
|
|
333
347
|
|
|
334
348
|
## Roadmap
|
|
335
349
|
|
package/dpe-sanitizer.service.js
CHANGED
|
@@ -1,28 +1,39 @@
|
|
|
1
1
|
import { ObjectUtil } from './core/util/infrastructure/object-util.js';
|
|
2
|
+
import { set, has } from 'lodash-es';
|
|
2
3
|
|
|
3
4
|
const nodesToMap = [
|
|
4
|
-
'mur',
|
|
5
|
-
'plancher_bas',
|
|
6
|
-
'plancher_haut',
|
|
7
|
-
'baie_vitree',
|
|
8
|
-
'porte',
|
|
9
|
-
'pont_thermique',
|
|
10
|
-
'ventilation',
|
|
11
5
|
'installation_ecs',
|
|
12
6
|
'generateur_ecs',
|
|
13
|
-
'climatisation',
|
|
14
7
|
'installation_chauffage',
|
|
15
8
|
'generateur_chauffage',
|
|
16
9
|
'emetteur_chauffage',
|
|
17
10
|
'sortie_par_energie'
|
|
18
11
|
];
|
|
19
12
|
|
|
13
|
+
const nodesCollectionToCheck = [
|
|
14
|
+
'logement.enveloppe.mur_collection.mur',
|
|
15
|
+
'logement.enveloppe.plancher_bas_collection.plancher_bas',
|
|
16
|
+
'logement.enveloppe.plancher_haut_collection.plancher_haut',
|
|
17
|
+
'logement.ventilation_collection.ventilation',
|
|
18
|
+
'logement.climatisation_collection.climatisation',
|
|
19
|
+
'logement.enveloppe.baie_vitree_collection.baie_vitree',
|
|
20
|
+
'logement.enveloppe.porte_collection.porte',
|
|
21
|
+
'logement.enveloppe.pont_thermique_collection.pont_thermique'
|
|
22
|
+
];
|
|
23
|
+
|
|
20
24
|
/**
|
|
21
25
|
* Transform single nodes in {@link nodesToMap} into array of nodes.
|
|
22
26
|
* Transform string number into digits
|
|
23
27
|
* These transformations should be done inside the open3cl library
|
|
24
28
|
*
|
|
25
29
|
* @example
|
|
30
|
+
*
|
|
31
|
+
* // Will create
|
|
32
|
+
* "plancher_haut_collection": {
|
|
33
|
+
* "plancher_haut": []
|
|
34
|
+
* }
|
|
35
|
+
* if the plancher_haut_collection.plancher_haut nodes does not exist or are not an array
|
|
36
|
+
*
|
|
26
37
|
* // Will transform
|
|
27
38
|
* "plancher_haut_collection": {
|
|
28
39
|
* "plancher_haut": {"id": 1}
|
|
@@ -44,6 +55,12 @@ export default class DpeSanitizerService {
|
|
|
44
55
|
* @return {FullDpe}
|
|
45
56
|
*/
|
|
46
57
|
execute(dpe) {
|
|
58
|
+
for (const path of nodesCollectionToCheck) {
|
|
59
|
+
if (!has(dpe, path)) {
|
|
60
|
+
set(dpe, path, []);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
47
64
|
return ObjectUtil.deepObjectTransform(
|
|
48
65
|
dpe,
|
|
49
66
|
(key) => key,
|
package/engine.js
CHANGED
|
@@ -28,7 +28,7 @@ import getFicheTechnique from './ficheTechnique.js';
|
|
|
28
28
|
import { ProductionENR } from './16.2_production_enr.js';
|
|
29
29
|
import DpeSanitizerService from './dpe-sanitizer.service.js';
|
|
30
30
|
|
|
31
|
-
const LIB_VERSION = '1.4.
|
|
31
|
+
const LIB_VERSION = '1.4.6';
|
|
32
32
|
|
|
33
33
|
const dpeSanitizerService = new DpeSanitizerService();
|
|
34
34
|
|