corvix.config¶
YAML configuration for Corvix dashboards and polling.
Attributes¶
Classes¶
Predicate evaluated against enriched notification context. |
|
Filter fields for rules and dashboards. |
|
Action emitted when a rule matches. |
|
Global or repository-scoped automation rule. |
|
Collection of global and per-repository rules. |
|
Dashboard configuration for sorting, grouping, and filtering. |
|
Configurable scoring model for notifications. |
|
Polling behavior for ingestion. |
|
GitHub API configuration. |
|
One GitHub account configuration for multi-account polling. |
|
Config for enriching comment notifications with latest-comment metadata. |
|
Config for enriching pull-request notifications with PR state. |
|
Top-level enrichment configuration. |
|
State/cache location for persisted notifications. |
|
Config for in-tab browser notification delivery. |
|
Config for background Web Push notification delivery (phase 2). |
|
Controls which records qualify for notification events. |
|
Top-level notifications configuration. |
|
Authentication mode configuration. |
|
PostgreSQL connection configuration. |
|
Top-level application config. |
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load and validate YAML config from disk. |
|
Write a starter configuration file. |
Module Contents¶
- class corvix.config.ContextPredicate[source][source]¶
Predicate evaluated against enriched notification context.
- class corvix.config.MatchCriteria[source][source]¶
Filter fields for rules and dashboards.
- context: list[ContextPredicate] = [][source][source]¶
- class corvix.config.Rule[source][source]¶
Global or repository-scoped automation rule.
- actions: list[RuleAction] = [][source][source]¶
- class corvix.config.DashboardSpec[source][source]¶
Dashboard configuration for sorting, grouping, and filtering.
- ignore_rules: list[MatchCriteria] = [][source][source]¶
- class corvix.config.GitHubConfig[source][source]¶
GitHub API configuration.
- accounts: list[GitHubAccountConfig] = [][source][source]¶
- class corvix.config.GitHubAccountConfig[source][source]¶
One GitHub account configuration for multi-account polling.
- class corvix.config.GitHubLatestCommentEnrichmentConfig[source][source]¶
Config for enriching comment notifications with latest-comment metadata.
- class corvix.config.GitHubPRStateEnrichmentConfig[source][source]¶
Config for enriching pull-request notifications with PR state.
- class corvix.config.EnrichmentConfig[source][source]¶
Top-level enrichment configuration.
- github_latest_comment: GitHubLatestCommentEnrichmentConfig[source][source]¶
- github_pr_state: GitHubPRStateEnrichmentConfig[source][source]¶
- class corvix.config.StateConfig[source][source]¶
State/cache location for persisted notifications.
- cache_file: pathlib.Path[source][source]¶
- class corvix.config.BrowserTabTargetConfig[source][source]¶
Config for in-tab browser notification delivery.
- class corvix.config.WebPushTargetConfig[source][source]¶
Config for background Web Push notification delivery (phase 2).
- class corvix.config.NotificationsDetectConfig[source][source]¶
Controls which records qualify for notification events.
- class corvix.config.NotificationsConfig[source][source]¶
Top-level notifications configuration.
- browser_tab: BrowserTabTargetConfig[source][source]¶
- web_push: WebPushTargetConfig[source][source]¶
- class corvix.config.AppConfig[source][source]¶
Top-level application config.
- github: GitHubConfig[source][source]¶
- enrichment: EnrichmentConfig[source][source]¶
- polling: PollingConfig[source][source]¶
- state: StateConfig[source][source]¶
- scoring: ScoringConfig[source][source]¶
- dashboards: list[DashboardSpec] = [][source][source]¶
- database: DatabaseConfig[source][source]¶
- notifications: NotificationsConfig[source][source]¶
- resolve_cache_file() pathlib.Path[source][source]¶
Resolve the configured cache path.
- corvix.config.DEFAULT_CONFIG = Multiline-String[source][source]¶
Show Value
"""github: accounts: - id: primary label: Primary token_env: GITHUB_TOKEN api_base_url: https://api.github.com enrichment: enabled: false max_requests_per_cycle: 25 github_latest_comment: enabled: false timeout_seconds: 10 github_pr_state: enabled: false timeout_seconds: 10 polling: interval_seconds: 60 per_page: 50 max_pages: 5 all: false participating: false state: cache_file: ~/.cache/corvix/notifications.json scoring: unread_bonus: 15 age_decay_per_hour: 0.25 reason_weights: mention: 50 review_requested: 40 assign: 30 author: 10 repository_weights: your-org/critical-repo: 25 subject_type_weights: PullRequest: 10 title_keyword_weights: security: 20 urgent: 15 rules: global: - name: mute-bot-noise match: title_regex: ".*\[bot\].*" actions: - type: mark_read exclude_from_dashboards: true per_repository: your-org/infra: - name: mute-chore-prs match: title_contains_any: ["chore", "deps"] actions: - type: mark_read exclude_from_dashboards: true dashboards: - name: overview group_by: reason sort_by: updated_at descending: true include_read: true max_items: 200 - name: triage group_by: repository sort_by: score descending: true include_read: false max_items: 100 match: reason_in: ["mention", "review_requested", "assign"] ignore_rules: - reason_in: ["comment"] context: - path: github.latest_comment.is_ci_only op: equals value: true """
- corvix.config._get_str(config: dict[str, object], key: str, default: str, field: str) str[source][source]¶
- corvix.config._get_optional_str(config: dict[str, object], key: str, field: str) str | None[source][source]¶
- corvix.config._get_bool(config: dict[str, object], key: str, default: bool, field: str) bool[source][source]¶
- corvix.config._get_optional_bool(config: dict[str, object], key: str, field: str) bool | None[source][source]¶
- corvix.config._get_int(config: dict[str, object], key: str, default: int, field: str) int[source][source]¶
- corvix.config._get_float(config: dict[str, object], key: str, default: float, field: str) float[source][source]¶
- corvix.config._get_optional_float(config: dict[str, object], key: str, field: str) float | None[source][source]¶
- corvix.config._parse_context_predicates(value: object, *, section: str = 'match.context') list[ContextPredicate][source][source]¶
- corvix.config._parse_context_predicate(value: object, *, section: str = 'match.context[]') ContextPredicate[source][source]¶
- corvix.config._parse_scoring(value: object) ScoringConfig[source][source]¶
- corvix.config._parse_github(value: object) GitHubConfig[source][source]¶
- corvix.config._parse_polling(value: object) PollingConfig[source][source]¶
- corvix.config._parse_enrichment(value: object) EnrichmentConfig[source][source]¶
- corvix.config._parse_state(value: object) StateConfig[source][source]¶
- corvix.config._parse_auth(value: object) AuthConfig[source][source]¶
- corvix.config._parse_database(value: object) DatabaseConfig[source][source]¶
- corvix.config._parse_notifications(value: object) NotificationsConfig[source][source]¶
- corvix.config.load_config(path: pathlib.Path) AppConfig[source][source]¶
Load and validate YAML config from disk.
- corvix.config.write_default_config(path: pathlib.Path) None[source][source]¶
Write a starter configuration file.