Commit Graph

15 Commits

Author SHA1 Message Date
Jedrzej Kosinski
49e205acd4
feat: add pygit2 compatibility wrapper for standalone Desktop 2.0 installs (#2719)
Some checks failed
Publish to PyPI / build-and-publish (push) Has been cancelled
Python Linting / Run Ruff (push) Has been cancelled
* feat: add pygit2 compatibility wrapper for standalone Desktop 2.0 installs

Add git_compat.py abstraction layer that wraps both GitPython and pygit2
behind a unified GitRepo interface. When CM_USE_PYGIT2=1 is set (by the
Desktop 2.0 Launcher for standalone installs), or when system git is not
available, the pygit2 backend is used automatically.

Key changes:
- New comfyui_manager/common/git_compat.py with abstract GitRepo base class,
  _GitPythonRepo (1:1 pass-throughs) and _Pygit2Repo implementations
- All 6 non-legacy files updated to use the wrapper:
  - comfyui_manager/glob/manager_core.py (14 git.Repo usages)
  - comfyui_manager/common/git_helper.py (7 git.Repo usages)
  - comfyui_manager/common/context.py (1 usage)
  - comfyui_manager/glob/utils/environment_utils.py (2 usages)
  - cm_cli/__main__.py (1 usage)
  - comfyui_manager/common/timestamp_utils.py (repo.heads usage)
- get_script_env() propagates CM_USE_PYGIT2 to subprocesses
- git_helper.py uses sys.path.insert to find git_compat as standalone script
- All repo handles wrapped in context managers to prevent resource leaks
- get_head_by_name returns _HeadProxy for interface consistency
- Submodule fallback logs clear message when system git is absent
- 47 tests comparing both backends via subprocess isolation

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d0ec5-cb9f-74df-a1a2-0c8154a330b3

* fix(pygit2): address review findings + bump version to 4.2b1

- C1: add submodule_update() after pygit2 clone for recursive parity
- C2: check subprocess returncode in submodule_update fallback
- C3: move GIT_OPT_SET_OWNER_VALIDATION to module-level (once at import)
- H1: use context manager in git_pull() to prevent resource leaks
- Bump version to 4.2b1, version_code to [4, 2]
- Add pygit2 to dev dependencies and requirements.txt

* style: fix ruff F841 unused variable and F541 unnecessary f-string

---------

Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Dr.Lt.Data <dr.lt.data@gmail.com>
2026-03-27 08:42:26 +09:00
Dr.Lt.Data
69b6f1a66b Merge branch 'main' into manager-v4 2025-11-26 22:14:11 +09:00
wzgrx
5dab865681
Update requirements.txt (#2242) 2025-10-26 12:57:49 +09:00
Dr.Lt.Data
00fb9c88e1 modified: remove matrix-nio dependency from the requirements.txt
modified: The matrix share feature is now only available when the `matrix-nio` dependency is installed.

If `matrix-nio` is not installed:
1. Apply a strikethrough to the matrix checkbox text in the share UI and display a tooltip.
2. A warning is logged at startup indicating that `matrix-nio` is missing, along with the installation command.

fixed: Corrected an issue where PR #2025 was merged into draft-v4 but applied only to `legacy/..` and not to `glob/..`
2025-08-22 20:46:32 +09:00
YAN Wenkun
d4715aebef
Migrate matrix-client to matrix-nio (#2025) 2025-07-25 06:59:46 +09:00
Dr.Lt.Data
60a5e4f261 fixed: address abnormal encoding of 'requirements.txt'
improved: better error message

https://github.com/ltdrdata/ComfyUI-Manager/issues/1513
2025-02-16 10:05:29 +09:00
Dr.Lt.Data
816a53a7b1 fixed: add uv to requirements.txt
fixed: invalid interpretation of use_uv config item on prestartup_script

https://github.com/ltdrdata/ComfyUI-Manager/issues/1511
2025-02-03 09:21:20 +09:00
huchenlei
9d1ef85af8 Add NodePackage 2024-12-20 14:09:07 -08:00
Dr.Lt.Data
9b5a2530fd refactoring cm-cli.py based on typer
fix: git_helper - --pip-non-url isn't working properly
2024-05-15 17:29:13 +09:00
Dr.Lt.Data
e75770cc4d fix: try install 'distutils' when distutils package is missing
afaik, distutils is a basic package

https://github.com/ltdrdata/ComfyUI-Manager/issues/536
2024-04-03 00:33:42 +09:00
Dr.Lt.Data
ff0cc58076 fix requirements 2024-04-03 00:26:53 +09:00
Liu Sida
abae9638ac
Add GitHub stats for custom nodes (#533)
* Add GitHub stats fetching feature
- Added PyGithub package to requirements.txt for GitHub API interaction
- Updated .gitignore to ignore github-stats-cache.json
- Produced github-stats.json for storing GitHub stats
- Modified scanner.py to include the GitHub stats fetching process

* Add sorting for 'GitHub Stars' and 'Last Update' columns

- Fetch 'GitHub Stars' and 'Last Update' data when getting the custom node list.
- Display 'GitHub Stars' and 'Last Update' information in the UI.
- Implement sorting functionality for these two columns, allowing users to sort both in descending and ascending order.

* fix: scanner - prevent stuck when exceed rate limit

---------

Co-authored-by: Dr.Lt.Data <dr.lt.data@gmail.com>
2024-04-02 20:56:09 +09:00
Dr.Lt.Data
c2bac90fde requirements.txt updated
- it seems recent `transformers` cannot detect proper version of `huggingface-hub`
2024-01-08 00:06:02 +09:00
thecooltechguy
b93ae5af40 added matrix server as a destination for sharing 2023-10-20 17:06:39 -07:00
Dr.Lt.Data
384071c9dd missing requirements.txt 2023-05-17 10:46:31 +09:00