@datagrok/curves 1.13.4 → 1.14.0

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/.grokignore ADDED
@@ -0,0 +1,2 @@
1
+ # Not needed on the server: the BDD suite, its filmed guides and its run artifacts
2
+ bdd/
@@ -1,5 +1,5 @@
1
1
 
2
- > @datagrok/curves@1.13.4 build /home/runner/work/public/public/packages/Curves
2
+ > @datagrok/curves@1.14.0 build /home/runner/work/public/public/packages/Curves
3
3
  > grok build
4
4
 
5
5
  Curves warnings
@@ -7,11 +7,11 @@ Curves warnings
7
7
  Unknown header tag: the round trip this work exists for In the file: src/tests/panel-renderer-tests.ts.
8
8
  WARNING in ⚠ asset size limit: The following asset(s) exceed the recommended size limit (244.141 KiB). This can impact web performance.
9
9
  │ Assets:
10
- │ package-test.js (350.910 KiB)
10
+ │ package-test.js (353.338 KiB)
11
11
 
12
12
  WARNING in ⚠ entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244.141 KiB). This can impact web performance.
13
13
  │ Entrypoints:
14
- │ test (350.910 KiB)
14
+ │ test (353.338 KiB)
15
15
  │ package-test.js
16
16
 
17
17
  WARNING in ⚠ Rspack performance recommendations:
@@ -19,4 +19,4 @@ WARNING in ⚠ Rspack performance recommendations:
19
19
  │ For more info visit https://rspack.rs/guide/optimization/code-splitting
20
20
 
21
21
  Rspack compiled with 3 warnings
22
- bundled Curves in 1.1s 191 KB
22
+ bundled Curves in 0.8s 191 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Curves changelog
2
2
 
3
+ ## 1.14.0 (2026-11-27)
4
+
5
+ * core#1765: Detectors: Declared the column types the semantic type detectors check, so the platform no longer calls them for other columns
6
+ * Fit: 4PL dose-response curves (the default of Data to Curves) fit their Hill slope instead of staying near the -10 they started from (statistics library)
7
+ * Tests: Added the package test of Data to Curves: wells grouped into one curve per compound, assay, target and run, with each curve's and each group's maximum inhibition
8
+
3
9
  ## 1.13.4 (2026-11-05)
4
10
 
5
11
  * Dependencies: Pinned `uuid` to ^11.1.1 through `overrides`, so the `uuid` 8.3.2 that exceljs 4.4.0 brings is no longer resolved (GHSA-w5hq-g745-h8pq)
@@ -26,9 +26,3 @@ export const addWideViewer = Given('user adds a MultiCurveViewer viewer of the s
26
26
  await page.locator('[name="viewer-MultiCurveViewer"]').filter({visible: true}).first().waitFor();
27
27
  }, {tier: 'api', description: 'a multi curve viewer on the current table, docked to the right of the grid at that share of the view; silent in a guide'});
28
28
 
29
- /* A grid cell draws a legend only from 325 x 275 px inside its 6 px margin, wider than a grid makes a
30
- column by default; no library step sets a grid column's width. */
31
- export const columnWidth = Given('the {string} column of the grid is {int} px wide', async (page: Page, column: string, width: number) => {
32
- silent(page);
33
- await page.evaluate(([name, w]) => { grok.shell.tv.grid.columns.byName(name).width = w; }, [column, width] as [string, number]);
34
- }, {tier: 'api', description: 'the width of one column of the current table view\'s grid; silent in a guide'});
@@ -2,11 +2,10 @@
2
2
 
3
3
  ## Resolved
4
4
 
