Skip to content

Commit 7c2cdaf

Browse files
author
coderfromthenorth93
committed
Extract supported_os from config and push to the registry service
1 parent 2e36f33 commit 7c2cdaf

3 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+
"supported_os": node_config.project.supported_os,
5758
},
5859
"node_version": {
5960
"version": node_config.project.version,

comfy_cli/registry/config_parser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ def extract_node_configuration(
157157
urls_data = project_data.get("urls", {})
158158
comfy_data = data.get("tool", {}).get("comfy", {})
159159

160+
classifiers = project_data.get("classifiers", [])
161+
supported_os = [c for c in classifiers if c.startswith("Operating System :: ")]
162+
160163
license_data = project_data.get("license", {})
161164
if isinstance(license_data, str):
162165
license = License(text=license_data)
@@ -190,6 +193,7 @@ def extract_node_configuration(
190193
repository=urls_data.get("Repository", ""),
191194
issues=urls_data.get("Issues", ""),
192195
),
196+
supported_os=supported_os, # Add the OS classifiers
193197
)
194198

195199
comfy = ComfyConfig(

comfy_cli/registry/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class ProjectConfig:
6969
dependencies: List[str] = field(default_factory=list)
7070
license: License = field(default_factory=License)
7171
urls: URLs = field(default_factory=URLs)
72+
supported_os: List[str] = field(default_factory=list)
7273

7374

7475
@dataclass

0 commit comments

Comments
 (0)