Skip to content

Commit b9cc24f

Browse files
snomiaoCopilot
andauthored
Update pyproject specifications ver2 #281 (#285)
* feat(config_parser.py): add comments for ComfyUI version compatibility and project classifiers to improve documentation and usability chore(config_parser.py): enhance project URLs by adding Documentation and Bug Tracker links for better project navigation * Update comfy_cli/registry/config_parser.py Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 573f777 commit b9cc24f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

comfy_cli/registry/config_parser.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ def create_comfynode_config():
4545
comfy["Icon"] = ""
4646
comfy["includes"] = tomlkit.array()
4747

48+
# Add uncommentable hint for ComfyUI version compatibility, below of "[tool.comfy].includes" field.
49+
comfy["includes"].comment("""
50+
# "requires-comfyui" = ">=1.0.0" # ComfyUI version compatibility
51+
""")
52+
4853
tool.add("comfy", comfy)
4954
document.add("tool", tool)
5055

@@ -181,6 +186,9 @@ def initialize_project_config():
181186
project = document.get("project", tomlkit.table())
182187
urls = project.get("urls", tomlkit.table())
183188
urls["Repository"] = git_remote_url
189+
urls["Documentation"] = git_remote_url + "/wiki"
190+
urls["Bug Tracker"] = git_remote_url + "/issues"
191+
184192
project["urls"] = urls
185193
project["name"] = sanitize_node_name(repo_name)
186194
project["description"] = ""
@@ -191,6 +199,36 @@ def initialize_project_config():
191199
license_table["file"] = "LICENSE"
192200
project["license"] = license_table
193201

202+
# [project].classifiers Classifiers uncommentable hint for OS/GPU support
203+
# Attach classifiers comments to the project, below of "license" field.
204+
# will generate a comment like this:
205+
#
206+
# [project]
207+
# ...
208+
# license = {file = "LICENSE"}
209+
# # classifiers = [
210+
# # # For OS-independent nodes (works on all operating systems)
211+
# ...
212+
213+
project["license"].comment("""
214+
# classifiers = [
215+
# # For OS-independent nodes (works on all operating systems)
216+
# "Operating System :: OS Independent",
217+
#
218+
# # OR for OS-specific nodes, specify the supported systems:
219+
# "Operating System :: Microsoft :: Windows", # Windows specific
220+
# "Operating System :: POSIX :: Linux", # Linux specific
221+
# "Operating System :: MacOS", # macOS specific
222+
#
223+
# # GPU Accelerator support. Pick the ones that are supported by your extension.
224+
# "Environment :: GPU :: NVIDIA CUDA", # NVIDIA CUDA support
225+
# "Environment :: GPU :: AMD ROCm", # AMD ROCm support
226+
# "Environment :: GPU :: Intel Arc", # Intel Arc support
227+
# "Environment :: NPU :: Huawei Ascend", # Huawei Ascend support
228+
# "Environment :: GPU :: Apple Metal", # Apple Metal support
229+
# ]
230+
""")
231+
194232
tool = document.get("tool", tomlkit.table())
195233
comfy = tool.get("comfy", tomlkit.table())
196234
comfy["DisplayName"] = repo_name

0 commit comments

Comments
 (0)