Compare commits

..

4 Commits

Author SHA1 Message Date
Richie 97dcf68f5f added llm_tool_calling.py
treefmt / nix fmt (pull_request) Successful in 7s
pytest / pytest (pull_request) Failing after 26s
build_systems / build-brain (pull_request) Successful in 46s
build_systems / build-bob (pull_request) Successful in 46s
build_systems / build-leviathan (pull_request) Successful in 54s
build_systems / build-rhapsody-in-green (pull_request) Successful in 59s
build_systems / build-jeeves (pull_request) Successful in 2m30s
2026-06-06 17:43:32 -04:00
Richie b8a21a6013 built workflow
treefmt / nix fmt (pull_request) Successful in 6s
pytest / pytest (pull_request) Failing after 27s
build_systems / build-bob (pull_request) Successful in 47s
build_systems / build-brain (pull_request) Successful in 47s
build_systems / build-leviathan (pull_request) Successful in 52s
build_systems / build-rhapsody-in-green (pull_request) Successful in 58s
build_systems / build-jeeves (pull_request) Successful in 2m28s
2026-06-06 15:20:57 -04:00
Richie fc0bcc4cc0 Add catalog.py for manually adding authors and series to the database.
treefmt / nix fmt (pull_request) Failing after 7s
pytest / pytest (pull_request) Successful in 29s
build_systems / build-brain (pull_request) Successful in 1m2s
build_systems / build-bob (pull_request) Successful in 1m3s
build_systems / build-leviathan (pull_request) Successful in 1m9s
build_systems / build-rhapsody-in-green (pull_request) Successful in 1m9s
build_systems / build-jeeves (pull_request) Successful in 2m38s
2026-06-05 21:31:12 -04:00
Richie 986344207d adding audiobook data to DB 2026-06-05 21:31:12 -04:00
6 changed files with 23 additions and 73 deletions
-1
View File
@@ -1,7 +1,6 @@
name: pytest name: pytest
on: on:
workflow_dispatch:
push: push:
branches: branches:
- main - main
Generated
+18 -18
View File
@@ -8,11 +8,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1780733803, "lastModified": 1780027372,
"narHash": "sha256-QBJPq12P1DAXFGezoEJaSO/xPUrPlnaI3ddSaMG2JpM=", "narHash": "sha256-LQ3CUdVZoKQqWzS2eEpY0rp9bJuzqydNFJUiJ6De9r8=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "c80b0aa94392c5f3612ac797108f6d952752036d", "rev": "ef18b76eabdf4f9b2ce8e99e78ce698923693300",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -29,11 +29,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780679734, "lastModified": 1780099287,
"narHash": "sha256-KmRNvpNOb7QEORa06bVgjW9kITcx0VhsI7w0vhmZyD8=", "narHash": "sha256-efIPwVGtIWIjWcznhaop6XN6HxnOL8800hF6CBNvlqQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b2b7db486e06e098711dc291bb25db82850e1d16", "rev": "7d8127d308c3fb9664f7e643eec944be74ebb37d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -47,11 +47,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1780310866, "lastModified": 1780065812,
"narHash": "sha256-fPBRVf6A5xlACYcOI59shGrjURuvwu0lRsDoSCEXt/I=", "narHash": "sha256-SCSLUKBmwlSLGQ8Xbr8PjRFtiHNk0l9ktqkcmqdBkfE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "4ed851c979641e28597a05086332d75cdc9e395f", "rev": "b76b5639c0593e0aeb0b5879ad62d4b30596c144",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -76,11 +76,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1780798858, "lastModified": 1780101106,
"narHash": "sha256-4KLc5ZMjfMQosXA2JasUgZTk3i+c/i1zMH4custtmI0=", "narHash": "sha256-VcvUdRb9rzKBbF6oMaMiAt+6HZQ1gom9b2dUybhVTVY=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "92840095e65b9970125843175f4be974b71a92ad", "rev": "26b82d423c4f6fda4a8015182516c938f8104337",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -108,11 +108,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1780243769, "lastModified": 1779560665,
"narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", "narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", "rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -141,11 +141,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780547341, "lastModified": 1777944972,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", "narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", "rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
"type": "github" "type": "github"
}, },
"original": { "original": {
-12
View File
@@ -4,12 +4,10 @@ from __future__ import annotations
from dataclasses import dataclass from dataclasses import dataclass
from typing import Self from typing import Self
from urllib.parse import quote
import httpx import httpx
DEFAULT_PAGE_SIZE = 100 DEFAULT_PAGE_SIZE = 100
EXPECTED_NO_CONTENT = 204
EXPECTED_CREATED = 201 EXPECTED_CREATED = 201
EXPECTED_OK = 200 EXPECTED_OK = 200
@@ -224,16 +222,6 @@ class GiteaClient:
json=payload, json=payload,
) )
def dispatch_workflow(self, *, owner: str, repo: str, workflow_id: str, ref: str) -> None:
"""Trigger a workflow_dispatch run."""
workflow_path = quote(workflow_id, safe="")
self._request(
"POST",
f"/api/v1/repos/{owner}/{repo}/actions/workflows/{workflow_path}/dispatches",
expected_statuses={EXPECTED_OK, EXPECTED_NO_CONTENT},
json={"ref": ref},
)
def list_run_jobs(self, *, owner: str, repo: str, run_id: str | int) -> list[WorkflowJob]: def list_run_jobs(self, *, owner: str, repo: str, run_id: str | int) -> list[WorkflowJob]:
"""List workflow jobs for a specific run.""" """List workflow jobs for a specific run."""
jobs: list[WorkflowJob] = [] jobs: list[WorkflowJob] = []
-10
View File
@@ -14,7 +14,6 @@ DEFAULT_BASE_BRANCH = "main"
DEFAULT_BRANCH = "automation/update-flake-lock" DEFAULT_BRANCH = "automation/update-flake-lock"
DEFAULT_GITEA_URL = "https://gitea.tmmworkshop.com" DEFAULT_GITEA_URL = "https://gitea.tmmworkshop.com"
PR_LABELS = ["dependencies", "automated", "flake_lock_update"] PR_LABELS = ["dependencies", "automated", "flake_lock_update"]
PR_CHECK_WORKFLOWS = ["build_systems.yml", "treefmt.yml", "pytest.yml"]
PR_TITLE = "Update flake.lock" PR_TITLE = "Update flake.lock"
PR_BODY = "Automated flake.lock update." PR_BODY = "Automated flake.lock update."
@@ -58,12 +57,6 @@ def find_flake_lock_pull_request(client: GiteaClient, *, owner: str, repo: str)
return pull_requests[0] return pull_requests[0]
def dispatch_pull_request_checks(client: GiteaClient, *, owner: str, repo: str, branch: str) -> None:
"""Dispatch the workflows that normally run for pull requests."""
for workflow in PR_CHECK_WORKFLOWS:
client.dispatch_workflow(owner=owner, repo=repo, workflow_id=workflow, ref=branch)
def has_worktree_changes() -> bool: def has_worktree_changes() -> bool:
"""Return whether `flake.lock` has worktree changes.""" """Return whether `flake.lock` has worktree changes."""
result = run_cmd(["git", "diff", "--quiet", "--", "flake.lock"], check=False) result = run_cmd(["git", "diff", "--quiet", "--", "flake.lock"], check=False)
@@ -120,9 +113,6 @@ def update(
branch=branch, branch=branch,
base=base, base=base,
) )
# We can remove this if Gitea fixes the following issue:
# https://github.com/go-gitea/gitea/issues/33963
dispatch_pull_request_checks(client, owner=owner, repo=repo_name, branch=branch)
typer.echo(pull_request.html_url or f"Pull request #{pull_request.number}") typer.echo(pull_request.html_url or f"Pull request #{pull_request.number}")
+4 -31
View File
@@ -3,13 +3,7 @@
from __future__ import annotations from __future__ import annotations
from python.gitea import PullRequest from python.gitea import PullRequest
from python.gitea_flake_lock import ( from python.gitea_flake_lock import ensure_flake_lock_pull_request, find_flake_lock_pull_request
PR_CHECK_WORKFLOWS,
PR_LABELS,
dispatch_pull_request_checks,
ensure_flake_lock_pull_request,
find_flake_lock_pull_request,
)
def _pull_request(number=1, head_branch="automation/update-flake-lock"): def _pull_request(number=1, head_branch="automation/update-flake-lock"):
@@ -26,7 +20,6 @@ def _pull_request(number=1, head_branch="automation/update-flake-lock"):
class FakeGiteaClient: class FakeGiteaClient:
def __init__(self, pull_requests=None): def __init__(self, pull_requests=None):
self.pull_requests = pull_requests or [] self.pull_requests = pull_requests or []
self.dispatch_calls = []
self.list_calls = [] self.list_calls = []
self.create_calls = [] self.create_calls = []
@@ -38,9 +31,6 @@ class FakeGiteaClient:
self.create_calls.append(kwargs) self.create_calls.append(kwargs)
return _pull_request() return _pull_request()
def dispatch_workflow(self, **kwargs):
self.dispatch_calls.append(kwargs)
def test_ensure_flake_lock_pull_request_finds_by_branch(): def test_ensure_flake_lock_pull_request_finds_by_branch():
pull_request = _pull_request() pull_request = _pull_request()
@@ -61,7 +51,7 @@ def test_ensure_flake_lock_pull_request_finds_by_branch():
assert client.create_calls == [] assert client.create_calls == []
def test_ensure_flake_lock_pull_request_creates_with_labels(): def test_ensure_flake_lock_pull_request_creates_without_labels():
client = FakeGiteaClient() client = FakeGiteaClient()
ensure_flake_lock_pull_request( ensure_flake_lock_pull_request(
@@ -80,12 +70,11 @@ def test_ensure_flake_lock_pull_request_creates_with_labels():
"body": "Automated flake.lock update.", "body": "Automated flake.lock update.",
"head": "automation/update-flake-lock", "head": "automation/update-flake-lock",
"base": "main", "base": "main",
"labels": PR_LABELS,
}, },
] ]
def test_find_flake_lock_pull_request_finds_by_label(): def test_find_flake_lock_pull_request_finds_by_branch():
pull_request = _pull_request() pull_request = _pull_request()
client = FakeGiteaClient([pull_request]) client = FakeGiteaClient([pull_request])
@@ -93,21 +82,5 @@ def test_find_flake_lock_pull_request_finds_by_label():
assert result == pull_request assert result == pull_request
assert client.list_calls == [ assert client.list_calls == [
{"owner": "Richie", "repo": "dotfiles", "labels": ["flake_lock_update"]}, {"owner": "Richie", "repo": "dotfiles", "head": "automation/update-flake-lock"},
]
def test_dispatch_pull_request_checks_runs_each_workflow():
client = FakeGiteaClient()
dispatch_pull_request_checks(client, owner="Richie", repo="dotfiles", branch="automation/update-flake-lock")
assert client.dispatch_calls == [
{
"owner": "Richie",
"repo": "dotfiles",
"workflow_id": workflow,
"ref": "automation/update-flake-lock",
}
for workflow in PR_CHECK_WORKFLOWS
] ]
+1 -1
View File
@@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = [ home.packages = [
pkgs.master.claude-code pkgs.claude-code
pkgs.master.codex pkgs.master.codex
pkgs.master.opencode pkgs.master.opencode
pkgs.master.pi-coding-agent pkgs.master.pi-coding-agent