Skip to content

ISE-Research/LinkAnchor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkAnchor

an authomated tool for linking commits and issues

Quick Run

Install requirements

# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"

# install poetry 
pip install poetry 

# optional: install poetry shell plugin
poetry self add poetry-plugin-shell

Setup virtual env

# using poetry shell (recommended):
poetry shell

# using poetry env 
poetry env use python3.12
. <(poetry env activate)

# virtualenv
pip -m venv venv
source venv/bin/activate

Install python dependencies

# install dependencies
poetry install --no-root

Install git-wrapper and code-wrapper development use:

(cd src/git-wrapper && maturin develop)
(cd src/code-wrapper && maturin develop)

Run

export OPENAI_API_KEY=<YOUR_OPEN_API_KEY>

# default mode
python3 -m src.main --git <GIT_REPO_URL> --issue <ISSUE_URL>

# interactive mode
python3 -m src.main --git <GIT_REPO_URL> --issue <ISSUE_URL> --interactive

# debug logs enabled
python3 -m src.main --git <GIT_REPO_URL> --issue <ISSUE_URL> --debug

Here is a simple sample for LinkAnchor on github:

export OPENAI_API_KEY=<YOUR_OPEN_API_KEY>

python3 -m src.main --git https://github.com/pallets/flask --issue https://github.com/pallets/flask/issues/5472 --interactive

Benchmarks

EALink dataset

To run the benchmark on ealink dataset:

python3 -m bench.ealink 

# benchmark a simple project:
python3 -m bench.ealink <PROJECT-NAME>

# benchmark upto a certain links (for quick results)
python3 -m bench.ealink --count <NUM>

# rerun benchmark on records that recieved rate-limits from LLM API:
python3 -m bench.ealink --repair

Note that the above command downloads the dataset if not available on your local disk.

After running the benchmark you can see the results via:

python3 -m bench.ealink --eval --count <NUM>

Practical dataset

To run benchmark on practical dataset:

python3 -m bench.practical

About

LinkAnchor: An Autonomous LLM-Based Agent for Issue-to-Commit Link Recovery

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •