"On demand" formulas
维护者通常 1 天内回复
@jqnatividad 已经在做这个了。
开始于 2025年5月29日。
评估
这个 Issue 还没有评估数据。
描述
DP+ DRUF currently supports two formula types:
formula(aka "direct formulas")
the Jinja2 expression is evaluated at package creation/update and "directly" stored into the designated package/resource field.suggestion_formula
the Jinja2 expression is evaluated at package creation/update, and is stored in thedpp_suggestionspackage field (as a JSON object). Thedpp_suggestionspackage field is used to power the Bootstrap-powered Suggestion UI popover
We should create a third formula type - On demand, which is a variant of suggestion_formula.
It is indicated by a new scheming keyword - ondemand_formula.
As the name implies, an ondemand formula is calculated on demand, i.e. while entering metadata in CKAN.
When an ondemand_formula is used, the Suggestion UI will have an "Recalculate" button in addition to "Apply Suggestion" button.
To enable this, DP+ will have a new Action API endpoint - dpp_ondemand_formula:
def dpp_ondemand_formula(context, data_dict):
'''
Evaluate the on_demand formula for the given package/resource field
:param formula: the Jinja2 expression to evaluate.
:param track_invocation: track the formula/result pair with a timestamp (default: false)
'''
When the "Recalculate" button is pressed, the Suggestion UI calls the dpp_ondemand_formula API for the associated field.
Ondemand formulas will be initially used for AI-powered formulas - as they often need repeated invocations while entering metadata.
We offer the ability to "track_invocation", so the user can possibly use/consult previous invocations.
Eventually, ondemand formulas can be also used to have "formula presets", similar to scheming's "presets".
"Formula presets" are traditional jinja2 templates that can render a custom UI for an associated formula that may require additional form controls beyond the generic Suggestion UI (e.g. a field picker to select which fields to use in a formula during data entry).
cc @minhajuddin2510 @samibaig @wardi
- 主要语言
- Python
- 星标
- 47
- 派生
- 33
- 平均合并
- 2 小时 28 分钟
- 30 天内合并 PR
- 10
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dathere/datapusher-plus 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
dathere/datapusher-plus#359 ·
维护者通常 1 天内回复
-
"Total elapsed time" in the JOB DONE line is ~1.79 billion seconds (perf_counter overwrites the time.time() start)可能已有人在做 @tino097 于 14 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
dathere/datapusher-plus#355 ·
维护者通常 1 天内回复
-
FormulaProcessing stage always skipped on CKAN 2.10+: ckan.plugins is a list, stage calls .split() on it可能已有人在做 @tino097 于 14 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 25/100
dathere/datapusher-plus#354 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
dathere/datapusher-plus#340 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 53/100
dathere/datapusher-plus#338 ·
维护者通常 1 天内回复
查看 dathere/datapusher-plus 的全部 Issue
相似的 Issue
-
needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
gke-labs/kube-agents#5671 ·
维护者通常 1 天内回复
-
documentation next-release v0.9.6
难度 1/5 1 小时以内 新手友好度 88/100
khuisman/mcp-gee-sweet#1446 ·
维护者通常 1 天内回复
-
model:sonnet runtime:claude security size:S
难度 2/5 1-3 小时 新手友好度 75/100
FootprintAI/Containarium#3671 ·
维护者通常 1 天内回复
-
HolidayBase: reassigning `language` does not re-initialize translations or re-populate holidays可能已有人在做 @shikhabhadoria 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
vacanza/holidays#4116 · 1 条评论 ·
维护者通常 1 天内回复
-
bug CLI exec
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复