Pytest treats the rootdir as a Package because the ComfyUI entry point __init__.py lives there, and it inferred the rootdir's package name from the dir name. In local checkouts the dir is `hold_counter`, which clashed with our subpackage of the same name and caused `import hold_counter.node` to resolve to the rootdir's __init__.py (no `node` attribute). The CI runner sees a different dir name (`ComfyUI-HoldCounter`), where the same machinery instead tried to import the rootdir __init__.py standalone with no parent package and exploded on the relative import. Renaming the subpackage to `_impl/` (signalling it is internal) breaks the name clash and makes pytest collection work in both environments. Also adds `pythonpath = ["."]` and `--import-mode=importlib` to pyproject's pytest config so the rootdir is importable without sys.path hacks and pytest does not synthesise a Package collector. Other CI hygiene (also folded in here): * setup-uv@v3 -> @v6, actions/checkout@v4 -> @v5 to clear the GitHub Node.js 20 deprecation warnings. * setup-uv `cache-dependency-glob: pyproject.toml` (uv.lock is gitignored, so the default **/uv.lock glob fails the job). Public-facing surface unchanged (NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS, WEB_DIRECTORY remain at the rootdir __init__.py, which is the only thing ComfyUI ever imports).
12 lines
371 B
Python
12 lines
371 B
Python
"""ComfyUI entry point.
|
|
|
|
Re-exports the node mappings from the implementation package and points ComfyUI at the bundled
|
|
``web/`` extension directory. The actual code lives under :mod:`_impl`.
|
|
"""
|
|
|
|
from ._impl import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
|
|
|
|
WEB_DIRECTORY = "./web"
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|