ekms 7.12.8-beta.0 → 7.12.8-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/common/dimension.instance.json +736 -62
- package/common/dimension.js +15 -7
- package/common/formulas.instance.json +992 -0
- package/common/formulas.js +18 -5
- package/common/length.instance.json +141 -445
- package/common/pipboy.instance.json +23454 -1101
- package/common/pipboy.js +31 -4
- package/common/pressure.instance.json +48 -0
- package/common/temperature.instance.json +48 -0
- package/common/weight.instance.json +144 -0
- package/main.js +0 -6
- package/package.json +4 -16
- package/common/dimensionTemplate.instance.json +0 -582
- package/common/dimensionTemplate.js +0 -35
- package/common/dimensionTemplate.test.json +0 -2
- package/common/formulasTemplate.instance.json +0 -483
- package/common/formulasTemplate.js +0 -30
- package/common/formulasTemplate.test.json +0 -2
- package/common/pipboyTemplate.instance.json +0 -17420
- package/common/pipboyTemplate.js +0 -48
- package/common/pipboyTemplate.test.json +0 -2
package/common/dimension.js
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
const { Config, knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
|
-
const
|
3
|
+
const hierarchy = require('./hierarchy.js')
|
4
4
|
const formulas = require('./formulas.js')
|
5
5
|
const testing = require('./testing.js')
|
6
|
-
const
|
6
|
+
const tests = require('./dimension.test.json')
|
7
|
+
const instance = require('./dimension.instance.json')
|
7
8
|
|
8
9
|
/*
|
9
10
|
x celcius equals x*9/5 + 32 fahrenheit
|
@@ -166,10 +167,17 @@ let configStruct = {
|
|
166
167
|
]
|
167
168
|
};
|
168
169
|
|
170
|
+
const template = {
|
171
|
+
queries: [
|
172
|
+
"dimension and unit are concepts",
|
173
|
+
configStruct,
|
174
|
+
],
|
175
|
+
}
|
176
|
+
|
169
177
|
const createConfig = () => {
|
170
|
-
const config = new Config(
|
178
|
+
const config = new Config({ name: 'dimension' }, module)
|
171
179
|
config.stop_auto_rebuild()
|
172
|
-
config.add(
|
180
|
+
config.add(hierarchy(), formulas(), testing())
|
173
181
|
config.api = api
|
174
182
|
config.restart_auto_rebuild()
|
175
183
|
return config
|
@@ -179,15 +187,15 @@ knowledgeModule({
|
|
179
187
|
module,
|
180
188
|
description: 'Used to define numeric temperature such as currency, temperature or weight',
|
181
189
|
createConfig,
|
190
|
+
template: { template, instance },
|
182
191
|
test: {
|
183
192
|
name: './dimension.test.json',
|
184
|
-
contents:
|
193
|
+
contents: tests,
|
185
194
|
checks: {
|
186
195
|
objects: [{ km: 'properties' }],
|
187
196
|
checks: {
|
188
197
|
context: defaultContextCheck,
|
189
198
|
},
|
190
|
-
|
191
|
-
}
|
199
|
+
},
|
192
200
|
},
|
193
201
|
})
|