5
- - **Multi curve viewer readings** (2026-10-18): `getWidgetStatus()` reports `curves`, `legend shown`, `legend corner`, `legend rows`, `legend row N`, `legend shortened rows`, `legend hidden` and a `legend row N` / `shortened legend row N` / `legend more` area per legend row, with `isRenderPending` and `onRendered`; `multi-curve-viewer` and the `curves-legend` guide claim them.
6
- - **The axes of the Multi curve viewer** (GROK-20661): `getWidgetStatus()` lays the chart out as the render does
7
- (`FitChartCellRenderer.layOutChart`) and reports `x range`, `y range` and `points outside the axes`; the feature
8
- claims every point inside them with all five columns, the package test a cell's declared range not narrowing
9
- the overlay.
5
+ - **Multi curve viewer readings** (2026-10-18) and **its axes** (GROK-20661): `getWidgetStatus()` reports the curves,
6
+ the legend and `x range` / `y range` / `points outside the axes`; `multi-curve-viewer` and `curves-legend` claim them.
7
+ - **core#1246** (Data to Curves missing from the table view's Data menu): fixed in core (`table_view.dart` `fillMenu`
8
+ takes functions with `requiresTableView`); `data-to-curves.feature` picks it from the menu.
10
9
 
11
10
  ## Still open
12
11
 
@@ -14,5 +13,8 @@ Nothing planned.
14
13
 
15
14
  ## Won't do
16
15
 
