fix base costs and import backstage in ctm notebook
This commit is contained in:
@@ -99,6 +99,19 @@ TCO_VERBATIM: dict[str, float] = {
|
||||
"npv_discount_rate": 0.135, # deck's benefit-NPV rate
|
||||
}
|
||||
|
||||
#: Actual contracted values where they differ from the deck — 🟢
|
||||
#: contractual. Layered over TCO_VERBATIM, which stays the untouched
|
||||
#: record of what Genesys pitched (the anchor CTM can follow);
|
||||
#: presentation reads through :func:`tco`.
|
||||
TCO_CONTRACTED: dict[str, float] = {
|
||||
"ccaas_annual": 3_200_000, # signed licence run-rate (deck pitched $4.3M/yr)
|
||||
}
|
||||
|
||||
|
||||
def tco(key: str) -> float:
|
||||
"""Contracted value where one exists, else the deck's verbatim anchor."""
|
||||
return TCO_CONTRACTED.get(key, TCO_VERBATIM[key])
|
||||
|
||||
#: Genesys/Broadreach deployment schedule (slides 17-21), months from
|
||||
#: Jan 2026 inclusive. Benefits realize IMPL + 3 months.
|
||||
IMPL_MONTH = {"NA": 18, "ANZ": 21, "EMEA": 24, "ASIA": 27}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
"""
|
||||
Stage vs backstage — is this notebook render stakeholder-facing?
|
||||
|
||||
The Mercury CLI (``mercury --working-dir …``) exports ``MERCURY_CONFIG_DIR``
|
||||
into the server process so the widget library can locate ``config.toml``
|
||||
(see ``mercury/config.py``); every kernel that server spawns inherits it.
|
||||
JupyterLab and nbconvert kernels don't have it. That makes the variable a
|
||||
reliable signal for "the audience is looking" (the stage) versus an
|
||||
analyst session or a headless export run (backstage).
|
||||
|
||||
Diagnostics routed through :func:`backstage` stay visible in JupyterLab
|
||||
and land in the nbconvert exports (where the machine-readable appendix
|
||||
must appear for LLM consumption) but never render in the Mercury app.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
|
||||
def on_stage() -> bool:
|
||||
"""True when running under the Mercury app (stakeholder-facing)."""
|
||||
return os.getenv("MERCURY_CONFIG_DIR") is not None
|
||||
|
||||
|
||||
def backstage(*args, **kwargs) -> None:
|
||||
"""``print`` that renders only backstage (JupyterLab, nbconvert)."""
|
||||
if not on_stage():
|
||||
print(*args, **kwargs)
|
||||
Reference in New Issue
Block a user