diff --git a/.github/workflows/bump-idfkit.yml b/.github/workflows/bump-idfkit.yml new file mode 100644 index 000000000..928184945 --- /dev/null +++ b/.github/workflows/bump-idfkit.yml @@ -0,0 +1,60 @@ +name: Bump idfkit +on: + workflow_dispatch: + inputs: + idfkit_version: + required: true + type: string +permissions: + contents: write + pull-requests: write + id-token: write +jobs: + bump: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install uv + uses: astral-sh/setup-uv@v5 + - name: Bump idfkit + run: | + uv add "idfkit==${{ inputs.idfkit_version }}" + uv lock + - name: Run tests + id: tests + continue-on-error: true + run: | + uv run pytest 2>&1 | tee test-output.txt + - name: Ask Claude to repair test failures + if: steps.tests.outcome == 'failure' + uses: anthropics/claude-code-action@v1 + with: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + prompt: | + idfkit was bumped to ${{ inputs.idfkit_version }}, and the test suite failed. + Task: + - Read test-output.txt. + - Diagnose the compatibility issue caused by the idfkit upgrade. + - Make the minimal code changes required. + - Do not refactor unrelated code. + - Preserve public APIs unless the idfkit upgrade requires a change. + - Rerun: uv run pytest + - Leave a concise summary of root cause, changed files, and final test result. + - name: Rerun tests after Claude repair + if: steps.tests.outcome == 'failure' + run: uv run pytest + - name: Open PR + uses: peter-evans/create-pull-request@v6 + with: + branch: bot/bump-idfkit-${{ inputs.idfkit_version }} + title: "Bump idfkit to ${{ inputs.idfkit_version }}" + commit-message: "Bump idfkit to ${{ inputs.idfkit_version }}" + body: | + Automated idfkit dependency bump. + - Version: `${{ inputs.idfkit_version }}` + - Initial test result: `${{ steps.tests.outcome }}` + - Test command: `uv run pytest` + + If tests initially failed, Claude attempted a minimal compatibility repair. diff --git a/CLAUDE.md b/CLAUDE.md index e1bb390cc..2dad9874f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -163,3 +163,18 @@ cd build/v25.2 && uv run zensical build --clean - New EnergyPlus versions require adding entries to `TARGET_VERSIONS` and updating `LATEST_VERSION` in `scripts/config.py`. If the new version has a new doc set, add it to `DOC_SET_INFO`. - The `build/` and `dist/` directories are gitignored. `build/sources/` holds cloned EnergyPlus repos; `build/vXX.X/` holds per-version Zensical projects; `dist/` holds the final deployed site. - The Zensical site configuration template is in `zensical.toml` (root). Per-version configs are generated dynamically by `scripts/convert.py`. + +## Automated idfkit bumps + +When invoked by `.github/workflows/bump-idfkit.yml` on test failure after an idfkit version bump: + +- Make the smallest possible compatibility change. +- Do not perform unrelated refactors. +- Do not change formatting broadly. +- Run `uv run pytest` before finishing. +- Preserve public APIs unless the idfkit upgrade requires otherwise. +- Summarize: + - root cause + - files changed + - tests run + - remaining risks diff --git a/pyproject.toml b/pyproject.toml index 9206d28ea..75cd0e40b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ requires-python = ">=3.10,<4.0" dependencies = [ "tomli_w>=1.0", "tomli>=2.0; python_version < '3.11'", - "idfkit==0.11.0", + "idfkit==0.11.1", ] [project.urls] diff --git a/uv.lock b/uv.lock index 4cf3d1a13..2da965f01 100644 --- a/uv.lock +++ b/uv.lock @@ -70,11 +70,11 @@ wheels = [ [[package]] name = "idfkit" -version = "0.11.0" +version = "0.11.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/3c/28/38c9a4a5eca35a20960f28ffa4719d0619dc562904665e949b047c25bf6d/idfkit-0.11.0.tar.gz", hash = "sha256:b529a5f95d628f0c5ee8be02fb8db308f4f7dcf4c82fbf705cd27450aeca4deb", size = 15188656, upload-time = "2026-04-28T11:54:14.888Z" } +sdist = { url = "https://files.pythonhosted.org/packages/58/f6/55bf2be238fc44ce8fd13ba023df7830607cf43711fb84fd6067a61a31c2/idfkit-0.11.1.tar.gz", hash = "sha256:2e561442ce4768735418d38ffb08f0fc878cbd7eeb915de98b09c36f97a0c195", size = 15189494, upload-time = "2026-04-28T14:57:29.122Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a5/00/680c39b68fa1ff1ac55e9f36e4151444f1bc9d804af26a245274f80a7c60/idfkit-0.11.0-py3-none-any.whl", hash = "sha256:2cf7a55365c1f2726f3b41510403fbeb4eed70c595a4438eea733cdd6d66f771", size = 14022901, upload-time = "2026-04-28T11:54:18.448Z" }, + { url = "https://files.pythonhosted.org/packages/0f/f6/dd94f6d84ed85b1cb07b34c5d5940dd04e5f11ff724388fc1410c1970e5e/idfkit-0.11.1-py3-none-any.whl", hash = "sha256:a4efb6d4547d20c709efc332267781249f5916d87dfcadf4e1d14ff96cdedc4e", size = 14023165, upload-time = "2026-04-28T14:57:25.196Z" }, ] [[package]] @@ -98,7 +98,7 @@ dev = [ [package.metadata] requires-dist = [ - { name = "idfkit", specifier = "==0.11.0" }, + { name = "idfkit", specifier = "==0.11.1" }, { name = "tomli", marker = "python_full_version < '3.11'", specifier = ">=2.0" }, { name = "tomli-w", specifier = ">=1.0" }, ]