Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #603: Resolve issue with empty .log file when using API command to download outputs #670

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions aider_modify_repo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import argparse

from aider.coders import Coder
from aider.io import InputOutput
from aider.models import Model


def modify_repo_with_aider(model_name, solver_command, test_command=None) -> None:
io = InputOutput(yes=True)
model = Model(model_name)
coder = Coder.create(main_model=model, io=io, use_git=False)
coder.run(solver_command)

if test_command:
coder.run(f"/test {test_command}")


def main():
parser = argparse.ArgumentParser(description="Modify a repository with Aider.")
parser.add_argument(
"--model-name", type=str, required=True, help="The name of the model to use."
)
parser.add_argument(
"--solver-command",
type=str,
required=True,
help="The command to run the solver.",
)
parser.add_argument(
"--test-command",
type=str,
required=False,
help="An optional test command to run.",
)

args = parser.parse_args()

modify_repo_with_aider(args.model_name, args.solver_command, args.test_command)


if __name__ == "__main__":
main()