Skip to content

Independent Auditing of AI Agents. Run by human or the agent itself, to answer the most crucial question in the AI Agent Economy. Is the agent doing what is supposed to do? With iFixAi you can have this answer in less than 120 seconds.

chore: single audits chart (#120)

n-papaioannou697690edc866
diff --git a/.github/workflows/traction.yaml b/.github/workflows/traction.yaml
index 1b8af42..fb8697b 100644
--- a/.github/workflows/traction.yaml
+++ b/.github/workflows/traction.yaml
@@ -29,7 +29,7 @@ jobs:
- name: Archive PyPI stats
run: python scripts/update_pypi_stats.py
- - name: Generate downloads and runs charts
+ - name: Generate audits chart
env:
TELEMETRY_PK: ${{ secrets.TELEMETRY_PK }}
run: python scripts/plot_traction.py
diff --git a/README.md b/README.md
index e7b1131..e96e5cf 100644
--- a/README.md
+++ b/README.md
@@ -332,5 +332,5 @@ Security-sensitive reports: **[SECURITY.md](SECURITY.md)**. Anything else: **inf
[Apache 2.0](LICENSE)
<p align="center">
- <a href="docs/traction.md">Traction</a>: installs and runs over time.
+ <a href="docs/traction.md">Traction</a>: audits over time.
</p>
diff --git a/docs/assets/audits_chart.png b/docs/assets/audits_chart.png
new file mode 100644
index 0000000..71c1e54
Binary files /dev/null and b/docs/assets/audits_chart.png differ
diff --git a/docs/assets/installs_runs_chart.png b/docs/assets/installs_runs_chart.png
deleted file mode 100644
index af9666d..0000000
Binary files a/docs/assets/installs_runs_chart.png and /dev/null differ
diff --git a/docs/assets/runs_history.json b/docs/assets/runs_history.json
index dd7acda..4dc266e 100644
--- a/docs/assets/runs_history.json
+++ b/docs/assets/runs_history.json
@@ -78,5 +78,10 @@
"2026-09-15": 31,
"2026-09-16": 8,
"2026-09-17": 24,
- "2026-09-18": 7
+ "2026-09-18": 8,
+ "2026-09-19": 3,
+ "2026-09-20": 6,
+ "2026-09-21": 5,
+ "2026-09-22": 2,
+ "2026-09-23": 8
}
\ No newline at end of file
diff --git a/docs/traction.md b/docs/traction.md
index 549bda8..9652d8b 100644
--- a/docs/traction.md
+++ b/docs/traction.md
@@ -1,9 +1,9 @@
# Traction
-## Installs and runs
+## Audits
<p align="center">
- <img src="assets/installs_runs_chart.png" alt="Cumulative pip installs and runs over time" width="750" />
+ <img src="assets/audits_chart.png" alt="Cumulative audits over time" width="750" />
</p>
## Recognition
diff --git a/scripts/plot_traction.py b/scripts/plot_traction.py
index 1dfadd2..4deb2fd 100644
--- a/scripts/plot_traction.py
+++ b/scripts/plot_traction.py
@@ -1,6 +1,6 @@
-"""Fetch and plot PyPI installs and telemetry runs over time.
+"""Fetch and plot audits over time, counted from telemetry.
-Each fetch merges into a history file under docs/assets/, so a dead source shows a
+Each fetch merges into docs/assets/runs_history.json, so a dead source shows a
flat line instead of a gap. Runs need TELEMETRY_PK, a personal read-scope key.
"""
@@ -16,9 +16,7 @@ import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import requests
-PACKAGE = "ifixai"
ACCENT = "#E8756A" # house coral
-RUNS_COLOR = "#2a78d6" # blue, checked to stay distinct from ACCENT (incl. color blindness)
POSTHOG_HOST = "https://us.posthog.com"
POSTHOG_PROJECT_ID = "485680"
TIMEOUT = (5, 30) # (connect, read); keeps a hung fetch from stalling the job
@@ -26,17 +24,6 @@ TIMEOUT = (5, 30) # (connect, read); keeps a hung fetch from stalling the job
DATA_DIR = Path(__file__).resolve().parent.parent / "docs" / "assets"
-def fetch_downloads() -> dict[str, int]:
- """Downloads per day from pypistats (rolling ~180 day window), mirrors excluded."""
- response = requests.get(
- f"https://pypistats.org/api/packages/{PACKAGE}/overall",
- params={"mirrors": "false"},
- timeout=TIMEOUT,
- )
- response.raise_for_status()
- return {row["date"]: row["downloads"] for row in response.json()["data"]}
-
-
def fetch_runs() -> dict[str, int]:
"""Started runs per day, from telemetry. Counts ``ifixai_started`` events."""
response = requests.post(
@@ -77,74 +64,47 @@ def _cumulative(history: dict[str, int]) -> tuple[list[datetime], list[int]]:
return xs, ys
-Series = tuple[dict[str, int], str, str] # (daily history, legend label, colour)
-
-
-def plot_pair(upper: Series, lower: Series, out: Path) -> None:
- """Plot exactly two cumulative series on one shared y-axis.
-
- End-point labels are hand-placed above and below to avoid overlap, so
- ``upper`` must be the series that ends higher.
- """
- curves = [(*_cumulative(history), label, color) for history, label, color in (upper, lower)]
+def plot_audits(history: dict[str, int], out: Path) -> None:
+ """Plot cumulative audits as a single line with its end value labelled."""
+ xs, ys = _cumulative(history)
with plt.xkcd():
fig, ax = plt.subplots(figsize=(10, 6))
fig.patch.set_facecolor("white")
ax.set_facecolor("white")
- for xs, ys, label, color in curves:
- ax.plot(xs, ys, color=color, linewidth=2.5, label=label)
-
- start = min(xs[0] for xs, _, _, _ in curves)
- ax.set_title(f"Installs and Runs (since {start:%b %d, %Y})", fontsize=16, pad=20)
+ ax.plot(xs, ys, color=ACCENT, linewidth=2.5)
+ ax.set_title(f"No. of Audits (since {xs[0]:%b %d, %Y})", fontsize=16, pad=20)
ax.set_xlabel("Date", fontsize=12)
- ax.set_ylabel("Cumulative count", fontsize=12)
+ ax.set_ylabel("Cumulative audits", fontsize=12)
ax.xaxis.set_major_formatter(mdates.DateFormatter("%b %d"))
ax.xaxis.set_major_locator(mdates.AutoDateLocator(maxticks=7))
fig.autofmt_xdate(rotation=0, ha="center")
-
- peak = max(ys[-1] for _, ys, _, _ in curves)
- ax.set_ylim(0, peak * 1.25)
-
- for offset, (xs, ys, label, color) in zip(((-62, 26), (-62, -30)), curves, strict=True):
- ax.plot(xs[-1], ys[-1], "o", color=color, markersize=9)
- ax.annotate(
- f"{ys[-1]:,}",
- xy=(xs[-1], ys[-1]),
- xytext=offset,
- textcoords="offset points",
- fontsize=13,
- color=color,
- ha="center",
- va="center",
- arrowprops=dict(
- arrowstyle="->",
- color=color,
- lw=2,
- connectionstyle="arc3,rad=-0.2",
- ),
- )
-
- ax.legend(loc="upper left", fontsize=12, frameon=False)
+ ax.set_ylim(0, ys[-1] * 1.25)
+
+ ax.plot(xs[-1], ys[-1], "o", color=ACCENT, markersize=9)
+ ax.annotate(
+ f"{ys[-1]:,}",
+ xy=(xs[-1], ys[-1]),
+ xytext=(-62, 26),
+ textcoords="offset points",
+ fontsize=13,
+ color=ACCENT,
+ ha="center",
+ va="center",
+ arrowprops=dict(arrowstyle="->", color=ACCENT, lw=2, connectionstyle="arc3,rad=-0.2"),
+ )
fig.savefig(out, dpi=150, bbox_inches="tight", facecolor="white")
plt.close(fig)
- summary = ", ".join(f"{label} {ys[-1]:,}" for _, ys, label, _ in curves)
- print(f"Wrote {out.name}: {summary}")
+ print(f"Wrote {out.name}: audits {ys[-1]:,}")
if __name__ == "__main__":
- downloads = merge(DATA_DIR / "downloads_history.json", fetch_downloads())
-
if not os.environ.get("TELEMETRY_PK"):
- raise SystemExit("TELEMETRY_PK unset: cannot plot runs alongside installs")
+ raise SystemExit("TELEMETRY_PK unset: cannot plot audits")
runs = merge(DATA_DIR / "runs_history.json", fetch_runs())
- plot_pair(
- (downloads, "pip installs", ACCENT),
- (runs, "runs started", RUNS_COLOR),
- DATA_DIR / "installs_runs_chart.png",
- )
+ plot_audits(runs, DATA_DIR / "audits_chart.png")