Enhance MediaWiki import functionality with category normalization and skill attributes
Deploy Development / deploy (push) Successful in 38s
Test Suite / pytest-backend (push) Successful in 40s
Test Suite / lint-backend (push) Successful in 0s
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
Test Suite / pytest-backend (pull_request) Successful in 35s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 12s
Test Suite / k6 /health Baseline (pull_request) Successful in 33s
Test Suite / playwright-tests (pull_request) Successful in 1m8s

- Introduced `_normalize_mw_category` function to clean category names for API calls, ensuring consistent handling of category prefixes.
- Updated `SmwClient` methods to utilize normalized category names, improving data retrieval accuracy.
- Added `_wiki_category_or_default` function to provide default categories based on import type, enhancing user experience during imports.
- Integrated new fields `karate_relevance` and `relevance_level` into various admin components, allowing for better skill management.
- Incremented app version to 0.8.145 and updated changelog to reflect these changes.
This commit is contained in:
Lars committed 2026-05-16 11:05:15 +02:00
1 parent 949a77fe38
commit 623af621b4
11 files changed
+407 -34

No files matched your search

+2 -2
View File
@@ -408,9 +408,9 @@ def map_wiki_to_skill(
first_value = values[0] if isinstance(values, list) else values
if target == "description":
description_text = wikitext_to_plaintext(first_value)
description_text = wikitext_to_plaintext(str(first_value))
elif target == "karate_relevance":
mapped["karate_relevance"] = wikitext_to_plaintext(first_value)
mapped["karate_relevance"] = wikitext_to_plaintext(str(first_value))
elif target == "relevance_level":
parsed = parse_wiki_relevance_level(first_value if isinstance(first_value, str) else str(first_value))
if parsed is None: