mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2025-12-31 20:14:10 +08:00
* feat: create a /jobs api to return queue and history jobs
* update unused vars
* include priority
* create jobs helper file
* fix ruff
* update how we set error message
* include execution error in both responses
* rename error -> failed, fix output shape
* re-use queue and history functions
* set workflow id
* allow srot by exec duration
* fix tests
* send priority and remove error msg
* use ws messages to get start and end times
* revert main.py fully
* refactor: move all /jobs business logic to jobs.py
* fix failing test
* remove some tests
* fix non dict nodes
* address comments
* filter by workflow id and remove null fields
* add clearer typing - remove get("..") or ..
* refactor query params to top get_job(s) doc, add remove_sensitive_from_queue
* add brief comment explaining why we skip animated
* comment that format field is for frontend backward compatibility
* fix whitespace
---------
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
Co-authored-by: guill <jacob.e.segal@gmail.com>
Automated Testing
Running tests locally
Additional requirements for running tests:
pip install pytest
pip install websocket-client==1.6.1
opencv-python==4.6.0.66
scikit-image==0.21.0
Run inference tests:
pytest tests/inference
Quality regression test
Compares images in 2 directories to ensure they are the same
- Run an inference test to save a directory of "ground truth" images
pytest tests/inference --output_dir tests/inference/baseline
-
Make code edits
-
Run inference and quality comparison tests
pytest