Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ pypi-publish-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish to PyPI

on:
push:
tags:
- "*"
workflow_dispatch: # This line adds manual trigger support

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install poetry
run: pip install poetry

- name: Build and publish
run: |
poetry build
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
working-directory: ./cli
Empty file added cli/README.md
Empty file.
Empty file added cli/kaizen_cli/__init__.py
Empty file.
33 changes: 33 additions & 0 deletions cli/kaizen_cli/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import click
from kaizen.generator.ui import UITestGenerator


@click.group()
def cli():
"""Kaizen CLI"""
pass


@cli.command()
@click.argument("url", required=True)
def ui_tests(url):
"""Run ui test generation"""
UITestGenerator().generate_ui_tests(url)


@cli.group()
def reviewer():
"""reviewer command group"""
pass


@reviewer.command()
@click.argument("github_url", required=True)
@click.argument("branch", required=True)
def work(url):
"""Run ui test generation"""
UITestGenerator().generate_ui_tests(url)


if __name__ == "__main__":
cli()
2,163 changes: 2,163 additions & 0 deletions cli/poetry.lock

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[tool.poetry]
name = "kaizen-cli"
version = "0.1.0"
description = ""
authors = ["Saurav Panda <sgp65@cornell.edu>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.8.1"
kaizen-cloudcode = {path = "..", develop = true}
click = "^8.1.3"

[tool.poetry.scripts]
kaizen-cli = "kaizen_cli.cli:cli"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file added cli/tests/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion examples/work_summarizer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Get the current date and calculate the date 14 days ago
current_date = datetime.now(timezone.utc).date()
since_date = current_date - timedelta(days=14)
since_date = current_date - timedelta(days=7)

# Convert the date to ISO format
since_date_iso = since_date.isoformat()
Expand Down
Empty file added kaizen/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions kaizen/llms/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def __init__(

if "models" in self.config.get("language_model"):
self.models = self.config["language_model"]["models"]
else:
self.models = {}

self.model = self.model_config["model"]
if self.config.get("language_model", {}).get(
Expand Down
2 changes: 1 addition & 1 deletion kaizen/reviewer/code_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def create_pr_review_text(self, topics):
start_line=review.get("start_line", "NA"),
end_line=review.get("end_line", "NA"),
file_name=review.get("file_name", "NA"),
request_for_change=review.get('request_for_change', 'NA')
request_for_change=review.get("request_for_change", "NA"),
)
markdown_output += ct + "\n"

Expand Down