tpmkms_4wp 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.
@@ -3,15 +3,20 @@ const { defaultContextCheck } = require('./helpers')
3
3
  const dialogues = require('./dialogues.js')
4
4
  const pos = require('./pos.js')
5
5
  const math = require('./math.js')
6
- const formulasTemplate = require('./formulasTemplate.js')
6
+ const hierarchy = require('./hierarchy.js')
7
+ const comparable = require('./comparable.js')
8
+ const countable = require('./countable.js')
7
9
  const { API, getVariables, solveFor } = require('./helpers/formulas.js')
8
- const formulas_tests = require('./formulas.test.json')
10
+ const tests = require('./formulas.test.json')
11
+ const instance = require('./formulas.instance.json')
9
12
 
13
+ /*
10
14
  const template = {
11
15
  queries: [
12
16
  // { query: "x equals y + 4", development: true },
13
17
  ]
14
18
  }
19
+ */
15
20
  /* TODO
16
21
  10 feet in inches -> 1 foot equals 12 inches => 120 inches
17
22
 
@@ -180,11 +185,18 @@ let configStruct = {
180
185
  ]
181
186
  };
182
187
 
188
+ const template = {
189
+ queries: [
190
+ "formulas are concepts",
191
+ configStruct,
192
+ ]
193
+ }
194
+
183
195
  const createConfig = () => {
184
196
  const api = new API()
185
- config = new Config(configStruct, module)
197
+ config = new Config({ name: 'formulas' }, module)
186
198
  config.stop_auto_rebuild()
187
- config.add(dialogues(), pos(), math(), formulasTemplate())
199
+ config.add(dialogues(), pos(), math(), hierarchy(), comparable(), countable())
188
200
  config.api = api
189
201
  config.restart_auto_rebuild()
190
202
  return config
@@ -194,9 +206,10 @@ knowledgeModule({
194
206
  module,
195
207
  description: 'Formulas using math',
196
208
  createConfig,
209
+ template: { template, instance },
197
210
  test: {
198
211
  name: './formulas.test.json',
199
- contents: formulas_tests,
212
+ contents: tests,
200
213
  checks: {
201
214
  objects: ['formulas'],
202
215
  context: defaultContextCheck,