mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-05-14 11:05:04 +00:00
feat(tools): migrate to UV from Poetry for blazing fast ultra safe secure unhackable dependency management 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀
This commit is contained in:
@@ -32,7 +32,7 @@ env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.33.0"
|
||||
|
||||
jobs:
|
||||
@@ -48,18 +48,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
- name: Run benchmarks
|
||||
run: |
|
||||
set -euo pipefail
|
||||
poetry run python tests/backend/run_comprehensive_benchmarks.py \
|
||||
uv run python tests/backend/run_comprehensive_benchmarks.py \
|
||||
--json-output bench_results.json 2>&1 | tee bench_results.txt
|
||||
|
||||
- name: Run integrity tests
|
||||
|
||||
@@ -41,7 +41,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
|
||||
jobs:
|
||||
@@ -94,18 +94,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
@@ -40,7 +40,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.33.0"
|
||||
COSIGN_VERSION: "3.0.6"
|
||||
# Official .deb from aquasecurity/trivy releases; scripts/ci/setup-trivy.sh verifies
|
||||
@@ -100,18 +100,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -182,18 +182,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -334,18 +334,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -429,10 +429,10 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
@@ -33,7 +33,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
|
||||
jobs:
|
||||
@@ -80,10 +80,10 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
+20
-20
@@ -35,7 +35,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
|
||||
jobs:
|
||||
@@ -80,18 +80,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -112,20 +112,20 @@ jobs:
|
||||
case "${{ matrix.task.id }}" in
|
||||
lint)
|
||||
pnpm run lint
|
||||
poetry run ruff check .
|
||||
poetry run ruff format --check .
|
||||
uv run ruff check .
|
||||
uv run ruff format --check .
|
||||
;;
|
||||
frontend-tests)
|
||||
pnpm exec vitest run --exclude tests/frontend/LoadTimePerformance.test.js --exclude tests/frontend/i18n.test.js
|
||||
pnpm exec vitest run --config vitest.electron.config.js
|
||||
;;
|
||||
backend-tests)
|
||||
poetry run python -m pytest tests/backend -n auto \
|
||||
uv run python -m pytest tests/backend -n auto \
|
||||
--cov=meshchatx/src/backend
|
||||
;;
|
||||
lang-tests)
|
||||
pnpm exec vitest run tests/frontend/i18n.test.js
|
||||
poetry run python -m pytest tests/backend/test_translator_handler.py
|
||||
uv run python -m pytest tests/backend/test_translator_handler.py
|
||||
;;
|
||||
*)
|
||||
echo "Unknown matrix task: ${{ matrix.task.id }}" >&2
|
||||
@@ -152,18 +152,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -192,7 +192,7 @@ jobs:
|
||||
test -d meshchatx/public/reticulum-docs-bundled/current
|
||||
|
||||
- name: Compile backend sources
|
||||
run: poetry run python -m compileall meshchatx/
|
||||
run: uv run python -m compileall meshchatx/
|
||||
|
||||
- name: Build backend (cx_Freeze)
|
||||
run: pnpm run build-backend
|
||||
|
||||
@@ -30,7 +30,7 @@ env:
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
|
||||
jobs:
|
||||
@@ -103,18 +103,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
@@ -30,7 +30,7 @@ env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
PYTHON_VERSION: "3.14"
|
||||
NODE_VERSION: "24"
|
||||
POETRY_VERSION: "2.3.4"
|
||||
UV_VERSION: "0.11.12"
|
||||
PNPM_VERSION: "10.32.1"
|
||||
COSIGN_VERSION: "3.0.6"
|
||||
# Official .deb; setup-trivy.sh verifies sigstore + SHA256 (see build-release.yml).
|
||||
@@ -51,18 +51,18 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install Poetry (PyPI pin)
|
||||
- name: Install UV (PyPI pin)
|
||||
env:
|
||||
POETRY_VERSION: ${{ env.POETRY_VERSION }}
|
||||
run: bash scripts/ci/github-install-poetry.sh
|
||||
UV_VERSION: ${{ env.UV_VERSION }}
|
||||
run: bash scripts/ci/github-install-uv.sh
|
||||
|
||||
- name: Cache Poetry downloads
|
||||
- name: Cache UV downloads
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
|
||||
with:
|
||||
path: ~/.cache/pypoetry
|
||||
key: ${{ runner.os }}-pypoetry-${{ hashFiles('poetry.lock') }}
|
||||
path: ~/.cache/uv
|
||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pypoetry-
|
||||
${{ runner.os }}-uv-
|
||||
|
||||
- name: Enable pnpm (corepack)
|
||||
run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
@@ -79,8 +79,8 @@ jobs:
|
||||
|
||||
- name: pip-audit
|
||||
run: |
|
||||
poetry run pip install --upgrade "pip>=26.0" pip-audit
|
||||
poetry run pip-audit --ignore-vuln CVE-2026-3219
|
||||
uv run pip install --upgrade "pip>=26.0" pip-audit
|
||||
uv run pip-audit --ignore-vuln CVE-2026-3219
|
||||
|
||||
- name: Apt update (for Trivy .deb)
|
||||
run: sh scripts/ci/exec-priv.sh apt-get update -qq
|
||||
|
||||
+26
-26
@@ -73,17 +73,17 @@ tasks:
|
||||
- "{{.NPM}} install"
|
||||
|
||||
deps:be:
|
||||
desc: Install Python dependencies using Poetry
|
||||
desc: Install Python dependencies using UV
|
||||
cmds:
|
||||
- poetry install
|
||||
- poetry run python scripts/patch_lxst_pyogg_ogg_ctypes.py
|
||||
- uv sync --group dev
|
||||
- uv run python scripts/patch_lxst_pyogg_ogg_ctypes.py
|
||||
|
||||
setup:be:
|
||||
desc: Full backend environment setup
|
||||
cmds:
|
||||
- poetry install
|
||||
- poetry run python scripts/patch_lxst_pyogg_ogg_ctypes.py
|
||||
- poetry run pip install ruff
|
||||
- uv sync --group dev
|
||||
- uv run python scripts/patch_lxst_pyogg_ogg_ctypes.py
|
||||
- uv run pip install ruff
|
||||
|
||||
# --- Execution ---
|
||||
|
||||
@@ -91,7 +91,7 @@ tasks:
|
||||
desc: Run the application
|
||||
deps: [install]
|
||||
cmds:
|
||||
- poetry run python -m meshchatx.meshchat
|
||||
- uv run python -m meshchatx.meshchat
|
||||
|
||||
dev:
|
||||
desc: Run in development mode (builds frontend first)
|
||||
@@ -127,8 +127,8 @@ tasks:
|
||||
lint:be:
|
||||
desc: Lint Python code (ruff)
|
||||
cmds:
|
||||
- poetry run ruff check .
|
||||
- poetry run ruff format --check .
|
||||
- uv run ruff check .
|
||||
- uv run ruff format --check .
|
||||
|
||||
lint:fe:
|
||||
desc: Lint frontend code
|
||||
@@ -142,8 +142,8 @@ tasks:
|
||||
fmt:be:
|
||||
desc: Format Python code (ruff)
|
||||
cmds:
|
||||
- poetry run ruff format ./ --exclude tests
|
||||
- poetry run ruff check --fix ./ --exclude tests
|
||||
- uv run ruff format ./ --exclude tests
|
||||
- uv run ruff check --fix ./ --exclude tests
|
||||
|
||||
fmt:fe:
|
||||
desc: Format frontend code (Prettier/ESLint)
|
||||
@@ -158,34 +158,34 @@ tasks:
|
||||
deps: [test:be, test:fe, test:lang]
|
||||
|
||||
test:e2e:
|
||||
desc: Playwright E2E (starts MeshChat backend + Vite; requires poetry, curl, pnpm exec playwright install chromium)
|
||||
desc: Playwright E2E (starts MeshChat backend + Vite; requires uv, curl, pnpm exec playwright install chromium)
|
||||
cmds:
|
||||
- "{{.NPM}} run test:e2e"
|
||||
|
||||
test:be:
|
||||
desc: Run Python tests (pytest; includes perf/memory profiling — same as GitHub CI)
|
||||
cmds:
|
||||
- poetry run pytest tests/backend -n auto --cov=meshchatx/src/backend
|
||||
- uv run pytest tests/backend -n auto --cov=meshchatx/src/backend
|
||||
|
||||
test:be:cov:
|
||||
desc: Run Python tests with detailed coverage (includes performance and memory profiling tests)
|
||||
cmds:
|
||||
- poetry run pytest tests/backend -n auto --cov=meshchatx/src/backend --cov-report=term-missing
|
||||
- uv run pytest tests/backend -n auto --cov=meshchatx/src/backend --cov-report=term-missing
|
||||
|
||||
test:be:perf:
|
||||
desc: Backend performance regression tests only (hot paths + bottlenecks)
|
||||
cmds:
|
||||
- poetry run pytest tests/backend/test_performance_hotpaths.py tests/backend/test_performance_bottlenecks.py
|
||||
- uv run pytest tests/backend/test_performance_hotpaths.py tests/backend/test_performance_bottlenecks.py
|
||||
|
||||
test:be:full:
|
||||
desc: Same as test:be (full backend suite)
|
||||
cmds:
|
||||
- poetry run pytest tests/backend -n auto --cov=meshchatx/src/backend
|
||||
- uv run pytest tests/backend -n auto --cov=meshchatx/src/backend
|
||||
|
||||
test:mutation:
|
||||
desc: Mutation testing (mutmut; slow; optional; default targets meshchat_utils)
|
||||
cmds:
|
||||
- poetry run mutmut run "meshchatx.src.backend.meshchat_utils*"
|
||||
- uv run mutmut run "meshchatx.src.backend.meshchat_utils*"
|
||||
|
||||
test:fe:
|
||||
desc: Run frontend + Electron shell unit tests (vitest; excludes i18n — see test:lang; excludes LoadTimePerformance — use test:fe:loadtime locally)
|
||||
@@ -201,12 +201,12 @@ tasks:
|
||||
test:be:media-fuzz:
|
||||
desc: Hypothesis fuzz tests for stickers, TGS/Lottie JSON, WebM, GIFs, pack exports
|
||||
cmds:
|
||||
- poetry run pytest tests/backend/test_media_fuzzing.py -q
|
||||
- uv run pytest tests/backend/test_media_fuzzing.py -q
|
||||
|
||||
test:be:media-http:
|
||||
desc: aiohttp integration tests for /api/v1/stickers, sticker-packs, and /api/v1/gifs
|
||||
cmds:
|
||||
- poetry run pytest tests/backend/test_media_http_api.py -q
|
||||
- uv run pytest tests/backend/test_media_http_api.py -q
|
||||
|
||||
test:fuzz:all:
|
||||
desc: Vitest fuzzing tag plus backend media Hypothesis fuzz
|
||||
@@ -223,18 +223,18 @@ tasks:
|
||||
desc: Run localization tests
|
||||
cmds:
|
||||
- "{{.NPM}} exec vitest run tests/frontend/i18n.test.js"
|
||||
- "poetry run pytest tests/backend/test_translator_handler.py"
|
||||
- "uv run pytest tests/backend/test_translator_handler.py"
|
||||
|
||||
test:integrity:
|
||||
desc: Run data integrity tests
|
||||
cmds:
|
||||
- poetry run pytest tests/backend/test_integrity.py tests/backend/test_backend_integrity.py
|
||||
- uv run pytest tests/backend/test_integrity.py tests/backend/test_backend_integrity.py
|
||||
|
||||
test:cov:
|
||||
desc: Run all tests with coverage (Python + frontend JS/Vue + translator pytest)
|
||||
deps: [test:be:cov, test:fe:cov]
|
||||
cmds:
|
||||
- "poetry run pytest tests/backend/test_translator_handler.py"
|
||||
- "uv run pytest tests/backend/test_translator_handler.py"
|
||||
|
||||
bench:
|
||||
desc: Default benchmark run (backend comprehensive suite; same as bench:be)
|
||||
@@ -244,17 +244,17 @@ tasks:
|
||||
bench:be:
|
||||
desc: Run backend benchmarks
|
||||
cmds:
|
||||
- poetry run python tests/backend/run_comprehensive_benchmarks.py
|
||||
- uv run python tests/backend/run_comprehensive_benchmarks.py
|
||||
|
||||
bench:be:extreme:
|
||||
desc: Run extreme stress benchmarks
|
||||
cmds:
|
||||
- poetry run python tests/backend/run_comprehensive_benchmarks.py --extreme
|
||||
- uv run python tests/backend/run_comprehensive_benchmarks.py --extreme
|
||||
|
||||
profile:mem:
|
||||
desc: Run memory profiling
|
||||
cmds:
|
||||
- poetry run pytest tests/backend/test_memory_profiling.py
|
||||
- uv run pytest tests/backend/test_memory_profiling.py
|
||||
|
||||
check:
|
||||
desc: Run formatting, linting, and testing sequentially
|
||||
@@ -286,7 +286,7 @@ tasks:
|
||||
desc: Build Python wheel package
|
||||
deps: [install]
|
||||
cmds:
|
||||
- poetry build -f wheel
|
||||
- uv build --wheel
|
||||
- "{{.PYTHON}} scripts/move_wheels.py"
|
||||
|
||||
# --- Electron Distribution ---
|
||||
|
||||
Generated
-2516
File diff suppressed because it is too large
Load Diff
+4
-25
@@ -46,31 +46,6 @@ lxmfy = "lxmfy.cli:main"
|
||||
[project.urls]
|
||||
Homepage = "https://git.quad4.io/RNS-Things/MeshChatX"
|
||||
|
||||
[tool.poetry]
|
||||
packages = [
|
||||
{include = "meshchatx"},
|
||||
{include = "lxmfy", from = "vendor/lxmfy"},
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.11"
|
||||
lxst = ">=0.4.6"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
cx-freeze = ">=7.0.0"
|
||||
pygments = ">=2.20.0"
|
||||
pytest = ">=9.0.2,<10.0.0"
|
||||
pytest-asyncio = ">=0.25.0"
|
||||
pytest-cov = ">=7.0.0,<8.0.0"
|
||||
hypothesis = ">=6.151.9"
|
||||
ruff = ">=0.14.0"
|
||||
jsonschema = "^4.26.0"
|
||||
mutmut = {version = "^3.5.0", python = "<4.0"}
|
||||
pytest-xdist = "^3.8.0"
|
||||
|
||||
[[tool.poetry.include]]
|
||||
path = "logo"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = [".", "vendor/lxmfy"]
|
||||
include = ["meshchatx*", "lxmfy*"]
|
||||
@@ -89,12 +64,16 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"cx-freeze>=7.0.0",
|
||||
"hypothesis>=6.152.4",
|
||||
"jsonschema>=4.26.0",
|
||||
"pygments>=2.20.0",
|
||||
"pytest>=9.0.3",
|
||||
"pytest-asyncio>=0.25.0",
|
||||
"pytest-cov>=7.1.0",
|
||||
"pytest-xdist>=3.8.0",
|
||||
"ruff>=0.14.0",
|
||||
"mutmut>=3.5.0; python_version < '4.0'",
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
|
||||
@@ -182,7 +182,7 @@ function shouldRefreshLicenseArtifacts(repoRoot) {
|
||||
|
||||
const inputFiles = [
|
||||
path.join(repoRoot, "pyproject.toml"),
|
||||
path.join(repoRoot, "poetry.lock"),
|
||||
path.join(repoRoot, "uv.lock"),
|
||||
path.join(repoRoot, "package.json"),
|
||||
path.join(repoRoot, "pnpm-lock.yaml"),
|
||||
path.join(repoRoot, "meshchatx", "src", "backend", "licenses_collector.py"),
|
||||
@@ -266,7 +266,7 @@ try {
|
||||
}
|
||||
|
||||
// Allow overriding the python command
|
||||
const pythonCmd = process.env.PYTHON_CMD || "poetry run python";
|
||||
const pythonCmd = process.env.PYTHON_CMD || "uv run python";
|
||||
|
||||
console.log(
|
||||
`Building backend for ${platform} (target: ${targetName}, output: ${buildDirRelative}) using: ${pythonCmd}`
|
||||
|
||||
@@ -5,7 +5,7 @@ set -euo pipefail
|
||||
|
||||
cd /src
|
||||
|
||||
export POETRY_VERSION="${POETRY_VERSION:-2.3.4}"
|
||||
export UV_VERSION="${UV_VERSION:-0.11.12}"
|
||||
export PNPM_VERSION="${PNPM_VERSION:-10.33.0}"
|
||||
|
||||
apt-get update -y
|
||||
@@ -37,7 +37,7 @@ curl -fsSL "https://github.com/go-task/task/releases/download/v${TASK_VER}/task_
|
||||
corepack enable
|
||||
corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
bash scripts/ci/github-install-poetry.sh
|
||||
bash scripts/ci/github-install-uv.sh
|
||||
|
||||
export TRIVY_SBOM=0
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install Python (Poetry) and Node (pnpm) dependencies for native Electron builds.
|
||||
# Install Python (UV) and Node (pnpm) dependencies for native Electron builds.
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
@@ -28,13 +28,13 @@ if [[ "$(uname -s)" == "Linux" ]] && command -v apt-get >/dev/null 2>&1; then
|
||||
run_priv apt-get install -y libopus0 libogg0
|
||||
fi
|
||||
|
||||
python -m poetry check --lock
|
||||
python -m poetry install --no-interaction --no-ansi --with dev
|
||||
python -m poetry run python scripts/patch_lxst_pyogg_ogg_ctypes.py
|
||||
uv lock --check
|
||||
uv sync --group dev
|
||||
uv run python scripts/patch_lxst_pyogg_ogg_ctypes.py
|
||||
|
||||
if [[ "$(uname -s)" == "Darwin" ]]; then
|
||||
if poetry run python -c "import platform, sys; sys.exit(0 if platform.machine() == 'arm64' else 1)"; then
|
||||
_miniaudio_state="$(poetry run python -c "
|
||||
if uv run python -c "import platform, sys; sys.exit(0 if platform.machine() == 'arm64' else 1)"; then
|
||||
_miniaudio_state="$(uv run python -c "
|
||||
import importlib.util
|
||||
import pathlib
|
||||
import subprocess
|
||||
@@ -78,10 +78,10 @@ else:
|
||||
export ARCHFLAGS="-arch arm64"
|
||||
export CFLAGS="-arch arm64"
|
||||
export CXXFLAGS="-arch arm64"
|
||||
poetry run python -m pip install --force-reinstall --no-cache-dir --no-binary miniaudio "miniaudio>=1.70,<2"
|
||||
uv run python -m pip install --force-reinstall --no-cache-dir --no-binary miniaudio "miniaudio>=1.70,<2"
|
||||
)
|
||||
fi
|
||||
if ! poetry run python -c "
|
||||
if ! uv run python -c "
|
||||
import importlib.util
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install Poetry from PyPI with an explicit version (no third-party installers).
|
||||
# Set POETRY_VERSION to override the default.
|
||||
set -euo pipefail
|
||||
|
||||
POETRY_VERSION="${POETRY_VERSION:-2.3.4}"
|
||||
|
||||
python -m pip install --disable-pip-version-check --upgrade pip
|
||||
python -m pip install --disable-pip-version-check "poetry==${POETRY_VERSION}"
|
||||
python -m poetry --version
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install UV (Python package manager) from PyPI with an explicit version.
|
||||
# Set UV_VERSION to override the default.
|
||||
set -euo pipefail
|
||||
|
||||
UV_VERSION="${UV_VERSION:-0.11.12}"
|
||||
|
||||
python -m pip install --disable-pip-version-check --upgrade pip
|
||||
python -m pip install --disable-pip-version-check "uv==${UV_VERSION}"
|
||||
uv --version
|
||||
@@ -17,7 +17,7 @@ cleanup() {
|
||||
}
|
||||
trap cleanup EXIT INT TERM
|
||||
|
||||
poetry run python -m meshchatx.meshchat &
|
||||
uv run python -m meshchatx.meshchat &
|
||||
BE_PID=$!
|
||||
|
||||
sleep "${DEV_BACKEND_WAIT:-1}"
|
||||
|
||||
@@ -25,7 +25,7 @@ trap cleanup EXIT INT TERM
|
||||
|
||||
echo "E2E: starting MeshChat backend on 127.0.0.1:${BACKEND_PORT} (isolated storage under ${TMPDIR})"
|
||||
|
||||
poetry run python -m meshchatx.meshchat \
|
||||
uv run python -m meshchatx.meshchat \
|
||||
--headless \
|
||||
--no-https \
|
||||
--host 127.0.0.1 \
|
||||
|
||||
@@ -42,7 +42,7 @@ wine_wrap wine "./$GIT_EXE" /VERYSILENT /NORESTART
|
||||
|
||||
echo "Installing build dependencies in Wine Python..."
|
||||
wine_wrap wine C:/Python314/python.exe -m pip install --upgrade pip
|
||||
wine_wrap wine C:/Python314/python.exe -m pip install cx_Freeze poetry
|
||||
wine_wrap wine C:/Python314/python.exe -m pip install cx_Freeze
|
||||
if [ -f "requirements.txt" ]; then
|
||||
wine_wrap wine C:/Python314/python.exe -m pip install -r requirements.txt
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user