Skip to content

Commit 47a9563

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

3 files changed

Lines changed: 8 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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ def extract_node_configuration(
157157
urls_data = project_data.get("urls", {})
158158
comfy_data = data.get("tool", {}).get("comfy", {})
159159

160+
# Extract classifiers
161+
classifiers = project_data.get("classifiers", [])
162+
# Filter for OS-specific classifiers
163+
supported_os = [c for c in classifiers if c.startswith("Operating System :: ")]
164+
160165
license_data = project_data.get("license", {})
161166
if isinstance(license_data, str):
162167
license = License(text=license_data)
@@ -190,6 +195,7 @@ def extract_node_configuration(
190195
repository=urls_data.get("Repository", ""),
191196
issues=urls_data.get("Issues", ""),
192197
),
198+
supported_os=supported_os, # Add the OS classifiers
193199
)
194200

195201
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)