17
- - **Curve cell readings in the grid and in Context Panel > Chart**: what a curve cell draws is the renderer's (ruling of 2026-10-06); the package tests it (legend-tests, panel-renderer-tests, converter-tests).
18
- - **Points as hit areas in a cell** (outlier toggling, curves-statistics.md scenario 4): renderer drawing again, covered by the package tests, not a feature (ruling of 2026-10-06).
16
+ - **Curve cell readings in the grid and in Context Panel > Chart, points as hit areas in a cell**: what a renderer
17
+ draws, the package tests (legend-tests, panel-renderer-tests, converter-tests); ruling of 2026-10-06.
18
+ - **public#4294** (a new Multi curve viewer's Show Legend and legend): the `curves-legend` guide claims both.
19
+ - **Data to Curves**: what each Fitted Curves row holds (group, run, maximum inhibition) is the package test 'Data to
20
+ Curves'; the other prefilled roles are one name rule; the Parent Table side is the converter's.
@@ -0,0 +1,50 @@
1
+ @realizes:core#1246
2
+ Feature: Data to Curves turns a table of wells into a table of fitted curves, one per compound, assay, target and run
3
+ Data | Curves | Data to Curves opens the Data to Curves dialog over the current table (the Well Table): a column
4
+ picker per role — Assay Name, Batch ID, Run ID, Concentration, Readout, Compound ID, Target Entity, Outliers —
5
+ each prefilled from a column whose name says it ("concentration", "inhibition", "batch" and "id", ...), and an
6
+ optional Parent Table. OK groups the wells by compound, assay, target and run and opens a "Fitted Curves" table
7
+ view: a row per curve with its "Fitted Curve" cell (semantic type fit), with the curves in a trellis of Multi
8
+ curve viewers and a Multi curve viewer of the selected curves. No help page covers the dialog; the claims follow
9
+ Curves `src/fit/data-to-curves.ts` (`dataToCurvesUI`). The table view's Data menu offers the command since
10
+ core#1246 (it takes no table input).
11
+
12
+ The wells are written here: compound C1 measured in runs R1 and R2, C2 in R1, four concentrations each, so
13
+ there are three curves. Left out on purpose:
14
+ - what each curve row holds (its group, run, maximum inhibition) is the Curves package test 'Data to Curves'; the
15
+ fitted parameters are the fit engine's tests (`libraries/statistics`); what a curve cell draws is its renderer's;
16
+ - the other prefilled roles (the same name rule), the Parent Table side and the JOIN / ON pair;
17
+ - the dialog's history (the last columns picked come back) is the platform's dialog history.
18
+ Nothing is put on the server.
19
+
20
+ Background:
21
+ Given user is logged in
22
+ And the package autostarts have completed
23
+ And user opens a table "wells" with:
24
+ | compound_id | assay_name | target_entity | batch_id | run_id | concentration_uM | inhibition |
25
+ | C1 | A | T | B1 | R1 | 0.1 | 5 |
26
+ | C1 | A | T | B1 | R1 | 1 | 20 |
27
+ | C1 | A | T | B1 | R1 | 10 | 60 |
28
+ | C1 | A | T | B1 | R1 | 100 | 95 |
29
+ | C1 | A | T | B1 | R2 | 0.1 | 4 |
30
+ | C1 | A | T | B1 | R2 | 1 | 25 |
31
+ | C1 | A | T | B1 | R2 | 10 | 55 |
32
+ | C1 | A | T | B1 | R2 | 100 | 90 |
33
+ | C2 | A | T | B2 | R1 | 0.1 | 2 |
34
+ | C2 | A | T | B2 | R1 | 1 | 10 |
35
+ | C2 | A | T | B2 | R1 | 10 | 30 |
36
+ | C2 | A | T | B2 | R1 | 100 | 50 |
37
+
38
+ Scenario: The Data menu opens the dialog with the roles prefilled from the column names, and OK opens the Fitted Curves view
39
+ When user picks "Data > Curves > Data to Curves" from the top menu
40
+ Then "Data to Curves" dialog should be visible
41
+ And Concentration input in "Data to Curves" dialog should contain text "concentration_uM"
42
+ And Readout input in "Data to Curves" dialog should contain text "inhibition"
43
+ When user clicks on OK button in "Data to Curves" dialog
44
+ Then the open table views should be exactly "wells, Fitted Curves"
45
+ Given user switches to the "Fitted Curves" table view
46
+ Then the table should have 3 rows
47
+ And "Fitted Curve" column should have semantic type "fit"
48
+ And trellis plot viewer should be visible
49
+ And the open tableview should have 1 MultiCurveViewer viewer
50
+ And no errors should have been logged
@@ -0,0 +1,45 @@
1
+ /* eslint-disable max-len */
2
+ /* eslint-disable comma-spacing */
3
+ /* eslint-disable quotes */
4
+ /* ---
5
+ generated: features/data/data-to-curves.feature
6
+ generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
7
+ sub_features_covered: [core#1246]
8
+ --- */
9
+ import {test} from '@playwright/test';
10
+ import '../../bindings/curves.js';
11
+ import '@datagrok-libraries/bdd/bindings/common/kinds';
12
+ import '@datagrok-libraries/bdd/bindings/common/parameter-types';
13
+ import '@datagrok-libraries/bdd/bindings/platform/datasets';
14
+ import '@datagrok-libraries/bdd/bindings/platform/elements';
15
+ import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
16
+ import {clickOn, shouldBe, shouldContainText} from '@datagrok-libraries/bdd/bindings/common/steps';
17
+ import {columnSemType} from '@datagrok-libraries/bdd/bindings/platform/columns';
18
+ import {pickFromTopMenu} from '@datagrok-libraries/bdd/bindings/platform/commands';
19
+ import {rowCount} from '@datagrok-libraries/bdd/bindings/platform/data';
20
+ import {autostartsCompleted, openTableOf, switchTableView} from '@datagrok-libraries/bdd/bindings/platform/steps';
21
+ import {openTableViewsExactly} from '@datagrok-libraries/bdd/bindings/platform/workspace';
22
+ import {noErrors, viewerCount} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
23
+ import {el, feature} from '@datagrok-libraries/bdd/runtime';
24
+
25
+ test.describe("Data to Curves turns a table of wells into a table of fitted curves, one per compound, assay, target and run", () => {
26
+ const session = feature(test, "features/data/data-to-curves.feature", import.meta.url);
27
+ test("The Data menu opens the dialog with the roles prefilled from the column names, and OK opens the Fitted Curves view", {tag: ["@realizes:core#1246"]}, async ({browser}) => {
28
+ const page = await session.page(browser);
29
+ await session.step(21, "Given user is logged in", () => loggedIn(page));
30
+ await session.step(22, "And the package autostarts have completed", () => autostartsCompleted(page));
31
+ await session.step(23, "And user opens a table \"wells\" with:", () => openTableOf(page, "wells", [["compound_id","assay_name","target_entity","batch_id","run_id","concentration_uM","inhibition"],["C1","A","T","B1","R1","0.1","5"],["C1","A","T","B1","R1","1","20"],["C1","A","T","B1","R1","10","60"],["C1","A","T","B1","R1","100","95"],["C1","A","T","B1","R2","0.1","4"],["C1","A","T","B1","R2","1","25"],["C1","A","T","B1","R2","10","55"],["C1","A","T","B1","R2","100","90"],["C2","A","T","B2","R1","0.1","2"],["C2","A","T","B2","R1","1","10"],["C2","A","T","B2","R1","10","30"],["C2","A","T","B2","R1","100","50"]]), [["compound_id","assay_name","target_entity","batch_id","run_id","concentration_uM","inhibition"],["C1","A","T","B1","R1","0.1","5"],["C1","A","T","B1","R1","1","20"],["C1","A","T","B1","R1","10","60"],["C1","A","T","B1","R1","100","95"],["C1","A","T","B1","R2","0.1","4"],["C1","A","T","B1","R2","1","25"],["C1","A","T","B1","R2","10","55"],["C1","A","T","B1","R2","100","90"],["C2","A","T","B2","R1","0.1","2"],["C2","A","T","B2","R1","1","10"],["C2","A","T","B2","R1","10","30"],["C2","A","T","B2","R1","100","50"]]);
32
+ await session.step(39, "When user picks \"Data > Curves > Data to Curves\" from the top menu", () => pickFromTopMenu(page, "Data > Curves > Data to Curves"));
33
+ await session.step(40, "Then \"Data to Curves\" dialog should be visible", () => shouldBe(page, el("\"Data to Curves\" dialog"), "visible"));
34
+ await session.step(41, "And Concentration input in \"Data to Curves\" dialog should contain text \"concentration_uM\"", () => shouldContainText(page, el("Concentration input in \"Data to Curves\" dialog"), "concentration_uM"));
35
+ await session.step(42, "And Readout input in \"Data to Curves\" dialog should contain text \"inhibition\"", () => shouldContainText(page, el("Readout input in \"Data to Curves\" dialog"), "inhibition"));
36
+ await session.step(43, "When user clicks on OK button in \"Data to Curves\" dialog", () => clickOn(page, el("OK button in \"Data to Curves\" dialog")));
37
+ await session.step(44, "Then the open table views should be exactly \"wells, Fitted Curves\"", () => openTableViewsExactly(page, "wells, Fitted Curves"));
38
+ await session.step(45, "Given user switches to the \"Fitted Curves\" table view", () => switchTableView(page, "Fitted Curves"));
39
+ await session.step(46, "Then the table should have 3 rows", () => rowCount(page, 3));
40
+ await session.step(47, "And \"Fitted Curve\" column should have semantic type \"fit\"", () => columnSemType(page, "Fitted Curve", "fit"));
41
+ await session.step(48, "And trellis plot viewer should be visible", () => shouldBe(page, el("trellis plot viewer"), "visible"));
42
+ await session.step(49, "And the open tableview should have 1 MultiCurveViewer viewer", () => viewerCount(page, 1, "MultiCurveViewer"));
43
+ await session.step(50, "And no errors should have been logged", () => noErrors(page));
44
+ });
45
+ });
@@ -6,16 +6,17 @@ generated: features/guides/curves-legend-cells.feature
6
6
  generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
