From 156628f32c7bcc5865fbc602d1fb758e3d066a71 Mon Sep 17 00:00:00 2001 From: Howard Gil Date: Wed, 31 Jul 2024 16:14:58 -0700 Subject: [PATCH] Changes for PR --- .gitignore | 2 +- agentops/cli.py | 4 ++-- agentops/time_travel.py | 6 ++---- .../time_travel.py} | 0 4 files changed, 5 insertions(+), 7 deletions(-) rename tests/{test_time_travel.py => core_manual_tests/time_travel.py} (100%) diff --git a/.gitignore b/.gitignore index e8ae1ba2..4db649aa 100644 --- a/.gitignore +++ b/.gitignore @@ -164,4 +164,4 @@ cython_debug/ .DS_Store agentops_time_travel.json -agentops_time_travel.yaml \ No newline at end of file +.agentops_time_travel.yaml \ No newline at end of file diff --git a/agentops/cli.py b/agentops/cli.py index d3f52ee0..29b9e90b 100644 --- a/agentops/cli.py +++ b/agentops/cli.py @@ -7,7 +7,7 @@ def main(): subparsers = parser.add_subparsers(dest="command") timetravel_parser = subparsers.add_parser( - "timetravel", help="Time Travel Debugging commands" + "timetravel", help="Time Travel Debugging commands", aliases=["tt"] ) timetravel_parser.add_argument( "branch_name", @@ -28,7 +28,7 @@ def main(): args = parser.parse_args() - if args.command == "timetravel": + if args.command in ["timetravel", "tt"]: if args.branch_name: fetch_time_travel_id(args.branch_name) if args.on: diff --git a/agentops/time_travel.py b/agentops/time_travel.py index 98112fcc..e68bb1fe 100644 --- a/agentops/time_travel.py +++ b/agentops/time_travel.py @@ -3,8 +3,6 @@ from .http_client import HttpClient import os from .helpers import singleton -from dotenv import load_dotenv -from .log_config import logger from os import environ @@ -82,7 +80,7 @@ def fetch_prompt_override_from_time_travel_cache(kwargs): def check_time_travel_active(): script_dir = os.path.dirname(os.path.abspath(__file__)) parent_dir = os.path.dirname(script_dir) - config_file_path = os.path.join(parent_dir, "agentops_time_travel.yaml") + config_file_path = os.path.join(parent_dir, ".agentops_time_travel.yaml") with open(config_file_path, "r") as config_file: config = yaml.safe_load(config_file) @@ -94,7 +92,7 @@ def check_time_travel_active(): def set_time_travel_active_state(active_setting): - config_path = "agentops_time_travel.yaml" + config_path = ".agentops_time_travel.yaml" try: with open(config_path, "r") as config_file: config = yaml.safe_load(config_file) or {} diff --git a/tests/test_time_travel.py b/tests/core_manual_tests/time_travel.py similarity index 100% rename from tests/test_time_travel.py rename to tests/core_manual_tests/time_travel.py