diff --git a/dsms/apps/config.py b/dsms/apps/config.py index a0d27a2..85aee47 100644 --- a/dsms/apps/config.py +++ b/dsms/apps/config.py @@ -18,6 +18,7 @@ _get_app_specification, ) +from dsms.knowledge.utils import print_model # isort:skip from dsms.core.logging import handler # isort:skip @@ -101,30 +102,13 @@ def __setattr__(self, name, value) -> None: ) self.session.buffers.updated.update({self.name: self}) - # def __str__(self) -> str: - # """Pretty print the app config fields""" - # fields = ", ".join( - # [ - # "{key}={value}".format( # pylint: disable=consider-using-f-string - # key=key, - # value=( - # value - # if key != "specification" - # else { - # "metadata": value.get( # pylint: disable=no-member - # "metadata" - # ) - # } - # ), - # ) - # for key, value in self.__dict__.items() - # ] - # ) - # return f"{self.__class__.__name__}({fields})" - - # def __repr__(self) -> str: - # """Pretty print the kitem Fields""" - # return str(self) + def __str__(self) -> str: + """Pretty print the kitem Fields""" + return print_model(self, "app") + + def __repr__(self) -> str: + """Pretty print the kitem Fields""" + return str(self) @field_validator("name") @classmethod diff --git a/setup.cfg b/setup.cfg index 5fbab39..382f8f0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ install_requires = click>=8,<9 html5lib>=1,<2 lru-cache<1 - oyaml==1.1 + oyaml==1 pandas>=2,<3 pydantic>=2,<3 pydantic-settings