chap-analytics 0.2.3__tar.gz → 0.2.4__tar.gz
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.
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/CHANGELOG.md +16 -0
- {chap_analytics-0.2.3/chap_analytics.egg-info → chap_analytics-0.2.4}/PKG-INFO +1 -1
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/__init__.py +1 -1
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_patch.py +24 -1
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/briefs.py +1 -1
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/charts.py +2 -1
- {chap_analytics-0.2.3 → chap_analytics-0.2.4/chap_analytics.egg-info}/PKG-INFO +1 -1
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/examples/chap_analytics_walkthrough.ipynb +1 -1
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/pyproject.toml +1 -1
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/LICENSE +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/MANIFEST.in +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/README.md +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_report/report.css +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_report/report.html +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_report/report.js +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_report/stats.js +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_vendor/LICENSE.vega +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_vendor/LICENSE.vega-embed +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_vendor/LICENSE.vega-lite +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_vendor/README.md +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_vendor/render.js +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_vendor/vega-embed.min.js +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_vendor/vega-lite.min.js +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/_vendor/vega.min.js +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/export.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/frames.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/graph.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/load.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/models.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/py.typed +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/report.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/sample.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/schema.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/stats.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics/watch.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics.egg-info/SOURCES.txt +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics.egg-info/dependency_links.txt +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics.egg-info/requires.txt +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/chap_analytics.egg-info/top_level.txt +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/examples/build_notebook.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/examples/support_desk.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/setup.cfg +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/conftest.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/js_stats_runner.js +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_charts_and_briefs.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_differential.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_example.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_from_url_scheme.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_graph.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_handoff_and_routing.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_identity.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_notebook.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_projection.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_redaction_and_malformed.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_refusals.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_report.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_review_passes.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_sample_and_export.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_stats.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_successors.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_typescript_store.py +0 -0
- {chap_analytics-0.2.3 → chap_analytics-0.2.4}/tests/test_watch_export_models.py +0 -0
|
@@ -4,6 +4,22 @@
|
|
|
4
4
|
so a protocol release moves the coordinator packages together and leaves this
|
|
5
5
|
one where it is until the tables or the analyses change.
|
|
6
6
|
|
|
7
|
+
## 0.2.4
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **A patch `test` that compares a boolean with a number.** `chap-analytics`
|
|
12
|
+
applies each override's patch to rebuild the corrected artefact, and the
|
|
13
|
+
patch's `test` operation counted `true` as equal to `1` and `false` as
|
|
14
|
+
equal to `0`, as Python does. It now tells a boolean from a number, as
|
|
15
|
+
RFC 6902 and both coordinators do.
|
|
16
|
+
- **What a lapse rate says.** The whispers chart and brief read a high lapse
|
|
17
|
+
rate as a reviewer who is away from the desk. A lapse records only that
|
|
18
|
+
no answer arrived before the lapse check ran. The chart now points at
|
|
19
|
+
questions the task input should have answered and at questions that reach
|
|
20
|
+
no one in time, and the brief suggests checking that the questions reach
|
|
21
|
+
the people asked.
|
|
22
|
+
|
|
7
23
|
## 0.2.3
|
|
8
24
|
|
|
9
25
|
Reads the store of `chap-coordinator` 0.3.2 and later.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chap-analytics
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: The record of a collaboration between people and agents, measured and drawn: a CHAP audit chain as documented tables, statistics with their intervals, graphs, charts, briefs and a self-contained interactive report
|
|
5
5
|
Author-email: Brightbeam AI <oss@brightbeam.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -41,7 +41,7 @@ The layers, bottom up:
|
|
|
41
41
|
"""
|
|
42
42
|
from __future__ import annotations
|
|
43
43
|
|
|
44
|
-
__version__ = "0.2.
|
|
44
|
+
__version__ = "0.2.4"
|
|
45
45
|
|
|
46
46
|
from . import briefs, charts, export, graph, models, sample, stats, watch # noqa: E402
|
|
47
47
|
from .frames import Frames, frames # noqa: E402
|
|
@@ -100,6 +100,29 @@ def _get(doc: Any, path: str) -> Any:
|
|
|
100
100
|
return parent[key]
|
|
101
101
|
|
|
102
102
|
|
|
103
|
+
def _json_equal(a: Any, b: Any) -> bool:
|
|
104
|
+
"""JSON-type-aware deep equality for the RFC 6902 ``test`` operation.
|
|
105
|
+
|
|
106
|
+
Python's ``==`` treats ``True == 1`` and ``False == 0`` as equal because
|
|
107
|
+
``bool`` is a subclass of ``int``. JSON distinguishes them: ``true`` is a
|
|
108
|
+
boolean, ``1`` is a number. The TypeScript reference's ``deepEqual``
|
|
109
|
+
handles this via ``typeof``; this function is the Python equivalent.
|
|
110
|
+
"""
|
|
111
|
+
if isinstance(a, bool) != isinstance(b, bool):
|
|
112
|
+
return False
|
|
113
|
+
if a is None or b is None:
|
|
114
|
+
return a is b
|
|
115
|
+
if isinstance(a, dict):
|
|
116
|
+
if not isinstance(b, dict) or len(a) != len(b):
|
|
117
|
+
return False
|
|
118
|
+
return all(k in b and _json_equal(a[k], b[k]) for k in a)
|
|
119
|
+
if isinstance(a, list):
|
|
120
|
+
if not isinstance(b, list) or len(a) != len(b):
|
|
121
|
+
return False
|
|
122
|
+
return all(_json_equal(x, y) for x, y in zip(a, b))
|
|
123
|
+
return a == b
|
|
124
|
+
|
|
125
|
+
|
|
103
126
|
def _apply_one(doc: Any, op: dict) -> Any: # noqa: C901 - one branch per RFC 6902 operation
|
|
104
127
|
kind = op.get("op")
|
|
105
128
|
path = op.get("path", "")
|
|
@@ -180,7 +203,7 @@ def _apply_one(doc: Any, op: dict) -> Any: # noqa: C901 - one branch per RFC 69
|
|
|
180
203
|
if kind == "test":
|
|
181
204
|
if "value" not in op:
|
|
182
205
|
raise PatchError("'test' requires 'value'")
|
|
183
|
-
if _get(doc, path)
|
|
206
|
+
if not _json_equal(_get(doc, path), op["value"]):
|
|
184
207
|
raise PatchError(f"'test' failed at {path}")
|
|
185
208
|
return doc
|
|
186
209
|
|
|
@@ -301,7 +301,7 @@ def whispers(f: Frames) -> Brief:
|
|
|
301
301
|
if not r["sufficient"]:
|
|
302
302
|
decision = "Too few resolved questions to judge; the lapse rate will settle as more are asked."
|
|
303
303
|
elif r["lapse_rate"] > 0.25:
|
|
304
|
-
decision = "More than a quarter lapse: the default answer is deciding those questions. Put the answer in the task input, or
|
|
304
|
+
decision = "More than a quarter lapse: the default answer is deciding those questions. Put the answer in the task input, check that the questions reach the people asked, or address them to someone who can answer in time."
|
|
305
305
|
else:
|
|
306
306
|
decision = "Questions are being answered in time."
|
|
307
307
|
return Brief("whispers", "Whether agents get answers", head, text, decision, bool(r["sufficient"]), w)
|
|
@@ -629,7 +629,8 @@ def whispers(w: pd.DataFrame, by: str = "asker") -> Chart:
|
|
|
629
629
|
"""Lapse rate per asker with intervals. Takes :func:`stats.whispers` output."""
|
|
630
630
|
name = "whispers"
|
|
631
631
|
q = "How often do agents have to ask, and does anyone answer in time?"
|
|
632
|
-
d = "A high lapse rate
|
|
632
|
+
d = ("A high lapse rate points at questions the task input should have answered, or at questions that "
|
|
633
|
+
"reach no one in time. The chain records only that no answer arrived before the deadline.")
|
|
633
634
|
if w.empty:
|
|
634
635
|
return _empty(name, "Whispers that lapsed", q, d, "No whispers in this chain.")
|
|
635
636
|
key = by if by in w.columns else None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chap-analytics
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: The record of a collaboration between people and agents, measured and drawn: a CHAP audit chain as documented tables, statistics with their intervals, graphs, charts, briefs and a self-contained interactive report
|
|
5
5
|
Author-email: Brightbeam AI <oss@brightbeam.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -4149,7 +4149,7 @@
|
|
|
4149
4149
|
" -> Reviewers agree on nearly every shared pass. Kappa is low only because almost all of those passes are acceptances, which leaves little disagreement to measure.\n",
|
|
4150
4150
|
"\n",
|
|
4151
4151
|
"64 questions asked, 20 lapsed (31%, 21% to 43%); answers took a median of 5 minutes.\n",
|
|
4152
|
-
" -> More than a quarter lapse: the default answer is deciding those questions. Put the answer in the task input, or
|
|
4152
|
+
" -> More than a quarter lapse: the default answer is deciding those questions. Put the answer in the task input, check that the questions reach the people asked, or address them to someone who can answer in time.\n",
|
|
4153
4153
|
"\n",
|
|
4154
4154
|
"10 handoffs proposed, 9 accepted (90%, 60% to 98%), 1 declined, 0 open; resolved in a median of 26 minutes.\n",
|
|
4155
4155
|
" -> Work moves between people when it needs to.\n",
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "chap-analytics"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.4"
|
|
8
8
|
description = "The record of a collaboration between people and agents, measured and drawn: a CHAP audit chain as documented tables, statistics with their intervals, graphs, charts, briefs and a self-contained interactive report"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|