diff options
| author | Christian Cunningham <cc@local.lan> | 2026-03-05 23:32:17 -0800 |
|---|---|---|
| committer | Christian Cunningham <cc@local.lan> | 2026-03-05 23:32:17 -0800 |
| commit | 1b8aca9c467a0762f7a0dbd07796bb89d99a3036 (patch) | |
| tree | 201027d1584d55ed4b1d4b32fd26fed2e2c7463e | |
| parent | 448feda282a18e2cb850fdcd817f4f9d34b2ab61 (diff) | |
Cleaning
| -rwxr-xr-x | access.sh | 24 | ||||
| -rwxr-xr-x | cleanup_repo.sh | 36 | ||||
| -rw-r--r-- | tea_issue.sh | 3 | ||||
| -rwxr-xr-x | write_tests.sh | 36 |
4 files changed, 0 insertions, 99 deletions
diff --git a/access.sh b/access.sh deleted file mode 100755 index adf51fc..0000000 --- a/access.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -[ ! -f .env ] || export $(grep -v '^#' .env | xargs) -SERVER="${OLLAMA_HOST:-http://localhost:11434}" -MODEL="${OLLAMA_MODEL:-llama3.2}" -PROMPT=$(cat << EOF -Please clean up the following code, leaving ample documentation: -def test(a: int, b: float) -> int: - return a + b ** 0.5 -EOF -) -RESPONSE=$(curl -s "$SERVER/api/generate" \ - -H "Content-Type: application/json" \ - -d "$(jq -n --arg model "$MODEL" --arg prompt "$PROMPT" \ - '{model:$model, prompt:$prompt, stream:false}')" \ - | jq -r '.response') -echo "${RESPONSE}" -#curl -s "$SERVER/api/generate" \ -# -H "Content-Type: application/json" \ -# -d "{ -# \"model\": \"$MODEL\", -# \"prompt\": \"$PROMPT\", -# \"stream\": false -# }" | jq -r '.response' diff --git a/cleanup_repo.sh b/cleanup_repo.sh deleted file mode 100755 index 4352f1a..0000000 --- a/cleanup_repo.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -[ ! -f .env ] || export $(grep -v '^#' .env | xargs) -[ ! -f .teagent ] || export $(grep -v '^#' .teagent | xargs) -if [ -z "$REPO" ]; then - exit 1 -fi - -SERVER="${OLLAMA_HOST:-http://localhost:11434}" -MODEL="${OLLAMA_MODEL:-llama3.2}" - -SOURCE_FILES=`find . -type f -iname \*.py` - -for source_file in $SOURCE_FILES; do - if [ ! -s "${source_file}" ]; then - continue - fi - SOURCE=$(<"${source_file}") - PROMPT=$(cat << EOF -Please clean up the following code, leaving ample documentation. -If the code seems clean already, simply write: DONE -EOF -) - PROMPT="${PROMPT} -${SOURCE}" - RESPONSE=$(curl -s "$SERVER/api/generate" \ - -H "Content-Type: application/json" \ - -d "$(jq -n --arg model "$MODEL" --arg prompt "$PROMPT" \ - '{model:$model, prompt:$prompt, stream:false}')" \ - | jq -r '.response') - if [[ "$RESPONSE" = 'DONE'* ]]; then - echo > /dev/null - else - tea issues create --title "Cleanup ${source_file} (TeAgent)" --body "${RESPONSE}" --login teagent --repo "${REPO}" - fi -done diff --git a/tea_issue.sh b/tea_issue.sh deleted file mode 100644 index bbcb5dc..0000000 --- a/tea_issue.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -[ ! -f .env ] || export $(grep -v '^#' .env | xargs) -echo tea issues --login teagent --repo "${REPO_NAME}" diff --git a/write_tests.sh b/write_tests.sh deleted file mode 100755 index 18bc777..0000000 --- a/write_tests.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -[ ! -f .env ] || export $(grep -v '^#' .env | xargs) -[ ! -f .teagent ] || export $(grep -v '^#' .teagent | xargs) -if [ -z "$REPO" ]; then - exit 1 -fi - -SERVER="${OLLAMA_HOST:-http://localhost:11434}" -MODEL="${OLLAMA_MODEL:-llama3.2}" - -SOURCE_FILES=`find . -type f -iname \*.py` - -for source_file in $SOURCE_FILES; do - if [ ! -s "${source_file}" ]; then - continue - fi - SOURCE=$(<"${source_file}") - PROMPT=$(cat << EOF -Please write tests for the following source, leaving ample documentation. -If there don't seem to be any natural tests, simply write: DONE -EOF -) - PROMPT="${PROMPT} -${SOURCE}" - RESPONSE=$(curl -s "$SERVER/api/generate" \ - -H "Content-Type: application/json" \ - -d "$(jq -n --arg model "$MODEL" --arg prompt "$PROMPT" \ - '{model:$model, prompt:$prompt, stream:false}')" \ - | jq -r '.response') - if [[ "$RESPONSE" = 'DONE'* ]]; then - echo > /dev/null - else - tea issues create --title "Cleanup ${source_file} (TeAgent)" --body "${RESPONSE}" --login teagent --repo "${REPO}" - fi -done |
