ai_qc/backend/client_config.py
nickviljoen 08a9901d70 Create L'Oréal Static profile and update client configurations
Created new L'Oréal Static profile (loreal_static.json):
- Focused 3-check profile for L'Oréal digital static assets
- Checks: language_consistency, text_readability_general, background_contrast_general
- Weighting: 3.34, 3.33, 3.33 (total 10.0 for 100-point scale)
- All checks use Gemini LLM

Updated client_config.py:
- L'Oréal: Added 'loreal_static' profile, kept 'static_general', removed 'general_check'
- Diageo: Added 'static_general', removed 'general_check'
- Unilever: Added 'static_general', removed 'general_check'
- General: Added 'static_general', removed 'general_check'

Result:
- Static General (10 checks) now available to ALL clients
- L'Oréal Static (3 checks) exclusive to L'Oréal
- General Check profile removed from all clients (deprecated)

Profile distribution by client:
- Diageo: diageo_key_visual, diageo_packaging, static_general
- Unilever: unilever_key_visual, unilever_packaging, static_general
- L'Oréal: loreal_static, static_general
- General: static_general, inclusive_accessibility

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 11:59:47 +02:00

44 lines
1.5 KiB
Python

#!/usr/bin/env python3
"""
Client configuration module for managing client-profile relationships
"""
CLIENT_PROFILES = {
'diageo': {
'name': 'Diageo',
'profiles': ['diageo_key_visual', 'diageo_packaging', 'static_general'],
'display_name': 'Diageo',
'description': 'Diageo brand profiles for key visuals and packaging'
},
'unilever': {
'name': 'Unilever',
'profiles': ['unilever_key_visual', 'unilever_packaging', 'static_general'],
'display_name': 'Unilever',
'description': 'Unilever brand profiles for key visuals and packaging'
},
'loreal': {
'name': "L'Oreal",
'profiles': ['loreal_static', 'static_general'],
'display_name': "L'Oreal",
'description': "L'Oreal brand profiles with focused and comprehensive static QC checks"
},
'general': {
'name': 'General',
'profiles': ['static_general', 'inclusive_accessibility'],
'display_name': 'General / Other',
'description': 'General purpose profiles and accessibility checks'
}
}
def get_client_profiles(client_id):
"""Get profiles available for a specific client"""
return CLIENT_PROFILES.get(client_id, {}).get('profiles', [])
def get_all_clients():
"""Get all available clients"""
return CLIENT_PROFILES
def validate_client_profile(client_id, profile_id):
"""Validate that a profile belongs to a client"""
client_profiles = get_client_profiles(client_id)
return profile_id in client_profiles