Skip to content

Commit 1701eb5

Browse files
authored
Merge pull request #815 from Codium-ai/tr/pypi
adjustments to pypi
2 parents a355fb5 + ee4798a commit 1701eb5

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

docs/docs/installation/locally.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,8 @@ def main():
2727
get_settings().set("openai.key", openai_key)
2828
get_settings().set("github.user_token", user_token)
2929

30-
# Preparing the command
31-
run_command = f"--pr_url={pr_url} {command.lstrip('/')}"
32-
args = cli.set_parser().parse_args(run_command.split())
33-
3430
# Run the command. Feedback will appear in GitHub PR comments
35-
cli.run(args=args)
31+
cli.run_command(pr_url, command)
3632

3733

3834
if __name__ == '__main__':

pr_agent/cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ def set_parser():
5050
parser.add_argument('rest', nargs=argparse.REMAINDER, default=[])
5151
return parser
5252

53+
def run_command(pr_url, command):
54+
# Preparing the command
55+
run_command = f"--pr_url={pr_url} {command.lstrip('/')}"
56+
args = set_parser().parse_args(run_command.split())
57+
58+
# Run the command. Feedback will appear in GitHub PR comments
59+
run(args=args)
5360

5461
def run(inargs=None, args=None):
5562
parser = set_parser()

pr_agent/cli_pip.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
from pr_agent import cli
22
from pr_agent.config_loader import get_settings
3-
from pr_agent.log import setup_logger
4-
5-
setup_logger()
63

74

85
def main():
@@ -18,12 +15,8 @@ def main():
1815
get_settings().set("openai.key", openai_key)
1916
get_settings().set("github.user_token", user_token)
2017

21-
# Preparing the command
22-
run_command = f"--pr_url={pr_url} {command.lstrip('/')}"
23-
args = cli.set_parser().parse_args(run_command.split())
24-
2518
# Run the command. Feedback will appear in GitHub PR comments
26-
cli.run(args=args)
19+
cli.run_command(pr_url, command)
2720

2821

2922
if __name__ == '__main__':

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "pr-agent"
7-
version = "0.2.0"
7+
version = "0.2.1"
88

99
authors = [{name= "CodiumAI", email = "[email protected]"}]
1010

0 commit comments

Comments
 (0)