datagrok-tools 6.3.0 → 6.3.2
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/CHANGELOG.md +6 -0
- package/bin/commands/stress-tests.js +7 -7
- package/package.json +1 -1
- package/plugins/func-gen-plugin.js +13 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Datagrok-tools changelog
|
|
2
2
|
|
|
3
|
+
## 6.3.2 (2026-06-15)
|
|
4
|
+
|
|
5
|
+
* `func-gen` webpack plugin — generated RichFunctionView model inputs now use the script-form names (argument bounds/step `_t0`/`_t1`/`_h`, loop count `_count`) instead of the deprefixed forms, so the run, fitting, and sensitivity-analysis paths share one set of input names with diff-grok's pipeline. Fixes `Inconsistent inputs: "_t0" is missing` when starting fitting/SA from a Rich Function View.
|
|
6
|
+
* `func-gen` webpack plugin — the generated RichFunctionView model output annotation appends the `DiffStudio Facet` viewer (last), alongside Grid and Line chart.
|
|
7
|
+
* `grok stresstest` — run the ApiTests Node test runner directly via tsx (`src/package-test-node.ts`) instead of a compiled `dist-node` bundle; dropped the obsolete `npm run build-node` step and the `tsconfig-paths-bootstrap.js` / `dist-node` invocation.
|
|
8
|
+
|
|
3
9
|
## 6.3.0 (2026-06-12)
|
|
4
10
|
|
|
5
11
|
* `func-gen` webpack plugin — generates RichFunctionView model wrappers from Diff Studio `#meta.role: model` `.ivp` files. Inputs/output are derived from the parsed IVP, `#meta.icon` becomes the model icon, and `#meta.inputs` lookups are emitted as real `propagateChoice: all` inputs (rendered natively by the Rich Function View, unlike `meta.inputs`). Ships a prebuilt, tree-shaken CJS bundle of diff-grok's IVP parser (`plugins/ivp-parser.bundle.cjs`); regenerate with `npm run update:ivp-parser`.
|
|
@@ -8,7 +8,6 @@ exports.stressTests = stressTests;
|
|
|
8
8
|
var _fs = _interopRequireDefault(require("fs"));
|
|
9
9
|
var _child_process = require("child_process");
|
|
10
10
|
var _path = _interopRequireDefault(require("path"));
|
|
11
|
-
var utils = _interopRequireWildcard(require("../utils/utils"));
|
|
12
11
|
var _testUtils = _interopRequireWildcard(require("../utils/test-utils"));
|
|
13
12
|
var testUtils = _testUtils;
|
|
14
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -32,9 +31,6 @@ async function stressTests(args) {
|
|
|
32
31
|
}
|
|
33
32
|
const config = (0, _testUtils.getDevKey)(args.host);
|
|
34
33
|
await testUtils.loadPackage('', 'ApiTests', args.host, args['skip-publish'], args['skip-build'], false, true);
|
|
35
|
-
process.stdout.write(`Building node...`);
|
|
36
|
-
await utils.runScript(`npm run build-node`, '');
|
|
37
|
-
process.stdout.write(` success!\n`);
|
|
38
34
|
try {
|
|
39
35
|
await run(config, args);
|
|
40
36
|
return true;
|
|
@@ -45,9 +41,13 @@ async function stressTests(args) {
|
|
|
45
41
|
}
|
|
46
42
|
async function run(config, args) {
|
|
47
43
|
const processArgs = [];
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
processArgs.push('
|
|
44
|
+
// Run the TypeScript runner directly via tsx (no build step); the asset/dayjs shims
|
|
45
|
+
// in node-test-loader let the browser-oriented sources load under Node.
|
|
46
|
+
processArgs.push('--import');
|
|
47
|
+
processArgs.push('tsx');
|
|
48
|
+
processArgs.push('--import');
|
|
49
|
+
processArgs.push('./node-test-loader/register.mjs');
|
|
50
|
+
processArgs.push('src/package-test-node.ts');
|
|
51
51
|
processArgs.push(`--apiUrl=${config.url}`);
|
|
52
52
|
processArgs.push(`--devKey=${config.key}`);
|
|
53
53
|
if (args["concurrent-runs"]) processArgs.push(`--concurrentRuns=${args["concurrent-runs"]}`);
|
package/package.json
CHANGED
|
@@ -48,28 +48,32 @@ function preparseIvpModel(parser, text) {
|
|
|
48
48
|
}
|
|
49
49
|
if (!ivp || !ivp.name) return null;
|
|
50
50
|
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
// when forwarding values to `runDiffStudioModel`.
|
|
51
|
+
// Input names use the script-form names (arg bounds/step `_`-prefixed, loop count `_count`) so the
|
|
52
|
+
// run path, the diff-grok fitting/SA pipeline, and `propagateChoice` lookups all agree on one set
|
|
53
|
+
// of names. `scriptKey` mirrors `name`; it is kept only for the value-forwarding map below.
|
|
55
54
|
const mk = (type, name, scriptKey, input) =>
|
|
56
55
|
({tsType: 'number', name, scriptKey,
|
|
57
56
|
annotation: `//input: ${type} ${name} = ${input.value} ${input.annot ?? ''}`.trim()});
|
|
58
57
|
|
|
59
58
|
const inputs = [];
|
|
60
59
|
const a = ivp.arg.name;
|
|
61
|
-
if (ivp.loop) inputs.push(mk('int', '
|
|
62
|
-
inputs.push(mk('double',
|
|
63
|
-
inputs.push(mk('double',
|
|
64
|
-
inputs.push(mk('double', '
|
|
60
|
+
if (ivp.loop) inputs.push(mk('int', '_count', '_count', ivp.loop.count));
|
|
61
|
+
inputs.push(mk('double', `_${a}0`, `_${a}0`, ivp.arg.initial));
|
|
62
|
+
inputs.push(mk('double', `_${a}1`, `_${a}1`, ivp.arg.final));
|
|
63
|
+
inputs.push(mk('double', '_h', '_h', ivp.arg.step));
|
|
65
64
|
for (const [k, v] of ivp.inits) inputs.push(mk('double', k, k, v));
|
|
66
65
|
if (ivp.params) for (const [k, v] of ivp.params) inputs.push(mk('double', k, k, v));
|
|
67
66
|
|
|
68
67
|
const cols = ivp.outputs ? ivp.outputs.size : ivp.inits.size;
|
|
69
68
|
const multiAxis = cols > MAX_LINE_CHART - 1 ? 'true' : 'false';
|
|
70
69
|
const segments = ivp.updates ? ` segmentColumnName: "${STAGE_COL_NAME}",` : '';
|
|
70
|
+
// The 'DiffStudio Facet' viewer (one line chart per variable) is appended last; it resolves
|
|
71
|
+
// only when the DiffStudio package is installed, so Grid / Line chart remain the always-available
|
|
72
|
+
// viewers for packages that ship `.ivp` models without depending on DiffStudio.
|
|
73
|
+
const facetSegment = ivp.updates ? `, segmentColumnName: "${STAGE_COL_NAME}"` : '';
|
|
71
74
|
const viewer = `Grid(block: 100) | Line chart(block: 100, multiAxis: "${multiAxis}",${segments} ` +
|
|
72
|
-
`multiAxisLegendPosition: "RightCenter", autoLayout: "false", showAggrSelectors: "false")
|
|
75
|
+
`multiAxisLegendPosition: "RightCenter", autoLayout: "false", showAggrSelectors: "false")` +
|
|
76
|
+
` | DiffStudio Facet(block: 100${facetSegment})`;
|
|
73
77
|
const outputAnnotation = `//output: dataframe df {caption: ${ivp.name}; viewer: ${viewer}}`;
|
|
74
78
|
|
|
75
79
|
const metas = {runOnOpen: 'true', runOnInput: 'true', features: '{"sens-analysis": true, "fitting": true}'};
|