From 8159ca58751389ba684662ca830da01519ce3047 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sat, 12 Apr 2025 12:49:56 -0700 Subject: [PATCH] add development guide --- .env.example | 1 + .gitignore | 3 ++- CONTRIBUTING.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .env.example create mode 100644 CONTRIBUTING.md diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..27d7e8ba --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +PYPI_TOKEN=your-pypi-token \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5bf40b47..bdbc2962 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,5 @@ pip_overrides.json check2.sh /venv/ build -*.egg-info \ No newline at end of file +*.egg-info +.env \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..318b5795 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,47 @@ +## Testing Changes + +1. Activate the ComfyUI environment. + +2. Build package locally after making changes. + +```bash +# from inside the ComfyUI-Manager directory, with the ComfyUI environment activated +python -m build +``` + +3. Install the package locally in the ComfyUI environment. + +```bash +# Uninstall existing package +pip uninstall comfyui-manager + +# Install the locale package +pip install dist/comfyui-manager-*.whl +``` + +4. Start ComfyUI. + +```bash +# after navigating to the ComfyUI directory +python main.py +``` + +## Manually Publish Test Version to PyPi + +1. Set the `PYPI_TOKEN` environment variable in env file. + +2. If manually publishing, you likely want to use a release candidate version, so set the version in [pyproject.toml](pyproject.toml) to something like `0.0.1rc1`. + +3. Build the package. + +```bash +python -m build +``` + +4. Upload the package to PyPi. + +```bash +python -m twine upload dist/* --username __token__ --password $PYPI_TOKEN +``` + +5. View at https://pypi.org/project/comfyui-manager/ diff --git a/pyproject.toml b/pyproject.toml index 710270a9..00fe1d61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "comfyui-manager" license = { text = "GPL-3.0-only" } -version = "4.0" +version = "4.0.0-beta.1" requires-python = ">= 3.9" description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI." readme = "README.md"