feat: implement Phase 2 stabilization
Some checks failed
CI / lint-and-test (push) Has been cancelled
Some checks failed
CI / lint-and-test (push) Has been cancelled
- Cache Graph API tokens with expiry-aware reuse in graph/auth.py - Add tenacity-based retry/backoff wrapper (utils/http.py) and apply to all Graph/source API calls - Add Pydantic request/response models (models/api.py) and FastAPI query constraints - Add unit tests for event_model, auth and integration tests for API endpoints - Configure ruff linter/formatter in pyproject.toml - Add GitHub Actions CI pipeline (.github/workflows/ci.yml) - Add requirements-dev.txt with pytest, mongomock, httpx, ruff - Clean up typing imports and fix ruff linting across codebase
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict
|
||||
from typing import Any
|
||||
|
||||
import yaml
|
||||
|
||||
|
||||
DEFAULT_MAPPING: Dict[str, Any] = {
|
||||
DEFAULT_MAPPING: dict[str, Any] = {
|
||||
"category_labels": {
|
||||
"ApplicationManagement": "Application",
|
||||
"UserManagement": "User",
|
||||
@@ -38,7 +37,7 @@ DEFAULT_MAPPING: Dict[str, Any] = {
|
||||
|
||||
|
||||
@lru_cache(maxsize=1)
|
||||
def get_mapping() -> Dict[str, Any]:
|
||||
def get_mapping() -> dict[str, Any]:
|
||||
"""
|
||||
Load mapping from mappings.yml if present; otherwise fall back to defaults.
|
||||
Users can edit mappings.yml to change labels and summary templates.
|
||||
|
||||
Reference in New Issue
Block a user