@hestia-earth/data-validation 0.37.8 → 0.37.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/data-validation",
3
- "version": "0.37.8",
3
+ "version": "0.37.10",
4
4
  "description": "HESTIA Data Validation library",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -2,11 +2,11 @@
2
2
  "fuel": [
3
3
  "diesel",
4
4
  "petrol",
5
- "aviationGasoline",
6
5
  "diesel1D",
6
+ "aviationGasoline",
7
7
  "marineDieselOil",
8
- "diesel4D",
9
8
  "diesel2D",
9
+ "diesel4D",
10
10
  "gasolineTypeJetFuel",
11
11
  "en590Diesel",
12
12
  "petrolBurntIn2StrokeEngine",
@@ -46,27 +46,6 @@
46
46
  "ecoalimV9",
47
47
  "jarvisAndPain1994",
48
48
  "directive200829EcOfTheEuropeanParliament",
49
- "europeanEnvironmentAgency2016",
50
- "ipcc2019CountryAverageFertiliserMix",
51
- "papatryphonEtAl2004",
52
- "fantkeEtAl2016",
53
- "lcImpactCertainEffects100Years",
54
- "haversineFormula",
55
- "usetoxV2",
56
- "ipcc2013ExcludingFeedbacks",
57
- "pribyl2010",
58
- "harmonizedWorldSoilDatabaseV1-2",
59
- "poschEtAl2008",
60
- "ecoinventV3",
61
- "chaudharyBrooks2018",
62
- "recipe2016Hierarchist",
63
- "sqcb",
64
- "mapbiomas",
65
- "recipe2016Individualist",
66
- "cml1992",
67
- "ecoinventV3AndEmberClimate",
68
- "lcImpactCertainEffectsInfinite",
69
- "ridouttPfister2010",
70
49
  "emepEea2019",
71
50
  "ipcc2021",
72
51
  "dammgen2009",
@@ -89,6 +68,27 @@
89
68
  "schererPfister2015",
90
69
  "globalCropWaterModel2008",
91
70
  "cumulativeEnergyDemandCedMethod",
71
+ "europeanEnvironmentAgency2016",
72
+ "ipcc2019CountryAverageFertiliserMix",
73
+ "papatryphonEtAl2004",
74
+ "fantkeEtAl2016",
75
+ "lcImpactCertainEffects100Years",
76
+ "haversineFormula",
77
+ "usetoxV2",
78
+ "ipcc2013ExcludingFeedbacks",
79
+ "pribyl2010",
80
+ "harmonizedWorldSoilDatabaseV1-2",
81
+ "poschEtAl2008",
82
+ "ecoinventV3",
83
+ "chaudharyBrooks2018",
84
+ "recipe2016Hierarchist",
85
+ "sqcb",
86
+ "mapbiomas",
87
+ "recipe2016Individualist",
88
+ "cml1992",
89
+ "ecoinventV3AndEmberClimate",
90
+ "lcImpactCertainEffectsInfinite",
91
+ "ridouttPfister2010",
92
92
  "ipcc2001",
93
93
  "environmentalFootprintV2-0",
94
94
  "europeanEnvironmentAgency2013",
@@ -178,6 +178,22 @@
178
178
  "burguFreshForage",
179
179
  "barleyFreshForage",
180
180
  "turnipFreshForage",
181
+ "cockatooFreshForage",
182
+ "jackfruitFreshForage",
183
+ "cocksfootFreshForage",
184
+ "safflowerFreshForage",
185
+ "trefoilFreshForage",
186
+ "kikuyuFreshForage",
187
+ "arrowrootFreshForage",
188
+ "itchgrassFreshForage",
189
+ "tanniaFreshForage",
190
+ "babulFreshForage",
191
+ "agatiFreshForage",
192
+ "nigerFreshForage",
193
+ "ryeFreshForage",
194
+ "peanutFreshForage",
195
+ "mulgaFreshForage",
196
+ "lupinFreshForage",
181
197
  "natalGrassFreshForage",
182
198
  "pennisetumSquamulatumFreshForage",
183
199
  "desertGrassFreshForage",
@@ -204,22 +220,6 @@
204
220
  "liverseedGrassFreshForage",
205
221
  "molassesGrassFreshForage",
206
222
  "birdwoodGrassFreshForage",
207
- "cockatooFreshForage",
208
- "jackfruitFreshForage",
209
- "cocksfootFreshForage",
210
- "safflowerFreshForage",
211
- "trefoilFreshForage",
212
- "kikuyuFreshForage",
213
- "arrowrootFreshForage",
214
- "itchgrassFreshForage",
215
- "tanniaFreshForage",
216
- "babulFreshForage",
217
- "agatiFreshForage",
218
- "nigerFreshForage",
219
- "ryeFreshForage",
220
- "peanutFreshForage",
221
- "mulgaFreshForage",
222
- "lupinFreshForage",
223
223
  "sporobolusNervosusFreshForage",
224
224
  "spottedBrachiariaFreshForage",
225
225
  "pennisetumOrientaleFreshForage",
@@ -309,17 +309,6 @@
309
309
  "redRhodesGrassFreshForage",
310
310
  "lehmannLoveGrassFreshForage",
311
311
  "stylosanthesCampoGrandeFreshForage",
312
- "milanjeFingerGrassFreshForage",
313
- "africanCouchGrassFreshForage",
314
- "colouredGuineaGrassFreshForage",
315
- "grassAlfalfaMixtureFreshForage",
316
- "smallCanaryGrassFreshForage",
317
- "wildSudanGrassFreshForage",
318
- "woollyFingerGrassFreshForage",
319
- "commonThatchingGrassFreshForage",
320
- "greyLoveGrassFreshForage",
321
- "cushionLoveGrassFreshForage",
322
- "wireLemonGrassFreshForage",
323
312
  "sunnHempFreshForage",
324
313
  "signalGrassFreshForage",
325
314
  "columbusGrassFreshForage",
@@ -352,6 +341,17 @@
352
341
  "congoGrassFreshForage",
353
342
  "indianBluegrassFreshForage",
354
343
  "mnesitheaRottboellioidesFreshForage",
344
+ "milanjeFingerGrassFreshForage",
345
+ "africanCouchGrassFreshForage",
346
+ "colouredGuineaGrassFreshForage",
347
+ "grassAlfalfaMixtureFreshForage",
348
+ "smallCanaryGrassFreshForage",
349
+ "wildSudanGrassFreshForage",
350
+ "woollyFingerGrassFreshForage",
351
+ "commonThatchingGrassFreshForage",
352
+ "greyLoveGrassFreshForage",
353
+ "cushionLoveGrassFreshForage",
354
+ "wireLemonGrassFreshForage",
355
355
  "colouredHoodGrassFreshForage",
356
356
  "falseRhodesGrassFreshForage",
357
357
  "stAugustineGrassFreshForage",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const DATA_VALIDATION_VERSION = '0.37.8';
1
+ export const DATA_VALIDATION_VERSION = '0.37.10';
package/validation.json CHANGED
@@ -5,11 +5,26 @@
5
5
  "level": "error",
6
6
  "message": "must be before today"
7
7
  },
