-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #245 from MLSysOps/lefan/local-git
[MRG] Add a command to generate report for local git repository
- Loading branch information
Showing
8 changed files
with
336 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,7 +85,6 @@ def report(ctx, repo, model, user, visualize): | |
future2.result() | ||
else: | ||
if repo is None: | ||
# TODO: support local project report | ||
repo = questionary.text( | ||
"What is your GitHub repository? (e.g., MLSysOps/MLE-agent)" | ||
).ask() | ||
|
@@ -110,6 +109,27 @@ def report(ctx, repo, model, user, visualize): | |
return workflow.report(os.getcwd(), repo, user, model) | ||
|
||
|
||
@cli.command() | ||
@click.pass_context | ||
@click.argument('path', default='./') | ||
@click.option('--email', default=None, help='The email of the user.') | ||
@click.option('--start-date', default=None, help='The start date of the user activity (YYYY-MM-DD).') | ||
@click.option('--end-date', default=None, help='The end date of the user activity (YYYY-MM-DD).') | ||
def report_local(ctx, path, email, start_date, end_date): | ||
""" | ||
report_local: generate report with LLM for local git repo. | ||
""" | ||
if not check_config(console): | ||
return | ||
|
||
if email is None: | ||
email = questionary.text( | ||
"What is your Git email? (e.g., [email protected])" | ||
).ask() | ||
|
||
return workflow.report_local(os.getcwd(), path, email, start_date=start_date, end_date=end_date) | ||
|
||
|
||
@cli.command() | ||
@click.option('--model', default=None, help='The model to use for the chat.') | ||
@click.option('--auto', is_flag=True, help='Use auto mode to generate the coding plan.') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from .baseline import baseline | ||
from .report import report | ||
from .report_local import report_local | ||
from .kaggle import kaggle, auto_kaggle | ||
from .chat import chat |
Oops, something went wrong.