@hestia-earth/engine-models 0.87.0 → 0.87.3
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/cjs/validate-config.d.ts +120 -5
- package/cjs/validate-config.js +19 -10
- package/cjs/version.d.ts +1 -1
- package/cjs/version.js +1 -1
- package/config/config-schema.json +108 -0
- package/esm/validate-config.d.ts +120 -5
- package/esm/validate-config.js +14 -9
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/formulas/index.json +63 -8
- package/package.json +2 -2
package/cjs/validate-config.d.ts
CHANGED
|
@@ -1,11 +1,126 @@
|
|
|
1
|
-
import { allowedType, IOrchestratorModelConfig } from './config';
|
|
1
|
+
import { allowedType, IOrchestratorConfig, IOrchestratorModelConfig } from './config';
|
|
2
|
+
/**
|
|
3
|
+
* JSON Schema (draft-07) describing an orchestrator configuration file.
|
|
4
|
+
* Note: it uses no external `$ref` and no `format` keyword, so it compiles with any ajv version.
|
|
5
|
+
*/
|
|
6
|
+
export declare const configSchema: {
|
|
7
|
+
$schema: string;
|
|
8
|
+
type: string;
|
|
9
|
+
definitions: {
|
|
10
|
+
runArgs: {
|
|
11
|
+
type: string;
|
|
12
|
+
properties: {
|
|
13
|
+
skipEmptyValue: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
skipAggregated: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
termId: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
runNonAddedTerm: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
runNonMeasured: {
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
mergeArgs: {
|
|
31
|
+
type: string;
|
|
32
|
+
properties: {
|
|
33
|
+
sameMethodModel: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
skipSameTerm: {
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
replaceThreshold: {
|
|
40
|
+
type: string;
|
|
41
|
+
minItems: number;
|
|
42
|
+
maxItems: number;
|
|
43
|
+
items: {
|
|
44
|
+
type: string;
|
|
45
|
+
}[];
|
|
46
|
+
};
|
|
47
|
+
replaceLowerTier: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
matchDatesFormat: {
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
model: {
|
|
56
|
+
type: string;
|
|
57
|
+
properties: {
|
|
58
|
+
key: {
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
model: {
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
value: {
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
runStrategy: {
|
|
68
|
+
type: string;
|
|
69
|
+
enum: string[];
|
|
70
|
+
};
|
|
71
|
+
runArgs: {
|
|
72
|
+
$ref: string;
|
|
73
|
+
};
|
|
74
|
+
mergeStrategy: {
|
|
75
|
+
type: string;
|
|
76
|
+
enum: string[];
|
|
77
|
+
};
|
|
78
|
+
mergeArgs: {
|
|
79
|
+
$ref: string;
|
|
80
|
+
};
|
|
81
|
+
stage: {
|
|
82
|
+
type: string;
|
|
83
|
+
minimum: number;
|
|
84
|
+
maximum: number;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
required: string[];
|
|
88
|
+
};
|
|
89
|
+
"model-list": {
|
|
90
|
+
anyOf: ({
|
|
91
|
+
$ref: string;
|
|
92
|
+
type?: undefined;
|
|
93
|
+
items?: undefined;
|
|
94
|
+
} | {
|
|
95
|
+
type: string;
|
|
96
|
+
items: {
|
|
97
|
+
$ref: string;
|
|
98
|
+
};
|
|
99
|
+
$ref?: undefined;
|
|
100
|
+
})[];
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
properties: {
|
|
104
|
+
models: {
|
|
105
|
+
type: string;
|
|
106
|
+
items: {
|
|
107
|
+
$ref: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
required: string[];
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Either a node type, in which case the bundled configuration is used, or a configuration to validate.
|
|
115
|
+
*/
|
|
116
|
+
export type configOrNodeType = allowedType | IOrchestratorConfig;
|
|
2
117
|
/**
|
|
3
118
|
* Use inter-dependencies to detect models that are in the wrong order.
|
|
4
119
|
*
|
|
5
|
-
* @param
|
|
120
|
+
* @param config Cycle, Site, or ImpactAssessment to use the bundled configuration, or a configuration itself.
|
|
6
121
|
* @returns List of models that have dependencies that could not be found prior to running.
|
|
7
122
|
*/
|
|
8
|
-
export declare const validateConfigOrder: (
|
|
123
|
+
export declare const validateConfigOrder: (config: configOrNodeType) => {
|
|
9
124
|
model: IOrchestratorModelConfig;
|
|
10
125
|
existing: string[];
|
|
11
126
|
missing: string[];
|
|
@@ -14,6 +129,6 @@ export declare const validateConfigOrder: (nodeType: allowedType) => {
|
|
|
14
129
|
* Detect multiple models running in parallel when they should not.
|
|
15
130
|
* Note: we use the `mergeArgs` to handle special cases when multiple identical models CAN run in parallel
|
|
16
131
|
*
|
|
17
|
-
* @param
|
|
132
|
+
* @param config Cycle, Site, or ImpactAssessment to use the bundled configuration, or a configuration itself.
|
|
18
133
|
*/
|
|
19
|
-
export declare const validateConfigDuplicates: (
|
|
134
|
+
export declare const validateConfigDuplicates: (config: configOrNodeType) => IOrchestratorModelConfig[];
|
package/cjs/validate-config.js
CHANGED
|
@@ -36,9 +36,18 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
36
36
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.validateConfigDuplicates = exports.validateConfigOrder = void 0;
|
|
39
|
+
exports.validateConfigDuplicates = exports.validateConfigOrder = exports.configSchema = void 0;
|
|
40
40
|
var config_1 = require("./config");
|
|
41
41
|
var utils_1 = require("./utils");
|
|
42
|
+
var schema = require("../config/config-schema.json");
|
|
43
|
+
/**
|
|
44
|
+
* JSON Schema (draft-07) describing an orchestrator configuration file.
|
|
45
|
+
* Note: it uses no external `$ref` and no `format` keyword, so it compiles with any ajv version.
|
|
46
|
+
*/
|
|
47
|
+
exports.configSchema = schema;
|
|
48
|
+
var resolveConfig = function (config) {
|
|
49
|
+
return typeof config === 'string' ? (0, config_1.loadConfig)(config) : config;
|
|
50
|
+
};
|
|
42
51
|
// models not included in the links
|
|
43
52
|
var skipModels = ['emissions.deleted', 'transformations'];
|
|
44
53
|
var isHestiaResidueCyclicModel = function (_a) {
|
|
@@ -85,13 +94,12 @@ var matchDependencies = function (models) { return function (model) {
|
|
|
85
94
|
/**
|
|
86
95
|
* Use inter-dependencies to detect models that are in the wrong order.
|
|
87
96
|
*
|
|
88
|
-
* @param
|
|
97
|
+
* @param config Cycle, Site, or ImpactAssessment to use the bundled configuration, or a configuration itself.
|
|
89
98
|
* @returns List of models that have dependencies that could not be found prior to running.
|
|
90
99
|
*/
|
|
91
|
-
var validateConfigOrder = function (
|
|
92
|
-
var config = (0, config_1.loadConfig)(nodeType);
|
|
100
|
+
var validateConfigOrder = function (config) {
|
|
93
101
|
// flatten all models to process one by one, starting with the last one
|
|
94
|
-
var models = config.models.flat();
|
|
102
|
+
var models = resolveConfig(config).models.flat();
|
|
95
103
|
var results = models.filter(includeModel).map(matchDependencies(models));
|
|
96
104
|
return results.filter(function (r) { return r.missing.length > 0; });
|
|
97
105
|
};
|
|
@@ -109,12 +117,13 @@ var findDuplicatedConfigs = function (models) {
|
|
|
109
117
|
* Detect multiple models running in parallel when they should not.
|
|
110
118
|
* Note: we use the `mergeArgs` to handle special cases when multiple identical models CAN run in parallel
|
|
111
119
|
*
|
|
112
|
-
* @param
|
|
120
|
+
* @param config Cycle, Site, or ImpactAssessment to use the bundled configuration, or a configuration itself.
|
|
113
121
|
*/
|
|
114
|
-
var validateConfigDuplicates = function (
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
|
|
122
|
+
var validateConfigDuplicates = function (config) {
|
|
123
|
+
var duplicates = resolveConfig(config)
|
|
124
|
+
.models.map(function (value) {
|
|
125
|
+
return Array.isArray(value) ? findDuplicatedConfigs(value) : [];
|
|
126
|
+
})
|
|
118
127
|
.flat(2);
|
|
119
128
|
return duplicates;
|
|
120
129
|
};
|
package/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ENGINE_VERSION = "0.87.
|
|
1
|
+
export declare const ENGINE_VERSION = "0.87.3";
|
package/cjs/version.js
CHANGED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"runArgs": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"skipEmptyValue": {
|
|
9
|
+
"type": "boolean"
|
|
10
|
+
},
|
|
11
|
+
"skipAggregated": {
|
|
12
|
+
"type": "boolean"
|
|
13
|
+
},
|
|
14
|
+
"termId": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"runNonAddedTerm": {
|
|
18
|
+
"type": "boolean"
|
|
19
|
+
},
|
|
20
|
+
"runNonMeasured": {
|
|
21
|
+
"type": "boolean"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"mergeArgs": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"sameMethodModel": {
|
|
29
|
+
"type": "boolean"
|
|
30
|
+
},
|
|
31
|
+
"skipSameTerm": {
|
|
32
|
+
"type": "boolean"
|
|
33
|
+
},
|
|
34
|
+
"replaceThreshold": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"minItems": 2,
|
|
37
|
+
"maxItems": 2,
|
|
38
|
+
"items": [
|
|
39
|
+
{
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "number"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"replaceLowerTier": {
|
|
48
|
+
"type": "boolean"
|
|
49
|
+
},
|
|
50
|
+
"matchDatesFormat": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"model": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"key": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"model": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"value": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"runStrategy": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": ["add_blank_node_if_missing", "add_key_if_missing", "always"]
|
|
70
|
+
},
|
|
71
|
+
"runArgs": {
|
|
72
|
+
"$ref": "#/definitions/runArgs"
|
|
73
|
+
},
|
|
74
|
+
"mergeStrategy": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": ["default", "list", "node", "append"]
|
|
77
|
+
},
|
|
78
|
+
"mergeArgs": {
|
|
79
|
+
"$ref": "#/definitions/mergeArgs"
|
|
80
|
+
},
|
|
81
|
+
"stage": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 1,
|
|
84
|
+
"maximum": 2
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": ["key", "model", "runStrategy", "mergeStrategy"]
|
|
88
|
+
},
|
|
89
|
+
"model-list": {
|
|
90
|
+
"anyOf": [
|
|
91
|
+
{ "$ref": "#/definitions/model" },
|
|
92
|
+
{
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": { "$ref": "#/definitions/model" }
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"properties": {
|
|
100
|
+
"models": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"$ref": "#/definitions/model-list"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": ["models"]
|
|
108
|
+
}
|
package/esm/validate-config.d.ts
CHANGED
|
@@ -1,11 +1,126 @@
|
|
|
1
|
-
import { allowedType, IOrchestratorModelConfig } from './config';
|
|
1
|
+
import { allowedType, IOrchestratorConfig, IOrchestratorModelConfig } from './config';
|
|
2
|
+
/**
|
|
3
|
+
* JSON Schema (draft-07) describing an orchestrator configuration file.
|
|
4
|
+
* Note: it uses no external `$ref` and no `format` keyword, so it compiles with any ajv version.
|
|
5
|
+
*/
|
|
6
|
+
export declare const configSchema: {
|
|
7
|
+
$schema: string;
|
|
8
|
+
type: string;
|
|
9
|
+
definitions: {
|
|
10
|
+
runArgs: {
|
|
11
|
+
type: string;
|
|
12
|
+
properties: {
|
|
13
|
+
skipEmptyValue: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
skipAggregated: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
termId: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
runNonAddedTerm: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
runNonMeasured: {
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
mergeArgs: {
|
|
31
|
+
type: string;
|
|
32
|
+
properties: {
|
|
33
|
+
sameMethodModel: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
skipSameTerm: {
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
replaceThreshold: {
|
|
40
|
+
type: string;
|
|
41
|
+
minItems: number;
|
|
42
|
+
maxItems: number;
|
|
43
|
+
items: {
|
|
44
|
+
type: string;
|
|
45
|
+
}[];
|
|
46
|
+
};
|
|
47
|
+
replaceLowerTier: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
matchDatesFormat: {
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
model: {
|
|
56
|
+
type: string;
|
|
57
|
+
properties: {
|
|
58
|
+
key: {
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
model: {
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
value: {
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
runStrategy: {
|
|
68
|
+
type: string;
|
|
69
|
+
enum: string[];
|
|
70
|
+
};
|
|
71
|
+
runArgs: {
|
|
72
|
+
$ref: string;
|
|
73
|
+
};
|
|
74
|
+
mergeStrategy: {
|
|
75
|
+
type: string;
|
|
76
|
+
enum: string[];
|
|
77
|
+
};
|
|
78
|
+
mergeArgs: {
|
|
79
|
+
$ref: string;
|
|
80
|
+
};
|
|
81
|
+
stage: {
|
|
82
|
+
type: string;
|
|
83
|
+
minimum: number;
|
|
84
|
+
maximum: number;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
required: string[];
|
|
88
|
+
};
|
|
89
|
+
"model-list": {
|
|
90
|
+
anyOf: ({
|
|
91
|
+
$ref: string;
|
|
92
|
+
type?: undefined;
|
|
93
|
+
items?: undefined;
|
|
94
|
+
} | {
|
|
95
|
+
type: string;
|
|
96
|
+
items: {
|
|
97
|
+
$ref: string;
|
|
98
|
+
};
|
|
99
|
+
$ref?: undefined;
|
|
100
|
+
})[];
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
properties: {
|
|
104
|
+
models: {
|
|
105
|
+
type: string;
|
|
106
|
+
items: {
|
|
107
|
+
$ref: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
required: string[];
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Either a node type, in which case the bundled configuration is used, or a configuration to validate.
|
|
115
|
+
*/
|
|
116
|
+
export type configOrNodeType = allowedType | IOrchestratorConfig;
|
|
2
117
|
/**
|
|
3
118
|
* Use inter-dependencies to detect models that are in the wrong order.
|
|
4
119
|
*
|
|
5
|
-
* @param
|
|
120
|
+
* @param config Cycle, Site, or ImpactAssessment to use the bundled configuration, or a configuration itself.
|
|
6
121
|
* @returns List of models that have dependencies that could not be found prior to running.
|
|
7
122
|
*/
|
|
8
|
-
export declare const validateConfigOrder: (
|
|
123
|
+
export declare const validateConfigOrder: (config: configOrNodeType) => {
|
|
9
124
|
model: IOrchestratorModelConfig;
|
|
10
125
|
existing: string[];
|
|
11
126
|
missing: string[];
|
|
@@ -14,6 +129,6 @@ export declare const validateConfigOrder: (nodeType: allowedType) => {
|
|
|
14
129
|
* Detect multiple models running in parallel when they should not.
|
|
15
130
|
* Note: we use the `mergeArgs` to handle special cases when multiple identical models CAN run in parallel
|
|
16
131
|
*
|
|
17
|
-
* @param
|
|
132
|
+
* @param config Cycle, Site, or ImpactAssessment to use the bundled configuration, or a configuration itself.
|
|
18
133
|
*/
|
|
19
|
-
export declare const validateConfigDuplicates: (
|
|
134
|
+
export declare const validateConfigDuplicates: (config: configOrNodeType) => IOrchestratorModelConfig[];
|
package/esm/validate-config.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { loadConfig } from './config';
|
|
2
2
|
import { findMatchingModelFromConfig } from './utils';
|
|
3
|
+
import * as schema from '../config/config-schema.json';
|
|
4
|
+
/**
|
|
5
|
+
* JSON Schema (draft-07) describing an orchestrator configuration file.
|
|
6
|
+
* Note: it uses no external `$ref` and no `format` keyword, so it compiles with any ajv version.
|
|
7
|
+
*/
|
|
8
|
+
export const configSchema = schema;
|
|
9
|
+
const resolveConfig = (config) => typeof config === 'string' ? loadConfig(config) : config;
|
|
3
10
|
// models not included in the links
|
|
4
11
|
const skipModels = ['emissions.deleted', 'transformations'];
|
|
5
12
|
const isHestiaResidueCyclicModel = ({ model, value }) => model === 'hestia' && (value === null || value === void 0 ? void 0 : value.startsWith('residue'));
|
|
@@ -34,13 +41,12 @@ const matchDependencies = (models) => (model) => {
|
|
|
34
41
|
/**
|
|
35
42
|
* Use inter-dependencies to detect models that are in the wrong order.
|
|
36
43
|
*
|
|
37
|
-
* @param
|
|
44
|
+
* @param config Cycle, Site, or ImpactAssessment to use the bundled configuration, or a configuration itself.
|
|
38
45
|
* @returns List of models that have dependencies that could not be found prior to running.
|
|
39
46
|
*/
|
|
40
|
-
export const validateConfigOrder = (
|
|
41
|
-
const config = loadConfig(nodeType);
|
|
47
|
+
export const validateConfigOrder = (config) => {
|
|
42
48
|
// flatten all models to process one by one, starting with the last one
|
|
43
|
-
const models = config.models.flat();
|
|
49
|
+
const models = resolveConfig(config).models.flat();
|
|
44
50
|
const results = models.filter(includeModel).map(matchDependencies(models));
|
|
45
51
|
return results.filter((r) => r.missing.length > 0);
|
|
46
52
|
};
|
|
@@ -54,12 +60,11 @@ const findDuplicatedConfigs = (models) => {
|
|
|
54
60
|
* Detect multiple models running in parallel when they should not.
|
|
55
61
|
* Note: we use the `mergeArgs` to handle special cases when multiple identical models CAN run in parallel
|
|
56
62
|
*
|
|
57
|
-
* @param
|
|
63
|
+
* @param config Cycle, Site, or ImpactAssessment to use the bundled configuration, or a configuration itself.
|
|
58
64
|
*/
|
|
59
|
-
export const validateConfigDuplicates = (
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
.map((value) => (Array.isArray(value) ? findDuplicatedConfigs(value) : []))
|
|
65
|
+
export const validateConfigDuplicates = (config) => {
|
|
66
|
+
const duplicates = resolveConfig(config)
|
|
67
|
+
.models.map((value) => Array.isArray(value) ? findDuplicatedConfigs(value) : [])
|
|
63
68
|
.flat(2);
|
|
64
69
|
return duplicates;
|
|
65
70
|
};
|
package/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ENGINE_VERSION = "0.87.
|
|
1
|
+
export declare const ENGINE_VERSION = "0.87.3";
|
package/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ENGINE_VERSION = '0.87.
|
|
1
|
+
export const ENGINE_VERSION = '0.87.3';
|
package/formulas/index.json
CHANGED
|
@@ -3404,22 +3404,22 @@
|
|
|
3404
3404
|
],
|
|
3405
3405
|
"hestia_earth/models/ipcc2019/no3ToGroundwaterExcreta.md": [
|
|
3406
3406
|
{
|
|
3407
|
-
"formula": "NO_3 =
|
|
3407
|
+
"formula": "NO_3 = (N_{prp} + N_{oem}) \\times \\frac{62}{14}",
|
|
3408
3408
|
"bindings": [
|
|
3409
3409
|
{
|
|
3410
3410
|
"symbol": "NO_3",
|
|
3411
|
-
"description": "nitrate leached to groundwater (kg NO<sub>3</sub>)",
|
|
3411
|
+
"description": "total nitrate leached to groundwater (kg NO<sub>3</sub>)",
|
|
3412
3412
|
"key": "value"
|
|
3413
3413
|
},
|
|
3414
3414
|
{
|
|
3415
|
-
"symbol": "
|
|
3416
|
-
"description": "nitrogen from
|
|
3417
|
-
"key": "
|
|
3415
|
+
"symbol": "N_{prp}",
|
|
3416
|
+
"description": "nitrogen leached to groundwater from excreta left on pasture (kg NO<sub>3</sub>-N)",
|
|
3417
|
+
"key": "n_prp"
|
|
3418
3418
|
},
|
|
3419
3419
|
{
|
|
3420
|
-
"symbol": "
|
|
3421
|
-
"description": "
|
|
3422
|
-
"key": "
|
|
3420
|
+
"symbol": "N_{oem}",
|
|
3421
|
+
"description": "nitrogen leached to groundwater from other excreta management systems (kg NO<sub>3</sub>-N)",
|
|
3422
|
+
"key": "n_oem"
|
|
3423
3423
|
},
|
|
3424
3424
|
{
|
|
3425
3425
|
"symbol": "\\frac{62}{14}",
|
|
@@ -3427,6 +3427,61 @@
|
|
|
3427
3427
|
"constant": ""
|
|
3428
3428
|
}
|
|
3429
3429
|
]
|
|
3430
|
+
},
|
|
3431
|
+
{
|
|
3432
|
+
"formula": "N_{prp} = N_{excreta} \\times Frac_{LEACH} \\times Frac_{prp}",
|
|
3433
|
+
"bindings": [
|
|
3434
|
+
{
|
|
3435
|
+
"symbol": "N_{prp}",
|
|
3436
|
+
"description": "nitrogen leached to groundwater from excreta left on pasture (kg NO<sub>3</sub>-N)"
|
|
3437
|
+
},
|
|
3438
|
+
{
|
|
3439
|
+
"symbol": "N_{excreta}",
|
|
3440
|
+
"description": "nitrogen from animal excreta inputs (kg N)",
|
|
3441
|
+
"key": "n_total"
|
|
3442
|
+
},
|
|
3443
|
+
{
|
|
3444
|
+
"symbol": "Frac_{LEACH}",
|
|
3445
|
+
"description": "fraction of nitrogen lost through leaching",
|
|
3446
|
+
"key": "frachLeach"
|
|
3447
|
+
},
|
|
3448
|
+
{
|
|
3449
|
+
"symbol": "Frac_{prp}",
|
|
3450
|
+
"description": "fraction of animal excreta left on pasture",
|
|
3451
|
+
"key": "frac_prp"
|
|
3452
|
+
}
|
|
3453
|
+
]
|
|
3454
|
+
},
|
|
3455
|
+
{
|
|
3456
|
+
"formula": "N_{oem} = \\frac{\\sum_{e=1}^{E} N_e \\times EF_e}{E} \\times Frac_{oem}",
|
|
3457
|
+
"bindings": [
|
|
3458
|
+
{
|
|
3459
|
+
"symbol": "N_{oem}",
|
|
3460
|
+
"description": "nitrogen leached to groundwater from other excreta management systems (kg NO<sub>3</sub>-N)"
|
|
3461
|
+
},
|
|
3462
|
+
{
|
|
3463
|
+
"symbol": "E",
|
|
3464
|
+
"description": "Number of excreta types",
|
|
3465
|
+
"key": "n_excreta_types"
|
|
3466
|
+
},
|
|
3467
|
+
{
|
|
3468
|
+
"symbol": "N_e",
|
|
3469
|
+
"description": "nitrogen from animal excreta input $e$ (kg N)",
|
|
3470
|
+
"key": "n_totals",
|
|
3471
|
+
"column": "excreta_id"
|
|
3472
|
+
},
|
|
3473
|
+
{
|
|
3474
|
+
"symbol": "EF_e",
|
|
3475
|
+
"description": "emission factor for animal excreta input $e$ (kg NO<sub>3</sub>-N / kg N)",
|
|
3476
|
+
"key": "average_emission_factors",
|
|
3477
|
+
"column": "excreta_id"
|
|
3478
|
+
},
|
|
3479
|
+
{
|
|
3480
|
+
"symbol": "Frac_{oem}",
|
|
3481
|
+
"description": "fraction of animal excreta left on pasture",
|
|
3482
|
+
"key": "frac_oem"
|
|
3483
|
+
}
|
|
3484
|
+
]
|
|
3430
3485
|
}
|
|
3431
3486
|
],
|
|
3432
3487
|
"hestia_earth/models/ipcc2019/no3ToGroundwaterInorganicFertiliser.md": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hestia-earth/engine-models",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.3",
|
|
4
4
|
"description": "HESTIA Engine Models",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"test": "jest --coverage",
|
|
39
39
|
"test:jsonld": "hestia-validate-jsonld tests/fixtures",
|
|
40
40
|
"test:terms": "node scripts/validate-terms-models.js && hestia-validate-terms tests/fixtures",
|
|
41
|
-
"validate:config": "ajv validate -s
|
|
41
|
+
"validate:config": "ajv validate -s config/config-schema.json -d config/Cycle.json -d config/ImpactAssessment.json -d config/Site.json",
|
|
42
42
|
"validate:models": "node scripts/validate-models-schema.js",
|
|
43
43
|
"validate:docs": "node scripts/validate-documentation.js",
|
|
44
44
|
"validate:formula-coverage": "node scripts/formula-coverage.js",
|