mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
added --cont
This commit is contained in:
parent
5ee455a05b
commit
1e40dca4f1
1 changed files with 5 additions and 4 deletions
|
@ -41,6 +41,7 @@ def main(
|
||||||
clean: bool = typer.Option(
|
clean: bool = typer.Option(
|
||||||
False, "--clean", "-c", help="Discard the existing testdir and make a clean copy"
|
False, "--clean", "-c", help="Discard the existing testdir and make a clean copy"
|
||||||
),
|
),
|
||||||
|
cont: bool = typer.Option(False, "--cont", help="Continue the (single) matching testdir"),
|
||||||
make_new: bool = typer.Option(False, "--new", "-n", help="Make a new dated testdir"),
|
make_new: bool = typer.Option(False, "--new", "-n", help="Make a new dated testdir"),
|
||||||
no_unit_tests: bool = typer.Option(False, "--no-unit-tests", help="Do not run unit tests"),
|
no_unit_tests: bool = typer.Option(False, "--no-unit-tests", help="Do not run unit tests"),
|
||||||
no_aider: bool = typer.Option(False, "--no-aider", help="Do not run aider"),
|
no_aider: bool = typer.Option(False, "--no-aider", help="Do not run aider"),
|
||||||
|
@ -52,9 +53,6 @@ def main(
|
||||||
threads: int = typer.Option(1, "--threads", "-t", help="Number of threads to run in parallel"),
|
threads: int = typer.Option(1, "--threads", "-t", help="Number of threads to run in parallel"),
|
||||||
num_tests: int = typer.Option(-1, "--num-tests", "-n", help="Number of tests to run"),
|
num_tests: int = typer.Option(-1, "--num-tests", "-n", help="Number of tests to run"),
|
||||||
):
|
):
|
||||||
assert BENCHMARK_DNAME.exists() and BENCHMARK_DNAME.is_dir(), BENCHMARK_DNAME
|
|
||||||
assert ORIGINAL_DNAME.exists() and ORIGINAL_DNAME.is_dir(), ORIGINAL_DNAME
|
|
||||||
|
|
||||||
repo = git.Repo(search_parent_directories=True)
|
repo = git.Repo(search_parent_directories=True)
|
||||||
commit_hash = repo.head.object.hexsha[:7]
|
commit_hash = repo.head.object.hexsha[:7]
|
||||||
if repo.is_dirty():
|
if repo.is_dirty():
|
||||||
|
@ -64,7 +62,7 @@ def main(
|
||||||
|
|
||||||
if len(dirname.parts) == 1:
|
if len(dirname.parts) == 1:
|
||||||
priors = list(BENCHMARK_DNAME.glob(f"*--{dirname}"))
|
priors = list(BENCHMARK_DNAME.glob(f"*--{dirname}"))
|
||||||
if len(priors) == 1 and stats_only:
|
if len(priors) == 1 and (stats_only or cont):
|
||||||
dirname = priors[0].name
|
dirname = priors[0].name
|
||||||
print(f"Using pre-existing {dirname}")
|
print(f"Using pre-existing {dirname}")
|
||||||
elif len(priors):
|
elif len(priors):
|
||||||
|
@ -88,6 +86,9 @@ def main(
|
||||||
summarize_results(dirname)
|
summarize_results(dirname)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
assert BENCHMARK_DNAME.exists() and BENCHMARK_DNAME.is_dir(), BENCHMARK_DNAME
|
||||||
|
assert ORIGINAL_DNAME.exists() and ORIGINAL_DNAME.is_dir(), ORIGINAL_DNAME
|
||||||
|
|
||||||
if clean and dirname.exists():
|
if clean and dirname.exists():
|
||||||
print("Cleaning up and replacing", dirname)
|
print("Cleaning up and replacing", dirname)
|
||||||
dir_files = set(fn.name for fn in dirname.glob("*"))
|
dir_files = set(fn.name for fn in dirname.glob("*"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue