Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ Python 3.11+ and Git are required. There are **no third-party runtime
dependencies**. The commands use a virtual environment without requiring
activation.

These commands clone `main`. The [v0.1.0 release](https://github.com/dev-belly/PITBridge/releases/tag/v0.1.0)
is an earlier snapshot: the optional CSV example and `benchmark` command were
added [after that tag](https://github.com/dev-belly/PITBridge/compare/v0.1.0...main).
Use `main` for those examples, or follow the tagged release's own instructions.

**Linux / macOS**

```bash
Expand Down
4 changes: 4 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ PITBridge 同时处理数据发生时间、公开时间、入库时间和修订

需要 Git 和 Python 3.11 或更高版本。下面是 Windows PowerShell 命令,使用独立环境,无需先激活:

这些命令克隆 `main`。[v0.1.0 发布版本](https://github.com/dev-belly/PITBridge/releases/tag/v0.1.0)
是较早的代码快照;可选 CSV 示例和 `benchmark` 命令均在[该标签之后加入](https://github.com/dev-belly/PITBridge/compare/v0.1.0...main)。
试用这些功能请使用 `main`;若选择发布标签,请按该版本自己的说明运行。

```powershell
git clone https://github.com/dev-belly/PITBridge.git
cd PITBridge
Expand Down
9 changes: 9 additions & 0 deletions examples/decision_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ def main():
snapshots = build_snapshot(observations, decisions, specs)
if snapshots != reference_snapshot(observations, decisions, specs):
raise RuntimeError("SQL and independent temporal replay disagree")
# Check the documented business result independently of either engine.
expected = [
("01-before-arrival", None, "not_available", None),
("02-original-known", 100000.0, "selected", "invoice-v1"),
("03-correction-known", 135000.0, "selected", "invoice-v2"),
]
actual = [(row.decision_id, row.value, row.status, row.record_id) for row in snapshots]
if actual != expected:
raise RuntimeError("Invoice selections differ from the three documented decisions")
print(json.dumps([asdict(row) for row in snapshots], indent=2))


Expand Down
Loading