Compare commits

..

2 Commits

Author SHA1 Message Date
3f71159ecf Run within bash
Some checks failed
Run Python tests (through Pytest) / Test (push) Failing after 24s
Verify Python project can be installed, loaded and have version checked / Test (push) Has been cancelled
2025-04-13 17:13:51 +02:00
024f987b8d Virtualenv 2025-04-13 17:06:13 +02:00

View File

@ -30,8 +30,23 @@ def generate_branch_name(issue_number: str, issue_title: str) -> str:
logger = logging.getLogger(__name__)
AIDER_TEST="pytest test"
AIDER_LINT="ruff format; ruff check --fix --ignore RUF022 --ignore PGH004; ruff format; ruff check --ignore RUF022 --ignore PGH004;"
def bash_cmd(*commands: str) -> str:
return "bash -c \""+';'.join(cmd)+"\""
AIDER_TEST=bash_cmd(
"virtualenv venv",
"source venv/bin/activate",
"pip install -e .",
"pytest test",
)
AIDER_LINT=bash_cmd(
"ruff format",
"ruff check --fix --ignore RUF022 --ignore PGH004",
"ruff format",
"ruff check --ignore RUF022 --ignore PGH004",
)
MODEL = 'o3-mini'
@ -124,6 +139,7 @@ def run_cmd(cmd: list[str], cwd:Path|None=None) -> None:
def process_issue(args, tmpdirname: Path, branch_name: str, issue_title: str, issue_description: str, issue_number: str):
repo_url = f"{args.gitea_url}:{args.owner}/{args.repo}.git".replace('https://', 'git@')
run_cmd(["git", "clone", repo_url, tmpdirname])
run_cmd(['bash', '-c', AIDER_TEST], tmpdirname)
run_cmd(["git", "checkout", args.base_branch], tmpdirname)
run_cmd(["git", "checkout", "-b", branch_name], tmpdirname)
run_cmd(create_aider_command(f'# {issue_title}\n{issue_description}'), tmpdirname)