From 0978dd8e3c1a0a5e42d5de55791e8ee3d27c7e98 Mon Sep 17 00:00:00 2001 From: Kapitan Date: Sat, 15 Mar 2025 23:45:56 +0100 Subject: [PATCH] Update version to 0.5.2 and enhance installation instructions in README --- README.md | 37 +++++++++++++------ kapitanbooru_uploader/ImageBrowser.py | 2 +- .../locales/en/LC_MESSAGES/messages.po | 2 +- .../locales/pl/LC_MESSAGES/messages.po | 2 +- pyproject.toml | 19 ++++++---- 5 files changed, 40 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a0588b8..4fadd1b 100644 --- a/README.md +++ b/README.md @@ -12,25 +12,47 @@ Kapitanbooru Uploader is a GUI application for uploading images to KapitanBooru. ## Installation 1. Clone the repository: + ```sh git clone https://git.mlesniak.pl/kapitan/kapitanbooru-uploader.git cd kapitanbooru-uploader ``` -2. Install the required dependencies: - ```sh - pip install -r requirements.txt +2. **Standard Installation (Supports most NVIDIA GPUs):** + + ```bash + pip install . + ``` + +3. **For RTX 50xx (Blackwell GPUs) with CUDA 12 Nightly Support:** + Requires the `cuda12-nightly` extra and PyTorch nightly binaries: + + ```bash + pip install ".[cuda12-nightly]" --extra-index-url https://download.pytorch.org/whl/nightly/cu128 --pre + ``` + + Using `pipx` for isolated installation: + + ```bash + pipx install "kapitanbooru-uploader[cuda12-nightly]" --pip-args "--extra-index-url https://download.pytorch.org/whl/nightly/cu128 --pre" ``` -3. Ensure you have the required Python version: +4. Verify Python version: + ```sh python --version # Should be >= 3.13 ``` +⚠️ **Notes:** + +- The `cuda12-nightly` extra depends on pre-release PyTorch packages from the specified index. +- Private PyPI repository (for `wdtagger[cuda12-nightly]`) must already be configured in your environment (no URL needed here). + ## Usage 1. Run the application: + ```sh python -m kapitanbooru_uploader.main ``` @@ -45,13 +67,6 @@ Configuration settings can be found in the `settings.json` file located in the a ## Development -### Running Tests - -To run tests, use the following command: -```sh -pytest -``` - ### Debugging You can use the provided VSCode launch configurations to debug the application. Open the `.vscode/launch.json` file and select the appropriate configuration. diff --git a/kapitanbooru_uploader/ImageBrowser.py b/kapitanbooru_uploader/ImageBrowser.py index 4af13f1..4c2877a 100644 --- a/kapitanbooru_uploader/ImageBrowser.py +++ b/kapitanbooru_uploader/ImageBrowser.py @@ -142,7 +142,7 @@ class ImageBrowser(tk.Tk): super().__init__() self.title("Kapitanbooru Uploader") self.geometry("900x600") - self.version = "0.5.1" + self.version = "0.5.2" self.acknowledged_version = parse_version(self.version) self.settings = Settings() diff --git a/kapitanbooru_uploader/locales/en/LC_MESSAGES/messages.po b/kapitanbooru_uploader/locales/en/LC_MESSAGES/messages.po index 8c2fc4e..643a5e6 100644 --- a/kapitanbooru_uploader/locales/en/LC_MESSAGES/messages.po +++ b/kapitanbooru_uploader/locales/en/LC_MESSAGES/messages.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"Project-Id-Version: Kapitanbooru Uploader 0.5.1\n" +"Project-Id-Version: Kapitanbooru Uploader 0.5.2\n" "Report-Msgid-Bugs-To: kapitan@mlesniak.pl\n" "POT-Creation-Date: 2025-03-15 19:42+0100\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/kapitanbooru_uploader/locales/pl/LC_MESSAGES/messages.po b/kapitanbooru_uploader/locales/pl/LC_MESSAGES/messages.po index 2487335..e92e4dd 100644 --- a/kapitanbooru_uploader/locales/pl/LC_MESSAGES/messages.po +++ b/kapitanbooru_uploader/locales/pl/LC_MESSAGES/messages.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"Project-Id-Version: Kapitanbooru Uploader 0.5.1\n" +"Project-Id-Version: Kapitanbooru Uploader 0.5.2\n" "Report-Msgid-Bugs-To: kapitan@mlesniak.pl\n" "POT-Creation-Date: 2025-03-15 19:42+0100\n" "Language: pl\n" diff --git a/pyproject.toml b/pyproject.toml index 37205ae..db76d40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,23 +4,26 @@ build-backend = "setuptools.build_meta" [project] name = "kapitanbooru-uploader" -version = "0.5.1" +version = "0.5.2" description = "A GUI application for uploading images to KapitanBooru" -authors = [ - {name = "Michał Leśniak", email = "kapitan@mlesniak.pl"} -] +authors = [{ name = "Michał Leśniak", email = "kapitan@mlesniak.pl" }] dependencies = [ "networkx==3.4.2", "Pillow==11.1.0", "pywin32==309", "requests==2.32.3", - "wdtagger[cuda12-nightly]==0.14.0", + "wdtagger==0.14.0", "bs4==0.0.2", - "tomli==2.2.1" + "tomli==2.2.1", ] requires-python = ">=3.13" readme = "README.md" -license = {file = "LICENSE"} +license = { file = "LICENSE" } + +[project.optional-dependencies] +cuda12-nightly = [ + "wdtagger[cuda12-nightly]==0.14.0", +] # Pulls from private PyPI (auto-configured via env) [project.scripts] kapitanbooru-uploader = "kapitanbooru_uploader.__main__:main" @@ -30,4 +33,4 @@ packages = ["kapitanbooru_uploader"] include-package-data = true [tool.setuptools.package-data] -"kapitanbooru_uploader" = ["locales/*/LC_MESSAGES/*.mo"] \ No newline at end of file +"kapitanbooru_uploader" = ["locales/*/LC_MESSAGES/*.mo"]