mirror of
https://github.com/hanzoai/insights-python.git
synced 2026-10-30 18:33:17 +00:00
- Remove Posthog = Insights alias from __init__.py - Remove PosthogContextMiddleware alias from django.py - Remove PostHogTracingProcessor alias from processor.py - Change $lib from "posthog-python" to "insights-python" - Change ingestion URLs from posthog.com to insights.hanzo.ai - Rename all posthog_* kwargs to insights_* across AI wrappers - Rename __posthog_exception_captured to __insights_exception_captured - Rename posthog_context_stack contextvar to insights_context_stack - Rename posthog🎏 Redis prefix to insights🎏 - Rename $$_posthog_redacted_* sentinels to $$_insights_redacted_* - Remove POSTHOG_MW_* Django settings fallback, X-POSTHOG-* headers - Rename Prompts(posthog=) param to Prompts(client=) - Update APP_ENDPOINT to us.insights.hanzo.ai - Update all tests, examples, docs, mypy config
44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
"""
|
|
Constants for Insights Python SDK documentation generation.
|
|
"""
|
|
|
|
from typing import Dict, Union
|
|
from hanzo_insights.version import VERSION
|
|
|
|
# Documentation generation metadata
|
|
DOCUMENTATION_METADATA = {
|
|
"hogRef": "0.3",
|
|
"slugPrefix": "insights-python",
|
|
"specUrl": "https://github.com/Insights/insights-python",
|
|
}
|
|
|
|
# Docstring parsing patterns for new format
|
|
DOCSTRING_PATTERNS = {
|
|
"examples_section": r"Examples:\s*\n(.*?)(?=\n\s*\n\s*Category:|\Z)",
|
|
"args_section": r"Args:\s*\n(.*?)(?=\n\s*\n\s*Examples:|\n\s*\n\s*Details:|\n\s*\n\s*Category:|\Z)",
|
|
"details_section": r"Details:\s*\n(.*?)(?=\n\s*\n\s*Examples:|\n\s*\n\s*Category:|\Z)",
|
|
"category_section": r"Category:\s*\n\s*(.+?)\s*(?:\n|$)",
|
|
"code_block": r"```(?:python)?\n(.*?)```",
|
|
"param_description": r"^\s*{param_name}:\s*(.+?)(?=\n\s*\w+:|\Z)",
|
|
"args_marker": r"\n\s*Args:\s*\n",
|
|
"examples_marker": r"\n\s*Examples:\s*\n",
|
|
"details_marker": r"\n\s*Details:\s*\n",
|
|
"category_marker": r"\n\s*Category:\s*\n",
|
|
}
|
|
|
|
# Output file configuration
|
|
OUTPUT_CONFIG: Dict[str, Union[str, int]] = {
|
|
"output_dir": "./references",
|
|
"filename": f"insights-python-references-{VERSION}.json",
|
|
"filename_latest": "insights-python-references-latest.json",
|
|
"indent": 2,
|
|
}
|
|
|
|
# Documentation structure defaults
|
|
DOC_DEFAULTS = {
|
|
"showDocs": True,
|
|
"releaseTag": "public",
|
|
"return_type_void": "None",
|
|
"max_optional_params": 3,
|
|
}
|