@hestia-earth/engine-models 0.87.1 → 0.87.4
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/README.md +4 -0
- package/formulas/index.json +4 -4
- package/model-links.json +100 -2090
- 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.4";
|
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.4";
|
package/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ENGINE_VERSION = '0.87.
|
|
1
|
+
export const ENGINE_VERSION = '0.87.4';
|
package/formulas/README.md
CHANGED
|
@@ -217,3 +217,7 @@ Where:
|
|
|
217
217
|
bound symbol is not in the formula or a symbol is bound twice. It warns (without
|
|
218
218
|
failing) when there is no `` `[value]` `` result, several results, or a key is not
|
|
219
219
|
found in the sibling `.py` — a hint that the value is logged via a shared util.
|
|
220
|
+
|
|
221
|
+
## Delimiters
|
|
222
|
+
|
|
223
|
+
The guide renders formulas with `marked-katex-extension`, whose tokenizer only picks up an inline `$...$` when the opening `$` starts the line or follows a space, and the closing `$` ends the line or is followed by a space or one of `?!.,:`. `($x$)` fails both and renders as literal `$x$` on the page, with no error anywhere — so write `( $x$ )`, or reword. `scripts/validate-katex.js` checks every model doc for this on every build.
|
package/formulas/index.json
CHANGED
|
@@ -2184,7 +2184,7 @@
|
|
|
2184
2184
|
"bindings": [
|
|
2185
2185
|
{
|
|
2186
2186
|
"symbol": "E_{CH4}",
|
|
2187
|
-
"description": "Methane emissions
|
|
2187
|
+
"description": "Methane emissions, in kg $CH_4$.",
|
|
2188
2188
|
"key": "value"
|
|
2189
2189
|
},
|
|
2190
2190
|
{
|
|
@@ -2199,7 +2199,7 @@
|
|
|
2199
2199
|
},
|
|
2200
2200
|
{
|
|
2201
2201
|
"symbol": "55.65",
|
|
2202
|
-
"description": "The energy content of methane
|
|
2202
|
+
"description": "The energy content of methane, in MJ/kg $CH_4$.",
|
|
2203
2203
|
"constant": ""
|
|
2204
2204
|
}
|
|
2205
2205
|
]
|
|
@@ -5721,12 +5721,12 @@
|
|
|
5721
5721
|
},
|
|
5722
5722
|
{
|
|
5723
5723
|
"symbol": "C_{resp}",
|
|
5724
|
-
"description": "is the carbon lost via respiration, in kg C per Cycle
|
|
5724
|
+
"description": "is the carbon lost via respiration, in kg C per Cycle, equal to $C_{harvest}$.",
|
|
5725
5725
|
"key": "c_resp"
|
|
5726
5726
|
},
|
|
5727
5727
|
{
|
|
5728
5728
|
"symbol": "C_{excr}",
|
|
5729
|
-
"description": "is the carbon in excreta, in kg C per Cycle
|
|
5729
|
+
"description": "is the carbon in excreta, in kg C per Cycle, half the value of $C_{harvest}$.",
|
|
5730
5730
|
"key": "c_excr"
|
|
5731
5731
|
},
|
|
5732
5732
|
{
|