8
+ {
9
+ "function": "validate_node_dates",
10
+ "level": "error",
11
+ "message": "must be greater than startDate"
12
+ },
13
+ {
14
+ "function": "validate_node_dates",
15
+ "level": "error",
16
+ "message": "must be in the same format as endDate"
17
+ },
8
18
  {
9
19
  "function": "validate_list_dates",
10
20
  "level": "error",
11
21
  "message": "must be greater than startDate"
12
22
  },
23
+ {
24
+ "function": "validate_list_dates_format",
25
+ "level": "error",
26
+ "message": "must have the same length as endDate"
27
+ },
13
28
  {
14
29
  "function": "validate_list_dates_length",
15
30
  "level": "error",
@@ -25,6 +40,16 @@
25
40
  "level": "error",
26
41
  "message": "must be greater than min"
27
42
  },
43
+ {
44
+ "function": "validate_list_min_max_lookup",
45
+ "level": "error",
46
+ "message": "must be above the minimum"
47
+ },
48
+ {
49
+ "function": "validate_list_min_max_lookup",
50
+ "level": "error",
51
+ "message": "must be below the maximum"
52
+ },
28
53
  {
29
54
  "function": "validate_list_term_percent",
30
55
  "level": "warning",
@@ -73,7 +98,7 @@
73
98
  {
74
99
  "function": "validate_boundary_area",
75
100
  "level": "warning",
76
- "message": "should be lower than max size"
101
+ "message": "boundaryArea should be lower than max size"
77
102
  },
78
103
  {
79
104
  "function": "validate_region_size",
@@ -138,7 +163,7 @@
138
163
  {
139
164
  "function": "validate_methodTier_background",
140
165
  "level": "error",
141
- "message": "should be equal to one of the allowed values"
166
+ "message": "must not have background methodTier"
142
167
  },
143
168
  {
144
169
  "function": "validate_defaultValue",
@@ -175,11 +200,26 @@
175
200
  "level": "warning",
176
201
  "message": "should contain a tillage practice"
177
202
  },
203
+ {
204
+ "function": "validate_tillage_values",
205
+ "level": "error",
206
+ "message": "cannot use no tillage if depth or number of tillages is not 0"
207
+ },
208
+ {
209
+ "function": "validate_tillage_values",
210
+ "level": "error",
211
+ "message": "cannot use full tillage if depth or number of tillages is 0"
212
+ },
178
213
  {
179
214
  "function": "validate_liveAnimal_system",
180
215
  "level": "warning",
181
216
  "message": "should add an animal production system"
182
217
  },
218
+ {
219
+ "function": "validate_has_pastureGrass",
220
+ "level": "warning",
221
+ "message": "should add the term pastureGrass"
222
+ },
183
223
  {
184
224
  "function": "validate_pastureGrass_key_termType",
185
225
  "level": "error",
@@ -195,11 +235,6 @@
195
235
  "level": "error",
196
236
  "message": "the sum of all pastureGrass values must be 100"
197
237
  },
198
- {
199
- "function": "validate_has_pastureGrass",
200
- "level": "warning",
201
- "message": "should add the term pastureGrass"
202
- },
203
238
  {
204
239
  "function": "validate_permanent_crop_productive_phase",
205
240
  "level": "error",
@@ -288,7 +323,7 @@
288
323
  {
289
324
  "function": "validate_inonising_compounds_waste",
290
325
  "level": "error",
291
- "message": "should be equal to one of the allowed values"
326
+ "message": "must be linked to waste input"
292
327
  },
293
328
  {
294
329
  "function": "validate_empty",
@@ -311,34 +346,34 @@
311
346
  "message": "must not be equal to 1 ha"
312
347
  },
313
348
  {
314
- "function": "validate_cycle_dates",
349
+ "function": "validate_sum_aboveGroundCropResidue",
315
350
  "level": "error",
316
- "message": "must be greater than startDate"
351
+ "message": "must be more than or equal to other crop residues"
317
352
  },
318
353
  {
319
- "function": "validate_cycle_dates",
354
+ "function": "validate_crop_residue_complete",
320
355
  "level": "error",
321
- "message": "must be in the same format as endDate"
356
+ "message": "must specify the fate of cropResidue"
322
357
  },
323
358
  {
324
- "function": "validate_cycleDuration",
325
- "level": "error",
326
- "message": "must equal to endDate - startDate in days"
359
+ "function": "validate_crop_residue_incomplete",
360
+ "level": "warning",
361
+ "message": "should specify the fate of cropResidue"
327
362
  },
328
363
  {
329
- "function": "validate_sum_aboveGroundCropResidue",
364
+ "function": "validate_cycleDuration",
330
365
  "level": "error",
331
- "message": "must be more than or equal to other crop residues"
366
+ "message": "must equal to endDate - startDate in days"
332
367
  },
333
368
  {
334
- "function": "validate_crop_residue_complete",
369
+ "function": "validate_maximum_cycleDuration",
335
370
  "level": "error",
336
- "message": "must specify the fate of cropResidue"
371
+ "message": "must be below maximum cycleDuration"
337
372
  },
338
373
  {
339
- "function": "validate_crop_residue_incomplete",
374
+ "function": "validate_riceGrainInHuskFlooded_minimum_cycleDuration",
340
375
  "level": "warning",
341
- "message": "should specify the fate of cropResidue"
376
+ "message": "should be more than the cropping duration"
342
377
  },
343
378
  {
344
379
  "function": "validate_crop_siteDuration",
@@ -395,16 +430,6 @@
395
430
  "level": "error",
396
431
  "message": "must add substrate inputs"
397
432
  },
398
- {
399
- "function": "validate_maximum_cycleDuration",
400
- "level": "error",
401
- "message": "must be below maximum cycleDuration"
402
- },
403
- {
404
- "function": "validate_riceGrainInHuskFlooded_minimum_cycleDuration",
405
- "level": "warning",
406
- "message": "should be more than the cropping duration"
407
- },
408
433
  {
409
434
  "function": "validate_property_valueType",
410
435
  "level": "error",
@@ -465,11 +490,6 @@
465
490
  "level": "error",
466
491
  "message": "is not an allowed excreta product"
467
492
  },
468
- {
469
- "function": "validate_organisation_dates",
470
- "level": "error",
471
- "message": "must be greater than startDate"
472
- },
473
493
  {
474
494
  "function": "validate_has_animals",
475
495
  "level": "warning",
@@ -555,11 +575,6 @@
555
575
  "level": "warning",
556
576
  "message": "should contain at least one management node"
557
577
  },
558
- {
559
- "function": "validate_exists",
560
- "level": "warning",
561
- "message": "should contain at least one management node"
562
- },
563
578
  {
564
579
  "function": "validate_fallow_dates",
565
580
  "level": "error",
@@ -570,11 +585,6 @@
570
585
  "level": "error",
571
586
  "message": "management date must be before cycle start date"
572
587
  },
573
- {
574
- "function": "validate_site_dates",
575
- "level": "error",
576
- "message": "must be greater than startDate"
577
- },
578
588
  {
579
589
  "function": "validate_cycle_dates",
580
590
  "level": "error",
@@ -596,7 +606,7 @@
596
606
  "message": "aggregation id must contain a product, region, start, and end year"
597
607
  },
598
608
  {
599
- "function": "_validate_previous_term",
609
+ "function": "_validate_previous_transformationId",
600
610
  "level": "error",
601
611
  "message": "must point to a previous transformation in the list"
602
612
  },