diff --git a/.gitignore b/.gitignore index f35b9d1..a9eddc9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ mypy.ini .env +.envrc __pycache__ output/ .vscode diff --git a/README.md b/README.md index 864475c..2bdd661 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Run the following command to resolve issues in the `[OWNER]/[REPO]` repository. For instance, if you want to resolve issues in this repo, you would run: ```bash -poetry run python github_resolver/resolve_issues.py all-hands-ai/github-resolver +poetry run python github_resolver/resolve_issues.py --repo all-hands-ai/github-resolver ``` The output will be written to the `output/` directory. diff --git a/github_resolver/resolve_issues.py b/github_resolver/resolve_issues.py index 2e6fd3d..a81bbfd 100644 --- a/github_resolver/resolve_issues.py +++ b/github_resolver/resolve_issues.py @@ -626,7 +626,7 @@ async def run_with_semaphore(task): parser.add_argument( "--prompt-file", type=str, - default="github_resolver/prompts/resolver/basic-with-tests.jinja", + default="github_resolver/prompts/resolve/basic-with-tests.jinja", help="Path to the prompt template file in Jinja format.", ) parser.add_argument( @@ -657,7 +657,7 @@ async def run_with_semaphore(task): llm_config = LLMConfig( model=my_args.llm_model or os.environ["LLM_MODEL"], api_key=my_args.llm_api_key or os.environ["LLM_API_KEY"], - base_url=my_args.llm_base_url or os.environ["LLM_BASE_URL"], + base_url=my_args.llm_base_url or os.environ.get("LLM_BASE_URL", None), ) # Read the prompt template @@ -665,8 +665,9 @@ async def run_with_semaphore(task): prompt_template = f.read() repo_instruction = None - with open(my_args.repo_instruction_file, 'r') as f: - repo_instruction = f.read() + if my_args.repo_instruction_file: + with open(my_args.repo_instruction_file, 'r') as f: + repo_instruction = f.read() asyncio.run( resolve_issues( diff --git a/poetry.lock b/poetry.lock index a159acf..dfdce44 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5806,4 +5806,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "ea0d9c9b0eea93969dd703e7978da9fcafcb4bba161cf8b8acae1e89aa11bc66" +content-hash = "a71fdb4e13363a18bd4b67053a392159c6f8cca831f4a898e79993285751f6fe" diff --git a/pyproject.toml b/pyproject.toml index 5bd6ad1..5b3703f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ packages = [ [tool.poetry.dependencies] python = "^3.11" openhands-ai = "^0.9.3" +pandas = "^2.2.2" [tool.poetry.group.dev.dependencies] mypy = "*"