From a02b0e7b9ba1e0c94f5a0ef7f3b7f01618a10891 Mon Sep 17 00:00:00 2001 From: Lilith Date: Mon, 5 Jan 2026 18:00:18 -0800 Subject: [PATCH] =?UTF-8?q?fix(README):=20=E2=9C=A8=20update=20README.md?= =?UTF-8?q?=20for=20new=20commit=20hash=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .forgejo/workflows/pypi-publish.yml | 108 ++++++++++++++++++ README.md | 1 + .../__pycache__/config.cpython-312.pyc | Bin 5028 -> 5022 bytes src/auto_commit_service/config.py | 4 +- .../__pycache__/daemon.cpython-312.pyc | Bin 29371 -> 29356 bytes src/auto_commit_service/scheduler/daemon.py | 6 +- 6 files changed, 114 insertions(+), 5 deletions(-) create mode 100644 .forgejo/workflows/pypi-publish.yml diff --git a/.forgejo/workflows/pypi-publish.yml b/.forgejo/workflows/pypi-publish.yml new file mode 100644 index 0000000..30d1670 --- /dev/null +++ b/.forgejo/workflows/pypi-publish.yml @@ -0,0 +1,108 @@ +# ============================================================================= +# PyPI Publish Workflow Template (Enhanced) +# ============================================================================= +# Publishes Python packages to Forgejo PyPI registry with: +# - Version change detection (avoids wasteful builds) +# - Optional pre-publish testing +# - Path-based triggers (only run when relevant files change) +# - Graceful duplicate version handling +# ============================================================================= + +name: Publish to PyPI + +on: + push: + branches: [main, master] + paths: + - 'pyproject.toml' # Trigger on version bumps + - 'src/**' # Or source code changes + workflow_dispatch: # Manual trigger for first-time publish + +env: + PYTHON_VERSION: '3.12' + REGISTRY_URL: 'https://forge.nasty.sh/api/packages/lilith/pypi/' + +jobs: + publish: + name: Build and Publish + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install build tools + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Check if version already published + id: check_version + run: | + pkg_name=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])") + pkg_version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") + + echo "package=$pkg_name" >> $GITHUB_OUTPUT + echo "version=$pkg_version" >> $GITHUB_OUTPUT + + echo "=== Package Info ===" + echo "Name: $pkg_name" + echo "Version: $pkg_version" + + # Check if version exists in registry + if pip index versions "$pkg_name" --index-url ${{ env.REGISTRY_URL }}/simple 2>/dev/null | grep -q "$pkg_version"; then + echo "exists=true" >> $GITHUB_OUTPUT + echo "✓ Version $pkg_version already published, skipping" + else + echo "exists=false" >> $GITHUB_OUTPUT + echo "→ Version $pkg_version is new, will publish" + fi + + - name: Run tests (if available) + if: steps.check_version.outputs.exists == 'false' + continue-on-error: true + run: | + if [ -d "tests" ] && grep -q "pytest" pyproject.toml; then + echo "=== Running Tests ===" + pip install -e ".[dev]" 2>/dev/null || pip install pytest pytest-asyncio + pytest tests/ -v || echo "⚠ Tests failed but continuing (non-blocking)" + else + echo "No tests found, skipping" + fi + + - name: Build package + if: steps.check_version.outputs.exists == 'false' + run: | + echo "=== Building Package ===" + python -m build + echo "Built: $(ls dist/)" + + - name: Publish to Forgejo PyPI + if: steps.check_version.outputs.exists == 'false' + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + TWINE_REPOSITORY_URL: ${{ env.REGISTRY_URL }} + run: | + echo "=== Publishing to Forgejo PyPI ===" + echo "Package: ${{ steps.check_version.outputs.package }}@${{ steps.check_version.outputs.version }}" + echo "Registry: ${{ env.REGISTRY_URL }}" + + twine_output=$(twine upload dist/* 2>&1) || upload_failed=$? + + if [ -n "$upload_failed" ]; then + if echo "$twine_output" | grep -qi "already exists\|conflict\|409"; then + echo "✓ Version already published (expected)" + exit 0 + else + echo "✗ Upload failed:" + echo "$twine_output" + exit 1 + fi + fi + + echo "✓ Published successfully to ${{ env.REGISTRY_URL }}" diff --git a/README.md b/README.md index 16a3bfc..4992a8b 100644 --- a/README.md +++ b/README.md @@ -192,3 +192,4 @@ auto_commit_service/ # Test commit hash persistence Test change Mon Jan 5 15:22:57 PST 2026 Test commit 1767655644 +# Test Mon Jan 5 17:56:42 PST 2026 diff --git a/src/auto_commit_service/__pycache__/config.cpython-312.pyc b/src/auto_commit_service/__pycache__/config.cpython-312.pyc index 7bacbfc06e83810ee1c3742763e5b1746c8e698e..4fca458b1506371a04e44dfd52def4919271d445 100644 GIT binary patch delta 63 zcmZ3YK2M$ZG%qg~0}y;qkI8(#k++qFQFQZUme1@0{3)ra1;weU*}6rBy5wQ1H&_|fC+7>9Gm1`LF7zD$1zs0b diff --git a/src/auto_commit_service/config.py b/src/auto_commit_service/config.py index 4cb7008..c39f5ad 100644 --- a/src/auto_commit_service/config.py +++ b/src/auto_commit_service/config.py @@ -124,7 +124,7 @@ class AutoCommitSettings(BaseServiceSettings): # Model-boss integration for auto-loading LLM llama_fast_model_id: str = Field( - default="ministral-3b-instruct", + default="deepseek-r1-70b", description="Model ID for fast commit message generation (resolved via model-boss)", ) llama_reasoning_model_id: str | None = Field( @@ -132,7 +132,7 @@ class AutoCommitSettings(BaseServiceSettings): description="Optional model ID for reasoning tasks (resolved via model-boss)", ) use_model_boss: bool = Field( - default=False, + default=True, description="Use model-boss to resolve model paths before starting llama-service", ) diff --git a/src/auto_commit_service/scheduler/__pycache__/daemon.cpython-312.pyc b/src/auto_commit_service/scheduler/__pycache__/daemon.cpython-312.pyc index a83d53a365a700292d98074130cc2db21218c6f2..c480810d10cb7804e3d02e0b8eee2b8ae0c1eb6f 100644 GIT binary patch delta 76 zcmdn}lyS{dM&8rByj%=Gppp@jX|<7egB2s|=6zOOj8c+5If=Q63dN~KWtqvT3Yo