Skip to content

tdfs4ds.genai.manager_docs

tdfs4ds.genai.manager_docs

TimeManager / FilterManager views are documented by code (0.3.7.34).

A manager view describes a mechanism, not a dataset, and its content moves at every roll_out / update(). A model asked to document it described the cursor's position at that moment ("the business date where the time identifier is 6"), wrong after the next refresh, once per soft clone. The text is now written by code: it states what the manager exposes and how it moves, never the current TIME_ID or date. A soft clone copies its clock's text (PROPAGATED) plus one sentence; a clock that has no documentation yet is documented first, so the clone path always applies.

Pure text builders first, then the database reads (calendar size, rule, domain), all fail-open.

MANAGER_SOURCE module-attribute

MANAGER_SOURCE = 'GENERATED'

_INDEX module-attribute

_INDEX = {'at': 0.0, 'value': None}

logger_safe

logger_safe(level, message, *args, **kwargs)

Wrapper around the global logger that only emits logs when tdfs4ds.DISPLAY_LOGS is True. level is a string like "info", "error", etc.

time_manager_text

time_manager_text(db: str, view: str, table_db: str, table: str, *, n_dates: Optional[int] = None, first=None, last=None, rule: Optional[str] = None, domain: Optional[str] = None) -> str

Description of a TimeManager view (pure). No TIME_ID, no current date.

time_manager_columns

time_manager_columns(columns: List[str]) -> Dict[str, str]

filter_manager_text

filter_manager_text(db: str, view: str, table_db: str, table: str, *, n_filters: Optional[int] = None, columns: Optional[List[str]] = None) -> str

clone_sentence

clone_sentence(clone: Tuple[str, str], owner: Tuple[str, str]) -> str

The one sentence a soft clone adds to its clock's text (pure).

kind_of

kind_of(db: str, view: str, index: Dict[str, dict]) -> Optional[str]

'time' / 'filter' when (db, view) is a registered manager, else None (pure over index).

_calendar_facts

_calendar_facts(tdb: str, table: str) -> dict

_domain_of_clock

_domain_of_clock(db: str, view: str) -> Optional[str]

_write

_write(db, view, desc, cols, source)

document_manager_view

document_manager_view(db: str, view: str, ddl: Optional[str] = None, index: Optional[dict] = None, columns: Optional[List[str]] = None) -> Optional[bool]

The documentation pipeline's hook (before the soft-clone and the LLM paths): True when view is a TimeManager / FilterManager (or a soft clone of one) documented by code, None otherwise.

A part a person wrote is kept; a text a model wrote earlier (the cursor's position) is replaced. Never raises.

_cached_index

_cached_index() -> dict

The manager index (one read), kept 30 s: a pass visits many views.

_ensure_clock_documented

_ensure_clock_documented(db: str, view: str, index: dict) -> None

Document the clock itself (by code): its clones copy its text.