From f47a4c85c70c688a32aeec21b77ddba1d7f66235 Mon Sep 17 00:00:00 2001 From: Julian Cardonnet Date: Mon, 3 Jun 2024 09:57:44 -0300 Subject: [PATCH] Add node description field on node metadata --- packages/syft/src/syft/service/settings/settings.py | 4 +++- packages/syft/src/syft/service/settings/settings_service.py | 1 + packages/syft/src/syft/util/schema.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/syft/src/syft/service/settings/settings.py b/packages/syft/src/syft/service/settings/settings.py index 94adfbf307c..2d2a0a0f5f5 100644 --- a/packages/syft/src/syft/service/settings/settings.py +++ b/packages/syft/src/syft/service/settings/settings.py @@ -82,6 +82,7 @@ class NodeSettings(SyftObject): __repr_attrs__ = [ "name", "organization", + "description", "deployed_on", "signup_enabled", "admin_email", @@ -93,7 +94,7 @@ class NodeSettings(SyftObject): organization: str = "OpenMined" verify_key: SyftVerifyKey on_board: bool = True - description: str = "Text" + description: str = "This is the default description for a Domain Node." node_type: NodeType = NodeType.DOMAIN signup_enabled: bool admin_email: str @@ -116,6 +117,7 @@ def _repr_html_(self) -> Any:

Id: {self.id}

Name: {self.name}

Organization: {self.organization}

+

Description: {self.description}

Deployed on: {self.deployed_on}

Signup enabled: {self.signup_enabled}

Admin email: {self.admin_email}

diff --git a/packages/syft/src/syft/service/settings/settings_service.py b/packages/syft/src/syft/service/settings/settings_service.py index 35ef9262860..f404c498662 100644 --- a/packages/syft/src/syft/service/settings/settings_service.py +++ b/packages/syft/src/syft/service/settings/settings_service.py @@ -353,6 +353,7 @@ def welcome_show( FONT_CSS=FONT_CSS, grid_symbol=load_png_base64("small-grid-symbol-logo.png"), domain_name=context.node.name, + description=context.node.metadata.description, # node_url='http://testing:8080', node_type=context.node.metadata.node_type.capitalize(), node_side_type=node_side_type, diff --git a/packages/syft/src/syft/util/schema.py b/packages/syft/src/syft/util/schema.py index f918ed0d4af..fc4003267c3 100644 --- a/packages/syft/src/syft/util/schema.py +++ b/packages/syft/src/syft/util/schema.py @@ -59,6 +59,7 @@

Welcome to $domain_name

URL: $node_url
+ Node Description: $description
Node Type: $node_type
Node Side Type:$node_side_type
Syft Version: $node_version