From 685cccf7085f5cedc164b56bcb7b0e388e663295 Mon Sep 17 00:00:00 2001 From: phernandez Date: Tue, 28 Oct 2025 11:25:38 -0500 Subject: [PATCH] refactor: Clean up deprecated rclone_config import references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated bisync_commands.py and core_commands.py to use simplified configure_rclone_remote() function instead of deprecated add_tenant_to_rclone_config(). Removed MOUNT_PROFILES import and replaced dynamic help text with static string. mount_commands.py still has errors but will be removed entirely in Phase 5. Related to SPEC-20 Phase 2 cleanup. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Signed-off-by: phernandez --- src/basic_memory/cli/commands/cloud/bisync_commands.py | 6 ++---- src/basic_memory/cli/commands/cloud/core_commands.py | 5 ++--- tests/test_rclone_config.py | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/basic_memory/cli/commands/cloud/bisync_commands.py b/src/basic_memory/cli/commands/cloud/bisync_commands.py index 25aa1a6d..6178a4e2 100644 --- a/src/basic_memory/cli/commands/cloud/bisync_commands.py +++ b/src/basic_memory/cli/commands/cloud/bisync_commands.py @@ -17,7 +17,7 @@ from basic_memory.cli.commands.cloud.cloud_utils import ( fetch_cloud_projects, ) from basic_memory.cli.commands.cloud.rclone_config import ( - add_tenant_to_rclone_config, + configure_rclone_remote, ) from basic_memory.cli.commands.cloud.rclone_installer import RcloneInstallError, install_rclone from basic_memory.config import ConfigManager @@ -343,9 +343,7 @@ def setup_cloud_bisync(sync_dir: Optional[str] = None) -> None: # Step 4: Configure rclone console.print("\n[blue]Step 4: Configuring rclone...[/blue]") - add_tenant_to_rclone_config( - tenant_id=tenant_id, - bucket_name=bucket_name, + configure_rclone_remote( access_key=access_key, secret_key=secret_key, ) diff --git a/src/basic_memory/cli/commands/cloud/core_commands.py b/src/basic_memory/cli/commands/cloud/core_commands.py index e31461d6..529e97df 100644 --- a/src/basic_memory/cli/commands/cloud/core_commands.py +++ b/src/basic_memory/cli/commands/cloud/core_commands.py @@ -27,9 +27,8 @@ from basic_memory.cli.commands.cloud.bisync_commands import ( run_check, setup_cloud_bisync, show_bisync_status, + BISYNC_PROFILES, ) -from basic_memory.cli.commands.cloud.rclone_config import MOUNT_PROFILES -from basic_memory.cli.commands.cloud.bisync_commands import BISYNC_PROFILES console = Console() @@ -192,7 +191,7 @@ def setup( @cloud_app.command("mount") def mount( profile: str = typer.Option( - "balanced", help=f"Mount profile: {', '.join(MOUNT_PROFILES.keys())}" + "balanced", help="Mount profile: balanced, safe, or fast" ), path: Optional[str] = typer.Option( None, help="Custom mount path (default: ~/basic-memory-{tenant-id})" diff --git a/tests/test_rclone_config.py b/tests/test_rclone_config.py index 68b2e2d0..e4d07da7 100644 --- a/tests/test_rclone_config.py +++ b/tests/test_rclone_config.py @@ -116,4 +116,4 @@ def test_load_rclone_config_nonexistent(temp_rclone_config): # Should return empty config without error config = load_rclone_config() - assert len(config.sections()) == 0 \ No newline at end of file + assert len(config.sections()) == 0