Skip to content

Chem: add #meta.role: transform to stand-alone scripts for datasync support - #3945

Draft
Aleksashka11 wants to merge 3 commits into
masterfrom
grokky/fix-c04bf3ym6cf-1785227533-092579
Draft

Chem: add #meta.role: transform to stand-alone scripts for datasync support#3945
Aleksashka11 wants to merge 3 commits into
masterfrom
grokky/fix-c04bf3ym6cf-1785227533-092579

Conversation

@Aleksashka11

Copy link
Copy Markdown
Collaborator

Drafted by Grokky from a Slack thread.

Root cause: File: packages/Chem/scripts/stand-alone/butina_cluster.py (and sibling scripts murcko_scaffold.py, filter_catalogs.py)

What breaks: When a project is saved with datasync enabled and then reopened, the Butina-cluster step is not replayed — the platform sees only a stale, frozen result column instead of re-running the function.

Where: The datasync subsystem decides whether a function result can be replayed by checking for the #meta.role: transform script header. Every biochemical-calculator script that correctly supports datasync carries this tag (calc_logP.py, calc_logS.py, calc_pI.py, calc_pKas.py). All three stand-alone scripts (butina_cluster.py, murcko_scaffold.py, filter_catalogs.py) are missing it, even though they also use {action:join(data)} in their #output directive (i.e. they produce joined result columns exactly like the calculators do).

Why: butina_cluster.py was added to the top-menu (Chem | Analyze | Butina Cluster...) without the matching datasync annotation. Without #meta.role: transform, the platform cannot identify the function as re-runnable during project restore, so it displays the state frozen at save-time rather than recalculating — producing "incorrect results for Butina cluster" as reported.

Note: calc_logD.py has the same annotation gap, but that is outside the scope of GROK-20508.

Reproduced on dev: Reproduction requires save/restore of a project with datasync through the full UI, which is not automatable through the JS API alone. Root cause is established purely by static code comparison.

Thread: https://datagrok.slack.com/archives/C04BF3YM6CF/p1785227533092579?thread_ts=1785227533.092579&cid=C04BF3YM6CF

Auto-drafted fix — review and test before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant