Merge pull request 'clanServices: add warning if manifest.readme is not set' (#5537) from Qubasa/clan-core:fix_manifest_readmes into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5537
This commit is contained in:
Luis Hebendanz
2025-10-16 17:12:46 +00:00
23 changed files with 167 additions and 18 deletions

View File

@@ -1,3 +1,4 @@
import logging
import re
import tomllib
from dataclasses import dataclass, field, fields
@@ -16,6 +17,8 @@ from clan_lib.nix_models.clan import (
from clan_lib.persist.inventory_store import InventoryStore
from clan_lib.persist.path_utils import get_value_by_path, set_value_by_path
log = logging.getLogger(__name__)
class CategoryInfo(TypedDict):
color: str
@@ -242,6 +245,11 @@ def get_service_readmes(
readmes = flake.select(query)
for name, content in readmes.items():
if content is None or content.strip() == "":
readmes[name] = None
log.error(f"Service '{name}' is missing manifest.readme field")
return ServiceReadmeCollection(input_name=input_name, readmes=readmes)