Skip to content

Commit db85186

Browse files
committed
fix: Remove obsolete tests for deleted sync functionality
Removed tests for: - test_bisync_commands.py (tenant-wide bisync functions) - test_cloud_utils.py (deprecated utilities) - test_rclone_config.py (mount profiles) - test_sync_commands_integration.py (removed sync command) Fixed: - Removed 'sync' import from commands/__init__.py Tests now pass with SPEC-20 project-scoped architecture. Signed-off-by: phernandez <paul@basicmachines.co>
1 parent da9c702 commit db85186

12 files changed

Lines changed: 18 additions & 1003 deletions

specs/SPEC-20 Simplified Project-Scoped Rclone Sync.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -991,14 +991,14 @@ rm -rf ~/basic-memory-cloud-sync/
991991
- [x] Test config loading/saving with new schema
992992
- [x] Handle migration from old config format
993993

994-
### Phase 2: Rclone Config Simplification (1 day)
994+
### Phase 2: Rclone Config Simplification ✅
995995
- [x] Update `configure_rclone_remote()` to use `basic-memory-cloud` as remote name
996996
- [x] Remove `add_tenant_to_rclone_config()` (replaced by configure_rclone_remote)
997997
- [x] Remove tenant_id from remote naming
998998
- [x] Test rclone config generation
999999
- [x] Clean up deprecated import references in bisync_commands.py and core_commands.py
10001000

1001-
### Phase 3: Project-Scoped Rclone Commands (2-3 days)
1001+
### Phase 3: Project-Scoped Rclone Commands ✅
10021002
- [x] Create `src/basic_memory/cli/commands/cloud/rclone_commands.py`
10031003
- [x] Implement `get_project_remote(project, bucket_name)`
10041004
- [x] Implement `project_sync()` (one-way: local → cloud)
@@ -1012,7 +1012,7 @@ rm -rf ~/basic-memory-cloud-sync/
10121012
- [x] Write unit tests for rclone commands (22 tests, 99% coverage)
10131013
- [x] Temporarily disable mount commands in core_commands.py
10141014

1015-
### Phase 4: CLI Integration (2-3 days)
1015+
### Phase 4: CLI Integration ✅
10161016
- [x] Update `project.py`: Add `--local-path` flag to `project add` command
10171017
- [x] Update `project.py`: Create `project sync-setup` command
10181018
- [x] Create `project.py`: Add `project sync` command
@@ -1025,7 +1025,7 @@ rm -rf ~/basic-memory-cloud-sync/
10251025
- [ ] Add helper functions: `get_all_sync_projects()`, `get_project_by_name()` (optional)
10261026
- [ ] Write integration tests for new commands (deferred)
10271027

1028-
### Phase 5: Cleanup (1 day)
1028+
### Phase 5: Cleanup ✅
10291029
- [x] Remove `mount_commands.py` (entire file)
10301030
- [x] Remove mount-related functions from `rclone_config.py`:
10311031
- [x] `MOUNT_PROFILES`
@@ -1053,15 +1053,15 @@ rm -rf ~/basic-memory-cloud-sync/
10531053
- [x] Update tests to remove references to deprecated functionality
10541054
- [x] All typecheck errors resolved
10551055

1056-
### Phase 6: Documentation (1 day)
1056+
### Phase 6: Documentation
10571057
- [ ] Update `docs/cloud-cli.md` with new workflow
10581058
- [ ] Add migration guide for existing users
10591059
- [ ] Update command reference
10601060
- [ ] Add troubleshooting section
10611061
- [ ] Update SPEC-8 with "Superseded by SPEC-20" note
10621062
- [ ] Add examples for common workflows
10631063

1064-
### Testing & Validation (1 day)
1064+
### Testing & Validation
10651065
- [ ] Test Scenario 1: New user setup
10661066
- [ ] Test Scenario 2: Multiple projects
10671067
- [ ] Test Scenario 3: Project without sync
@@ -1070,16 +1070,6 @@ rm -rf ~/basic-memory-cloud-sync/
10701070
- [ ] Verify performance targets (setup < 30s, sync < 5s)
10711071
- [ ] Test migration from SPEC-8 implementation
10721072

1073-
## Implementation Timeline
1074-
1075-
**Total: ~10-12 days**
1076-
- Phase 1 (Config Schema): 1-2 days
1077-
- Phase 2 (Rclone Config): 1 day
1078-
- Phase 3 (Rclone Commands): 2-3 days
1079-
- Phase 4 (CLI Integration): 2-3 days
1080-
- Phase 5 (Cleanup): 1 day
1081-
- Phase 6 (Documentation): 1 day
1082-
- Testing & Validation: 1 day
10831073

10841074
## Future Enhancements (Out of Scope)
10851075

src/basic_memory/cli/commands/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
"""CLI commands for basic-memory."""
22

3-
from . import status, sync, db, import_memory_json, mcp, import_claude_conversations
3+
from . import status, db, import_memory_json, mcp, import_claude_conversations
44
from . import import_claude_projects, import_chatgpt, tool, project
55

66
__all__ = [
77
"status",
8-
"sync",
98
"db",
109
"import_memory_json",
1110
"mcp",

src/basic_memory/cli/commands/cloud/bisync_commands.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
"""Cloud bisync utility functions for Basic Memory CLI.
1+
"""Cloud bisync utility functions for Basic Memory CLI."""
22

3-
SPEC-20: Simplified to project-scoped operations only.
4-
Tenant-wide bisync functions have been removed in favor of project-scoped commands.
5-
"""
6-
7-
import asyncio
83
from pathlib import Path
94

105
from basic_memory.cli.commands.cloud.api_client import make_api_request

src/basic_memory/cli/commands/cloud/rclone_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,4 @@ def project_ls(
289289

290290
cmd = ["rclone", "ls", remote_path]
291291
result = subprocess.run(cmd, capture_output=True, text=True, check=True)
292-
return result.stdout.splitlines()
292+
return result.stdout.splitlines()

src/basic_memory/cli/commands/project.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def add_project(
8484
path: str = typer.Argument(
8585
None, help="Path to the project directory (required for local mode)"
8686
),
87-
local_path: str = typer.Option(None, "--local-path", help="Local sync path for cloud mode (optional)"),
87+
local_path: str = typer.Option(
88+
None, "--local-path", help="Local sync path for cloud mode (optional)"
89+
),
8890
set_default: bool = typer.Option(False, "--default", help="Set as default project"),
8991
) -> None:
9092
"""Add a new project.
@@ -581,7 +583,9 @@ async def _get_project():
581583
console.print(f" {file}")
582584
console.print(f"\n[dim]Total: {len(files)} files[/dim]")
583585
else:
584-
console.print(f"[yellow]No files found in {name}" + (f"/{path}" if path else "") + "[/yellow]")
586+
console.print(
587+
f"[yellow]No files found in {name}" + (f"/{path}" if path else "") + "[/yellow]"
588+
)
585589

586590
except Exception as e:
587591
console.print(f"[red]Error: {e}[/red]")

src/basic_memory/cli/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
mcp,
1414
project,
1515
status,
16-
sync,
1716
tool,
1817
)
1918

test-int/cli/test_sync_commands_integration.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)