Skip to content

Commit

Permalink
adjustments to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
mrT23 committed Mar 23, 2024
1 parent 8e39394 commit ee4798a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
6 changes: 1 addition & 5 deletions docs/docs/installation/locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ def main():
get_settings().set("openai.key", openai_key)
get_settings().set("github.user_token", user_token)

# Preparing the command
run_command = f"--pr_url={pr_url} {command.lstrip('/')}"
args = cli.set_parser().parse_args(run_command.split())

# Run the command. Feedback will appear in GitHub PR comments
cli.run(args=args)
cli.run_command(pr_url, command)


if __name__ == '__main__':
Expand Down
7 changes: 7 additions & 0 deletions pr_agent/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ def set_parser():
parser.add_argument('rest', nargs=argparse.REMAINDER, default=[])
return parser

def run_command(pr_url, command):
# Preparing the command
run_command = f"--pr_url={pr_url} {command.lstrip('/')}"
args = set_parser().parse_args(run_command.split())

# Run the command. Feedback will appear in GitHub PR comments
run(args=args)

def run(inargs=None, args=None):
parser = set_parser()
Expand Down
9 changes: 1 addition & 8 deletions pr_agent/cli_pip.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from pr_agent import cli
from pr_agent.config_loader import get_settings
from pr_agent.log import setup_logger

setup_logger()


def main():
Expand All @@ -18,12 +15,8 @@ def main():
get_settings().set("openai.key", openai_key)
get_settings().set("github.user_token", user_token)

# Preparing the command
run_command = f"--pr_url={pr_url} {command.lstrip('/')}"
args = cli.set_parser().parse_args(run_command.split())

# Run the command. Feedback will appear in GitHub PR comments
cli.run(args=args)
cli.run_command(pr_url, command)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pr-agent"
version = "0.2.0"
version = "0.2.1"

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

Expand Down

0 comments on commit ee4798a

Please sign in to comment.