Refactor Skill Scoring Functions and Enhance Corpus Handling
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 38s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m17s

- Introduced new helper functions for managing artifact type corpus, improving code organization and readability.
- Updated the `compute_club_corpus_reference` function to utilize the new corpus handling methods, enhancing clarity and maintainability.
- Refactored skill profile functions to leverage the new corpus structure, ensuring consistent data retrieval across different artifact types.
- Improved the handling of visibility clauses for library content, streamlining database queries for skill profiles.
- Enhanced the batch skill profile summary function to aggregate reference data by artifact type, improving performance and accuracy.
This commit is contained in:
Lars committed 2026-05-21 10:17:22 +02:00
1 parent 34966b9e84
commit 2de4c0b7c9
13 files changed
+375 -180

No files matched your search

@@ -153,7 +153,7 @@ export function summarizeFrameworkImportFilters(filters = {}, catalogs = {}) {
parts.push(`Fähigkeiten: ${names.join(', ')}`)
}
if (Number(f.skillMinClubPercent) > 0) {
parts.push(`mind. ${f.skillMinClubPercent}% vom Vereins-Maximum`)
parts.push(`mind. ${f.skillMinClubPercent}% vom Rahmenprogramm-Maximum`)
}
if (f.skillSort === 'skill_strength' && (f.skillIds || []).length) {
parts.push('Sortierung: Fähigkeiten-Stärke')
@@ -47,6 +47,26 @@ export function formatSkillWeight(value) {
return n % 1 === 0 ? String(n) : n.toFixed(1)
}
const PEER_LABELS = {
framework_program: 'Rahmenpr.',
training_module: 'Module',
progression_graph: 'Pfade',
}
const PEER_COUNT_LABELS = {
framework_program: 'Rahmenprogramme',
training_module: 'Module',
progression_graph: 'Regressionspfade',
}
export function peerPercentSuffix(artifactType = 'training_module') {
return PEER_LABELS[artifactType] || 'Peers'
}
export function peerCorpusCountLabel(artifactType = 'training_module') {
return PEER_COUNT_LABELS[artifactType] || 'Planungs-Artefakte'
}
/** KPI-Zeilen: immer Top je Unterkategorie; bei Skill-Filter nur passende Kategorien. */
export function kpiRowsFromSummary(summary, { skillIds = [], limit = 8 } = {}) {
if (!summary) return []