Add pyproject.toml for Custom Node Registry#1
Add pyproject.toml for Custom Node Registry#1robinjhuang wants to merge 1 commit intoRunware:mainfrom
Conversation
adf0cb0 to
3f3b9b7
Compare
2c342da to
f199ae1
Compare
bb95926 to
0534b32
Compare
9273eee to
86aa7bf
Compare
3f7996c to
52198a0
Compare
e9b82fa to
18de987
Compare
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds a new Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
pyproject.toml (1)
1-5: Add packaging baseline fields for broader tool compatibility.The pyproject.toml is missing
[build-system]andrequires-python. While modern build tools default to setuptools when absent, including explicit[build-system]is strongly recommended per PyPA guidance for reliability and reproducibility. Therequires-pythonfield should match the documented requirement of Python 3.10+ from the README.Proposed metadata completion
+[build-system] +requires = ["setuptools>=68", "wheel"] +build-backend = "setuptools.build_meta" + [project] name = "runware" description = "Runware Inference API Integration for ComfyUI (No GPU Required)." version = "1.0.0" license = "MIT" +requires-python = ">=3.10"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pyproject.toml` around lines 1 - 5, The pyproject.toml is missing explicit build-system metadata and the project's Python requirement; add a requires-python field under the [project] table (e.g. requires-python = ">=3.10") and add a [build-system] table with build-backend = "setuptools.build_meta" and a requires list such as ["setuptools>=61.0","wheel"] so builds are reproducible and tools recognize the Python baseline; update the existing [project] block (name/version/license) and add the new [build-system] block to the file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pyproject.toml`:
- Line 32: The PublisherId field is currently empty; set PublisherId to your
registered Comfy Registry publisher identifier (e.g., your GitHub username)
instead of ""; obtain/register the ID at registry.comfy.org if you don't have
one and update the PublisherId value in pyproject.toml so it is a non-empty
string.
- Line 23: Update the dependencies list in pyproject.toml to remove the unused
"imageio" entry and add explicit major-version constraints for each remaining
package (e.g., use ranges like ">=1,<2" to pin to a major version).
Specifically, replace the current dependencies = ["python-dotenv", "brotli",
"zstd", "librosa", "imageio"] with a list that removes "imageio" and constrains
"python-dotenv", "brotli", "zstd", and "librosa" to a major-version range (for
example "python-dotenv >=1,<2", "brotli >=1,<2", "zstd >=1,<2", "librosa >=0,<1"
or other appropriate major ranges), ensuring reproducible installs.
---
Nitpick comments:
In `@pyproject.toml`:
- Around line 1-5: The pyproject.toml is missing explicit build-system metadata
and the project's Python requirement; add a requires-python field under the
[project] table (e.g. requires-python = ">=3.10") and add a [build-system] table
with build-backend = "setuptools.build_meta" and a requires list such as
["setuptools>=61.0","wheel"] so builds are reproducible and tools recognize the
Python baseline; update the existing [project] block (name/version/license) and
add the new [build-system] block to the file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| # "Environment :: GPU :: Apple Metal", # Apple Metal support | ||
| # ] | ||
|
|
||
| dependencies = ["python-dotenv", "brotli", "zstd", "librosa", "imageio"] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify import-to-dependency alignment for compression libs.
# Expected: imports should consistently match chosen dependency package names.
rg -n -C2 --type=py '\bimport\s+zstd\b|\bfrom\s+zstd\b|\bimport\s+zstandard\b|\bfrom\s+zstandard\b'Repository: Runware/ComfyUI-Runware
Length of output: 49
🏁 Script executed:
# First, read the pyproject.toml to see full context and current versions
head -40 pyproject.tomlRepository: Runware/ComfyUI-Runware
Length of output: 1508
🏁 Script executed:
# Search for imports of all the flagged dependencies
rg -n --type=py '\b(import python_dotenv|from python_dotenv|import dotenv|from dotenv|import brotli|from brotli|import librosa|from librosa|import imageio|from imageio)' || echo "No direct imports found"Repository: Runware/ComfyUI-Runware
Length of output: 173
🏁 Script executed:
# Check if any dependencies are mentioned elsewhere in the code
rg -n '(python-dotenv|brotli|zstd|librosa|imageio)' --type=toml --type=txt --type=md | head -30Repository: Runware/ComfyUI-Runware
Length of output: 299
🏁 Script executed:
# Search for any reference to brotli, zstd, imageio in the codebase
rg -n '(brotli|zstd|imageio)' --type=py | head -20Repository: Runware/ComfyUI-Runware
Length of output: 416
🏁 Script executed:
# Check if there are any conditional imports or usage patterns
rg -n 'brotli|zstandard' --type=py -C3Repository: Runware/ComfyUI-Runware
Length of output: 49
🏁 Script executed:
# List all Python files to understand the codebase structure
fd --type f -e py | head -20Repository: Runware/ComfyUI-Runware
Length of output: 670
🏁 Script executed:
# Check if brotli or zstd are imported indirectly through requests or other libraries
rg -n 'import requests|from requests|requests\.' --type=py | head -10Repository: Runware/ComfyUI-Runware
Length of output: 788
🏁 Script executed:
# Search for all imports to understand dependencies better
rg -n '^import |^from ' --type=py | grep -E '(brotli|zstd|imageio|librosa|dotenv)' || echo "No additional imports of these packages"Repository: Runware/ComfyUI-Runware
Length of output: 173
🏁 Script executed:
# Check the overall imports and dependencies structure
rg -n 'Accept-Encoding' --type=py -B2 -A2Repository: Runware/ComfyUI-Runware
Length of output: 1361
🏁 Script executed:
# Verify if imageio is actually used anywhere in the codebase
rg -n 'imageio|image' --type=py | grep -v '^Binary' | head -20Repository: Runware/ComfyUI-Runware
Length of output: 3667
🏁 Script executed:
# Check if imageio is truly unused - search more comprehensively
rg -n 'imageio' --type=py -iRepository: Runware/ComfyUI-Runware
Length of output: 49
🏁 Script executed:
# Check requirements.txt to see if it has any version pins
cat requirements.txtRepository: Runware/ComfyUI-Runware
Length of output: 112
🏁 Script executed:
# Look for any package metadata or setup files that might indicate versions
find . -name "*.txt" -o -name "*.md" -o -name "*.rst" | grep -E '(readme|INSTALL|requirements|DEPENDENCIES)' | head -10Repository: Runware/ComfyUI-Runware
Length of output: 86
🏁 Script executed:
# Check if there's a lock file or any pinned dependencies elsewhere
find . -name "*.lock" -o -name "poetry.lock" -o -name "pipfile.lock" 2>/dev/nullRepository: Runware/ComfyUI-Runware
Length of output: 49
🏁 Script executed:
# Double-check for imageio - search more broadly including comments
rg -n 'imageio' --type=py --type=toml --type=txt -i -C2Repository: Runware/ComfyUI-Runware
Length of output: 334
🏁 Script executed:
# Check git history to understand why imageio was added
git log --oneline --all --grep="imageio" || echo "No git history found"Repository: Runware/ComfyUI-Runware
Length of output: 49
🏁 Script executed:
# Verify the actual usage context of brotli and zstd through requests library
rg -n 'requests\.' --type=py | grep -i 'session\|adapter\|mount' | head -10Repository: Runware/ComfyUI-Runware
Length of output: 203
🏁 Script executed:
# Get more context on how brotli/zstd are used - check HTTPAdapter configuration
rg -n 'HTTPAdapter' --type=py -A5 -B5Repository: Runware/ComfyUI-Runware
Length of output: 1200
🏁 Script executed:
# Final verification: search for any commented-out or future imageio usage
rg -n 'imageio' . --type=py --type=md --type=txt -iRepository: Runware/ComfyUI-Runware
Length of output: 96
🏁 Script executed:
# Check git to see if imageio was recently removed or if there are feature branches
git log --oneline --all | grep -i 'imageio\|image' | head -5 || echo "No git history available"Repository: Runware/ComfyUI-Runware
Length of output: 386
Add version constraints to dependencies and remove unused imageio package.
The dependencies in pyproject.toml (line 23) are unbounded, which can lead to non-reproducible builds when upstream packages release new versions. Additionally, imageio does not appear to be used anywhere in the codebase and should be removed.
Of the remaining dependencies:
python-dotenvandlibrosaare directly importedbrotliandzstdare indirectly used by therequestslibrary for compression support (referenced in Accept-Encoding headers)
Apply version constraints to pin major versions:
Proposed dependency update
-dependencies = ["python-dotenv", "brotli", "zstd", "librosa", "imageio"]
+dependencies = [
+ "python-dotenv>=1.0,<2",
+ "brotli>=1.1,<2",
+ "zstd>=1.5,<2",
+ "librosa>=0.10,<1",
+]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| dependencies = ["python-dotenv", "brotli", "zstd", "librosa", "imageio"] | |
| dependencies = [ | |
| "python-dotenv>=1.0,<2", | |
| "brotli>=1.1,<2", | |
| "zstd>=1.5,<2", | |
| "librosa>=0.10,<1", | |
| ] |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pyproject.toml` at line 23, Update the dependencies list in pyproject.toml to
remove the unused "imageio" entry and add explicit major-version constraints for
each remaining package (e.g., use ranges like ">=1,<2" to pin to a major
version). Specifically, replace the current dependencies = ["python-dotenv",
"brotli", "zstd", "librosa", "imageio"] with a list that removes "imageio" and
constrains "python-dotenv", "brotli", "zstd", and "librosa" to a major-version
range (for example "python-dotenv >=1,<2", "brotli >=1,<2", "zstd >=1,<2",
"librosa >=0,<1" or other appropriate major ranges), ensuring reproducible
installs.
| "Bug Tracker" = "https://github.com/Runware/ComfyUI-Runware/issues" | ||
|
|
||
| [tool.comfy] | ||
| PublisherId = "" |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Comfy Registry pyproject.toml requirements: Is [tool.comfy].PublisherId required and must it be non-empty for publishing?
💡 Result:
Yes, [tool.comfy].PublisherId is required in pyproject.toml for publishing to Comfy Registry, and it must be non-empty. The official documentation explicitly states it as "PublisherId (required)" and describes it as "Your unique publisher identifier, typically matching your GitHub username." Publishing guides require creating a publisher account on registry.comfy.org to obtain this ID (after the @ on your profile) and adding it to pyproject.toml. Examples from repos like ComfyUI-Manager use non-empty values like "drltdata". CLI tools parse it, and PRs emphasize adding it for registry inclusion.
Citations:
- 1: https://docs.comfy.org/registry/specifications
- 2: https://github.com/Comfy-Org/ComfyUI-Manager/blob/main/pyproject.toml
- 3: https://github.com/Comfy-Org/comfy-cli/blob/078ef4b5/comfy_cli/registry/config_parser.py
- 4: Add pyproject.toml for Custom Node Registry rgthree/rgthree-comfy#234
- 5: https://docs.comfy.org/registry/publishing
PublisherId is empty and required for Comfy Registry publishing.
Line 32 sets PublisherId = "". According to Comfy Registry specifications, PublisherId is a required field that must contain your non-empty publisher identifier (typically your GitHub username). Register on registry.comfy.org to obtain your publisher ID and add it here.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pyproject.toml` at line 32, The PublisherId field is currently empty; set
PublisherId to your registered Comfy Registry publisher identifier (e.g., your
GitHub username) instead of ""; obtain/register the ID at registry.comfy.org if
you don't have one and update the PublisherId value in pyproject.toml so it is a
non-empty string.
Hey! My name is Robin and I'm from comfy-org! We would love to have you join the Comfy Registry, a public collection of custom nodes which lets authors publish nodes by version and automate testing against existing workflows.
Eventually, the registry will be integrated as a backend for the UI-manager where all nodes will go through a security scan. Nodes that pass these checks will have a verification flag (✅) beside their name on the UI-manager. Feel free to read up more on the registry here
Action Required:
@sign on your registry profile).If you want to publish the node manually, install the cli by running
pip install comfy-cli, then runcomfy node publishOtherwise, if you have any questions, please message me on discord at robinken or join our server!
Summary by CodeRabbit