Pin the Python version to 3.11, since OpenAssetIO is currently
unavailable on PyPI for 3.12 (i.e. only currently supports VFX Reference
Platform CY23/24).
Checkout ComfyUI and add to PYTHONPATH for tests, since we make use of
its internal utility libraries. We also make use of some of the
dependencies of ComfyUI (e.g. numpy), so install ComfyUI's dependencies
into the environment.
Signed-off-by: David Feltell <david.feltell@foundry.com>
At the moment, we have no history to diff against, resulting in an error
> Error loading nodes: Could not find __init__.py in base_repo
This commit should be reverted once the initial node implementation has
been merged to main.
Signed-off-by: David Feltell <david.feltell@foundry.com>
ComfyUI discovers plugins from a `custom_nodes` directory, and so it
doesn't use the Python environment to locate plugins. However, we have
dependencies that must be installed into the Python environment for our
plugin to work.
It is implied in the docs that bundling a `requirements.txt` file is how
the ComfyUI CLI and Manager discovers and installs plugin dependencies.
In addition, a separate `requirements.txt` allows cleaner manual
installation (i.e. clone the repo under `ComfyUI/custom_nodes` then
`pip install -r requirements.txt`)
Signed-off-by: David Feltell <david.feltell@foundry.com>
Copy-paste current implementation of core SaveImage, but use a string
input providing an entity reference instead of a file name, and
retrieve target file path from the OpenAssetIO manager.
Support image preview in the UI by copying the published file to a
(temp) directory on ComfyUI's allow-list.
Signed-off-by: David Feltell <david.feltell@foundry.com>
Copy-paste current implementation of core LoadImage, but use a string
input providing an entity reference instead of a file upload, and
retrieve input file path from the OpenAssetIO manager.
Due to the mix-and-match by ComfyUI of class vs. instance methods, plus
no way to inject context, use a singleton class to represent the
OpenAssetIO host application.
Signed-off-by: David Feltell <david.feltell@foundry.com>
Set up ruff to enforce a 99 char line limit, mirroring other OpenAssetIO
projects.
Configure yml with 2-space tabs, mirroring other OpenAssetIO projects
(and the ComfyUI cookiecutter project's defaults).
Bulk reformat using PyCharm configured to use ruff - i.e. Python files
are reformatted using ruff, whilst other files are reformatted
according to .editorconfig and/or PyCharm defaults.
Signed-off-by: David Feltell <david.feltell@foundry.com>