Skip to content

Commit 23669c9

Browse files
author
coderfromthenorth93
committed
Parse banner url from toml file and send it to registry service while publishing a new node version
1 parent e22eaf7 commit 23669c9

4 files changed

Lines changed: 6 additions & 0 deletions

File tree

comfy_cli/registry/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def publish_node_version(self, node_config: PyProjectConfig, token) -> PublishNo
5454
"name": node_config.tool_comfy.display_name,
5555
"license": license_json,
5656
"repository": node_config.project.urls.repository,
57+
"banner_url": node_config.project.urls.banner,
5758
"supported_os": node_config.project.supported_os,
5859
"supported_accelerators": node_config.project.supported_accelerators,
5960
"supported_comfyui_version": node_config.project.supported_comfyui_version,

comfy_cli/registry/config_parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def create_comfynode_config():
3131

3232
urls = tomlkit.table()
3333
urls["Repository"] = ""
34+
urls["Banner"] = ""
3435

3536
project.add("urls", urls)
3637
document.add("project", project)
@@ -282,6 +283,7 @@ def extract_node_configuration(
282283
documentation=urls_data.get("Documentation", ""),
283284
repository=urls_data.get("Repository", ""),
284285
issues=urls_data.get("Issues", ""),
286+
banner=urls_data.get("Banner", ""),
285287
),
286288
supported_os=supported_os,
287289
supported_accelerators=supported_accelerators,

comfy_cli/registry/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class URLs:
3737
documentation: str = ""
3838
repository: str = ""
3939
issues: str = ""
40+
banner: str = ""
4041

4142

4243
@dataclass

tests/comfy_cli/registry/test_config_parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def mock_toml_data():
3131
"Documentation": "https://docs.example.com",
3232
"Repository": "https://github.com/example/test-project",
3333
"Issues": "https://github.com/example/test-project/issues",
34+
"Banner": "https://example.com/banner.png",
3435
},
3536
},
3637
"tool": {
@@ -73,6 +74,7 @@ def test_extract_node_configuration_success(mock_toml_data):
7374
documentation="https://docs.example.com",
7475
repository="https://github.com/example/test-project",
7576
issues="https://github.com/example/test-project/issues",
77+
banner="https://example.com/banner.png",
7678
)
7779
assert result.tool_comfy.publisher_id == "test-publisher"
7880
assert result.tool_comfy.display_name == "Test Project"

0 commit comments

Comments
 (0)