@hestia-earth/data-validation 0.37.9 → 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.9",
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",
@@ -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.9';
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",
@@ -83,7 +98,7 @@
83
98
  {
84
99
  "function": "validate_boundary_area",
85
100
  "level": "warning",
86
- "message": "should be lower than max size"
101
+ "message": "boundaryArea should be lower than max size"
87
102
  },
88
103
  {
89
104
  "function": "validate_region_size",
@@ -148,7 +163,7 @@
148
163
  {
149
164
  "function": "validate_methodTier_background",
150
165
  "level": "error",
151
- "message": "should be equal to one of the allowed values"
166
+ "message": "must not have background methodTier"
152
167
  },
153
168
  {
154
169
  "function": "validate_defaultValue",
@@ -185,11 +200,26 @@
185
200
  "level": "warning",
186
201
  "message": "should contain a tillage practice"
187
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
+ },
188
213
  {
189
214
  "function": "validate_liveAnimal_system",
190
215
  "level": "warning",
191
216
  "message": "should add an animal production system"
192
217
  },
218
+ {
219
+ "function": "validate_has_pastureGrass",
220
+ "level": "warning",
221
+ "message": "should add the term pastureGrass"
222
+ },
193
223
  {
194
224
  "function": "validate_pastureGrass_key_termType",
195
225
  "level": "error",
@@ -205,11 +235,6 @@
205
235
  "level": "error",
206
236
  "message": "the sum of all pastureGrass values must be 100"
207
237
  },
208
- {
209
- "function": "validate_has_pastureGrass",
210
- "level": "warning",
211
- "message": "should add the term pastureGrass"
212
- },
213
238
  {
214
239
  "function": "validate_permanent_crop_productive_phase",
215
240
  "level": "error",
@@ -298,7 +323,7 @@
298
323
  {
299
324
  "function": "validate_inonising_compounds_waste",
300
325
  "level": "error",
301
- "message": "should be equal to one of the allowed values"
326
+ "message": "must be linked to waste input"
302
327
  },
303
328
  {
304
329
  "function": "validate_empty",
@@ -320,16 +345,6 @@
320
345
  "level": "error",
321
346
  "message": "must not be equal to 1 ha"
322
347
  },
323
- {
324
- "function": "validate_cycle_dates",
325
- "level": "error",
326
- "message": "must be greater than startDate"
327
- },
328
- {
329
- "function": "validate_cycle_dates",
330
- "level": "error",
331
- "message": "must be in the same format as endDate"
332
- },
333
348
  {
334
349
  "function": "validate_sum_aboveGroundCropResidue",
335
350
  "level": "error",
@@ -475,11 +490,6 @@
475
490
  "level": "error",
476
491
  "message": "is not an allowed excreta product"
477
492
  },
478
- {
479
- "function": "validate_organisation_dates",
480
- "level": "error",
481
- "message": "must be greater than startDate"
482
- },
483
493
  {
484
494
  "function": "validate_has_animals",
485
495
  "level": "warning",
@@ -565,11 +575,6 @@
565
575
  "level": "warning",
566
576
  "message": "should contain at least one management node"
567
577
  },
568
- {
569
- "function": "validate_exists",
570
- "level": "warning",
571
- "message": "should contain at least one management node"
572
- },
573
578
  {
574
579
  "function": "validate_fallow_dates",
575
580
  "level": "error",
@@ -580,11 +585,6 @@
580
585
  "level": "error",
581
586
  "message": "management date must be before cycle start date"
582
587
  },
583
- {
584
- "function": "validate_site_dates",
585
- "level": "error",
586
- "message": "must be greater than startDate"
587
- },
588
588
  {
589
589
  "function": "validate_cycle_dates",
590
590
  "level": "error",
@@ -606,7 +606,7 @@
606
606
  "message": "aggregation id must contain a product, region, start, and end year"
607
607
  },
608
608
  {
609
- "function": "_validate_previous_term",
609
+ "function": "_validate_previous_transformationId",
610
610
  "level": "error",
611
611
  "message": "must point to a previous transformation in the list"
612
612
  },