From 5d11c13bd39d6b0d0e7157775c40799a0321cd1b Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Tue, 3 Mar 2026 04:08:57 +0900 Subject: [PATCH 1/9] =?UTF-8?q?docs:=20README=E3=81=AEvenv=E8=A1=A8?= =?UTF-8?q?=E8=A8=98=E3=82=92.venv=5FUSB-Util=E3=81=B8=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 5d273d4..fc0acf2 100644 --- a/README.md +++ b/README.md @@ -302,3 +302,23 @@ MIT License ## 作者 - TITManagement 2025 + +## 対象者 +- 運用担当者: 日常運用・手順実行を行う担当者 +- 開発者: 機能追加・保守を行う担当者 +- 検証担当者: 実機/テスト環境で動作確認を行う担当者 + +## 依存関係 +- Python: `pyproject.toml` の `requires-python` に従う +- 主要ライブラリ: `pyproject.toml` の `dependencies` を参照 +- pip index設定: `$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local` を正本とする + +## 最短セットアップ +`bash` / `zsh` で以下を実行。 +```bash +export AILAB_ROOT=/path/to/AiLab +export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local" +python -m venv .venv_USB-Util +source .venv_USB-Util/bin/activate +python -m pip install -e . +``` From 517e1cdcf7ac6876cc6535fa98799f819272bec8 Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Fri, 6 Mar 2026 06:01:00 +0900 Subject: [PATCH 2/9] =?UTF-8?q?pip=E8=A8=AD=E5=AE=9A=E5=8F=82=E7=85=A7?= =?UTF-8?q?=E5=85=88=E3=82=92config/pip=E6=AD=A3=E6=9C=AC=E3=81=B8?= =?UTF-8?q?=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fc0acf2..e52205f 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,12 @@ USB-utilは、接続済みのUSBデバイス/BLEデバイスをスキャンし #### 【重要】pip index一元管理について 依存解決の再現性向上のため、pip の index 設定は -`$AILAB_ROOT/lab_automation_libs/internal-PyPI/pip.conf.local` を正本とします。 +`$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local` を正本とします。 ローカル環境では `AILAB_ROOT` を各マシンで設定してから `PIP_CONFIG_FILE` を指定してください。 ```bash export AILAB_ROOT=/path/to/AiLab -export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_libs/internal-PyPI/pip.conf.local" +export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local" ``` CI では `PIP_CONFIG_FILE` 固定ではなく、環境変数で index を注入してください。 @@ -111,12 +111,12 @@ pyserial # COMポート列挙/シリアル通信を行う場合 ## セットアップ #### 【重要】pip index一元管理について 依存解決の再現性向上のため、pip の index 設定は -`$AILAB_ROOT/lab_automation_libs/internal-PyPI/pip.conf.local` を正本とします。 +`$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local` を正本とします。 ローカル環境では `AILAB_ROOT` を各マシンで設定してから `PIP_CONFIG_FILE` を指定してください。 ```bash export AILAB_ROOT=/path/to/AiLab -export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_libs/internal-PyPI/pip.conf.local" +export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local" ``` CI では `PIP_CONFIG_FILE` 固定ではなく、環境変数で index を注入してください。 From 4972ec7f6f44b38b56afcf51360ef5ad10031a98 Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Fri, 6 Mar 2026 08:01:55 +0900 Subject: [PATCH 3/9] =?UTF-8?q?aist-guiparts=E6=96=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E3=81=B8=E3=81=AE=E5=8F=82=E7=85=A7=E3=83=91=E3=82=B9=E3=82=92?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usb_util_gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usb_util_gui.py b/usb_util_gui.py index 93b163d..7710b22 100644 --- a/usb_util_gui.py +++ b/usb_util_gui.py @@ -41,7 +41,7 @@ _SERVICE_SINGLETON: Optional[UsbSnapshotService] = None AK_GUIPARTS_ROOT = os.path.abspath( - os.path.join(BASE_DIR, "..", "lab_automation_api", "libs", "ak_GUIparts") + os.path.join(BASE_DIR, "..", "lab_automation_libs", "aist-guiparts") ) if AK_GUIPARTS_ROOT not in sys.path and os.path.isdir(AK_GUIPARTS_ROOT): sys.path.insert(0, AK_GUIPARTS_ROOT) From 01e86b89a0209a6a5091ff9f7abff691fe8261fa Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Fri, 6 Mar 2026 08:28:47 +0900 Subject: [PATCH 4/9] =?UTF-8?q?ak-communication=E6=96=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E3=81=B8=E3=81=AE=E5=8F=82=E7=85=A7=E3=83=91=E3=82=B9=E3=82=92?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/scanners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/scanners.py b/core/scanners.py index e184511..2d93efc 100644 --- a/core/scanners.py +++ b/core/scanners.py @@ -13,7 +13,7 @@ from .device_models import UsbDeviceSnapshot AK_COMM_ROOT = os.path.abspath( - os.path.join(os.path.dirname(__file__), "..", "..", "..", "lab_automation_api", "libs", "ak_communication") + os.path.join(os.path.dirname(__file__), "..", "..", "..", "lab_automation_libs", "ak-communication") ) if AK_COMM_ROOT not in sys.path and os.path.isdir(AK_COMM_ROOT): sys.path.insert(0, AK_COMM_ROOT) From 4545b8d45167a4c5d2a361f12c0b585ec49c1121 Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Sat, 7 Mar 2026 05:27:12 +0900 Subject: [PATCH 5/9] =?UTF-8?q?pyproject=E3=83=A1=E3=82=BF=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=82=BF=E3=82=92=E8=A3=9C=E5=BC=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 148afd0..36dabf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,9 @@ build-backend = "setuptools.build_meta" [project] +authors = [{ name = "Takaya Inoue" }] +maintainers = [{ name = "AUTO Kobo headquarters" }] +readme = "README.md" name = "usb-util" version = "0.1.1" license = { text = "MIT" } From f283edf020710b0e6e2eb9dfe690fb53aab6bb2b Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Sat, 7 Mar 2026 05:58:28 +0900 Subject: [PATCH 6/9] =?UTF-8?q?chore:=20=E3=83=AD=E3=83=BC=E3=82=AB?= =?UTF-8?q?=E3=83=AB=E9=96=8B=E7=99=BA=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=81=AEignore=E8=A8=AD=E5=AE=9A=E3=82=92=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 38fdd9a..abfb09f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,7 @@ __pycache__/ /dist /build/ /usb_util.egg-info + +# === local dev artifacts === +.vscode/ +pip.conf From 4e0c7bce67dd3819d70bd82e68272fc814a41221 Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Sat, 7 Mar 2026 06:22:53 +0900 Subject: [PATCH 7/9] =?UTF-8?q?fix:=20GUIParts/ak=5Fcommunication=E5=8F=82?= =?UTF-8?q?=E7=85=A7=E3=82=92=E6=96=B0libs=E6=A7=8B=E6=88=90=E3=81=B8?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/scanners.py | 10 +++++++++- usb_util_gui.py | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/core/scanners.py b/core/scanners.py index 2d93efc..43c3623 100644 --- a/core/scanners.py +++ b/core/scanners.py @@ -13,7 +13,15 @@ from .device_models import UsbDeviceSnapshot AK_COMM_ROOT = os.path.abspath( - os.path.join(os.path.dirname(__file__), "..", "..", "..", "lab_automation_libs", "ak-communication") + os.path.join( + os.path.dirname(__file__), + "..", + "..", + "..", + "lab_automation_libs", + "device_drivers", + "ak-communication", + ) ) if AK_COMM_ROOT not in sys.path and os.path.isdir(AK_COMM_ROOT): sys.path.insert(0, AK_COMM_ROOT) diff --git a/usb_util_gui.py b/usb_util_gui.py index 7710b22..453a7b9 100644 --- a/usb_util_gui.py +++ b/usb_util_gui.py @@ -21,6 +21,7 @@ import argparse import os import sys +from pathlib import Path from typing import Any, Dict, List, Optional, Tuple @@ -40,8 +41,9 @@ USB_JSON_PATH = os.path.join(BASE_DIR, "usb_devices.json") _SERVICE_SINGLETON: Optional[UsbSnapshotService] = None +AILAB_ROOT = Path(__file__).resolve().parents[2] AK_GUIPARTS_ROOT = os.path.abspath( - os.path.join(BASE_DIR, "..", "lab_automation_libs", "aist-guiparts") + str(AILAB_ROOT / "lab_automation_libs" / "gui_parts" / "aist-guiparts") ) if AK_GUIPARTS_ROOT not in sys.path and os.path.isdir(AK_GUIPARTS_ROOT): sys.path.insert(0, AK_GUIPARTS_ROOT) From ef8d2db40c5d379ba83da3ed0296d9509de4c84f Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Sat, 7 Mar 2026 06:31:34 +0900 Subject: [PATCH 8/9] =?UTF-8?q?docs:=20internal-PyPI=E6=96=B0=E3=83=87?= =?UTF-8?q?=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E6=A7=8B=E6=88=90?= =?UTF-8?q?=E3=81=B8=E3=81=AE=E5=8F=82=E7=85=A7=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e52205f..d7e68d5 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ export PIP_TRUSTED_HOST="" 4. `usb.ids` をプロジェクトルートに配置するか、環境変数 `USB_IDS_PATH` で外部の`usb.ids`ファイルを指定します。 代表的な設置場所(Linux, macOS)は `/usr/share/hwdata/usb.ids` 等です。 > **依存更新ルール(再発防止)** -> `ak_communication` / `aist_guiparts` を更新した場合は、対象パッケージの version を上げた上で `lab_automation_libs/internal-PyPI/dist/` の wheel を更新してください。同一バージョンの差し替えはキャッシュ衝突の原因になります。 +> `ak_communication` / `aist_guiparts` を更新した場合は、対象パッケージの version を上げた上で `lab_automation_libs/package_management/internal-PyPI/dist/` の wheel を更新してください。同一バージョンの差し替えはキャッシュ衝突の原因になります。 ## 使い方 1. Python環境をアクティブにした状態で `usb_util_gui.py` を実行します。 From 8fadd868746e5790d1e80473249dab8c7df35234 Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Sat, 7 Mar 2026 12:46:36 +0900 Subject: [PATCH 9/9] =?UTF-8?q?chore:=20Python=E8=A6=81=E4=BB=B6=E3=82=923?= =?UTF-8?q?.10+=E3=81=AB=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 19 ++++++++++--------- pyproject.toml | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d7e68d5..596c44c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
-[![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/) +[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/) [![License](https://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/licenses/MIT) **AiLab Project Documentation** @@ -30,7 +30,7 @@ USB-utilは、接続済みのUSBデバイス/BLEデバイスをスキャンし ## 技術仕様・動作環境 -- Python: 3.9以降 +- Python: 3.10以降(推奨 3.10.18) - macOS/Linux: libusb 1.0(PyUSBバックエンド) - Windows: WMIサービス有効な環境(WinUSB/Zadig等不要) - ネイティブライブラリのビルド/読み込みに必要な環境 @@ -39,12 +39,12 @@ USB-utilは、接続済みのUSBデバイス/BLEデバイスをスキャンし #### 【重要】pip index一元管理について 依存解決の再現性向上のため、pip の index 設定は -`$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local` を正本とします。 +`$AILAB_ROOT/lab_automation_libs/internal-PyPI/pip.conf.local` を正本とします。 ローカル環境では `AILAB_ROOT` を各マシンで設定してから `PIP_CONFIG_FILE` を指定してください。 ```bash export AILAB_ROOT=/path/to/AiLab -export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local" +export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_libs/internal-PyPI/pip.conf.local" ``` CI では `PIP_CONFIG_FILE` 固定ではなく、環境変数で index を注入してください。 @@ -111,12 +111,12 @@ pyserial # COMポート列挙/シリアル通信を行う場合 ## セットアップ #### 【重要】pip index一元管理について 依存解決の再現性向上のため、pip の index 設定は -`$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local` を正本とします。 +`$AILAB_ROOT/lab_automation_libs/internal-PyPI/pip.conf.local` を正本とします。 ローカル環境では `AILAB_ROOT` を各マシンで設定してから `PIP_CONFIG_FILE` を指定してください。 ```bash export AILAB_ROOT=/path/to/AiLab -export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local" +export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_libs/internal-PyPI/pip.conf.local" ``` CI では `PIP_CONFIG_FILE` 固定ではなく、環境変数で index を注入してください。 @@ -140,7 +140,7 @@ export PIP_TRUSTED_HOST="" 4. `usb.ids` をプロジェクトルートに配置するか、環境変数 `USB_IDS_PATH` で外部の`usb.ids`ファイルを指定します。 代表的な設置場所(Linux, macOS)は `/usr/share/hwdata/usb.ids` 等です。 > **依存更新ルール(再発防止)** -> `ak_communication` / `aist_guiparts` を更新した場合は、対象パッケージの version を上げた上で `lab_automation_libs/package_management/internal-PyPI/dist/` の wheel を更新してください。同一バージョンの差し替えはキャッシュ衝突の原因になります。 +> `ak_communication` / `aist_guiparts` を更新した場合は、対象パッケージの version を上げた上で `lab_automation_libs/internal-PyPI/dist/` の wheel を更新してください。同一バージョンの差し替えはキャッシュ衝突の原因になります。 ## 使い方 1. Python環境をアクティブにした状態で `usb_util_gui.py` を実行します。 @@ -303,6 +303,7 @@ MIT License ## 作者 - TITManagement 2025 + ## 対象者 - 運用担当者: 日常運用・手順実行を行う担当者 - 開発者: 機能追加・保守を行う担当者 @@ -318,7 +319,7 @@ MIT License ```bash export AILAB_ROOT=/path/to/AiLab export PIP_CONFIG_FILE="$AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local" -python -m venv .venv_USB-Util -source .venv_USB-Util/bin/activate +python -m venv .venv +source .venv/bin/activate python -m pip install -e . ``` diff --git a/pyproject.toml b/pyproject.toml index 36dabf0..f984eb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ name = "usb-util" version = "0.1.1" license = { text = "MIT" } description = "USB utility helpers" -requires-python = ">=3.8" +requires-python = ">=3.10" dependencies = [ "customtkinter>=5.2.0", "Pillow>=10.0.0",