7
7
  --- */
8
8
  import {test} from '@playwright/test';
9
+ import '../../bindings/curves.js';
9
10
  import '@datagrok-libraries/bdd/bindings/common/kinds';
10
11
  import '@datagrok-libraries/bdd/bindings/common/parameter-types';
11
12
  import '@datagrok-libraries/bdd/bindings/platform/datasets';
12
13
  import '@datagrok-libraries/bdd/bindings/platform/elements';
13
- import {columnWidth} from '../../bindings/curves.js';
14
14
  import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
15
15
  import {check, expand, scrollIntoView, selectIn, shouldBe, shouldHaveValue, uncheck} from '@datagrok-libraries/bdd/bindings/common/steps';
16
16
  import {removeColumn} from '@datagrok-libraries/bdd/bindings/platform/data';
17
17
  import {contextPanelOpen, openDataset, simpleModeOff} from '@datagrok-libraries/bdd/bindings/platform/steps';
18
18
  import {clickArea, noErrors, setProperties} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
19
+ import {gridColumnWidth} from '@datagrok-libraries/bdd/bindings/tiers/viewers/widgets';
19
20
  import {ds, el, feature} from '@datagrok-libraries/bdd/runtime';
20
21
 
21
22
  test.describe("Show Legend of curves in grid cells is set for the table, a column or one cell", () => {
@@ -27,7 +28,7 @@ test.describe("Show Legend of curves in grid cells is set for the table, a colum
27
28
  await session.step(17, "And user opens assay-curves dataset", () => openDataset(page, ds("assay-curves")));
28
29
  await session.step(18, "And user removes \"Molecule\" column", () => removeColumn(page, "Molecule"));
29
30
  await session.step(19, "And user sets properties of grid:", () => setProperties(page, el("grid"), [["Row Height","290"],["Col Header Height","30"]]), [["Row Height","290"],["Col Header Height","30"]]);
30
- await session.step(22, "And the \"Fitted Curve\" column of the grid is 340 px wide", () => columnWidth(page, "Fitted Curve", 340));
31
+ await session.step(22, "And the \"Fitted Curve\" column of the grid is 340 px wide", () => gridColumnWidth(page, "Fitted Curve", 340));
31
32
  await session.step(23, "And the context panel is open", () => contextPanelOpen(page));
32
33
  await session.step(24, "When user clicks on the \"cell 1 of Fitted Curve\" area of grid", () => clickArea(page, "cell 1 of Fitted Curve", el("grid")));
33
34
  await session.step(25, "And user expands \"Options\" pane in context panel", () => expand(page, el("\"Options\" pane in context panel")));
package/detectors.js CHANGED
@@ -13,7 +13,7 @@ const likelyPNGColNames = ['image', 'png', 'thumbnail', 'img', 'glyph', 'icon',
13
13
  /// <reference path="../../globals.d.ts" />
14
14
  class CurvesPackageDetectors extends DG.Package {
15
15
  //meta.role: semTypeDetector
16
- //input: column col
16
+ //input: column col {type: string}
17
17
  //output: string semType
18
18
  detectXMLCurveChart(col) {
19
19
  if (DG.Detector.sampleCategories(col, (s) => s.startsWith('<chart>') && s.endsWith('</chart>'), 1)) {
@@ -26,7 +26,7 @@ class CurvesPackageDetectors extends DG.Package {
26
26
  }
27
27
 
28
28
  //meta.role: semTypeDetector
29
- //input: column col
29
+ //input: column col {type: string}
30
30
  //output: string semType
31
31
  detectFit(col) {
32
32
  if (DG.Detector.sampleCategories(col, (s) => {
@@ -39,7 +39,7 @@ class CurvesPackageDetectors extends DG.Package {
39
39
  }
40
40
 
41
41
  //meta.role: semTypeDetector
42
- //input: column col
42
+ //input: column col {type: string}
43
43
  //output: string semType
44
44
  detectPzfxCurveChart(col) {
45
45
  if (DG.Detector.sampleCategories(col, (s) => {
@@ -53,7 +53,7 @@ class CurvesPackageDetectors extends DG.Package {
53
53
  }
54
54
 
55
55
  //meta.role: semTypeDetector
56
- //input: column col
56
+ //input: column col {type: string}
57
57
  //output: string semType
58
58
  detectCompactDoseResponse(col) {
59
59
  if (DG.Detector.sampleCategories(col, (s) => {