Skip to content

Commit 9d07d24

Browse files
groksrcclaude
andcommitted
docs(core): address review feedback on #744
- utils.setup_logging: update stale docstring to reflect the new log path (``<basic-memory data dir>/basic-memory.log``, honors BASIC_MEMORY_CONFIG_DIR). The implementation was fixed but the ``Args:`` block still referenced ``~/.basic-memory/``. - ignore_utils.load_gitignore_patterns: same treatment — the "combines patterns from" bullet list still called out ``~/.basic-memory/.bmignore``. - project_service.get_system_status: drop ``# pragma: no cover`` from the ``try`` and ``json.loads(...)`` lines. The new ``test_get_system_status_reads_watch_status_from_config_dir`` test writes a valid watch-status.json and asserts on the parsed payload, so those lines are now exercised. Keeps the pragma on the ``except Exception: pass`` branch, which is still hard to test without injecting a read failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Drew Cain <groksrc@gmail.com>
1 parent 99af4ea commit 9d07d24

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/basic_memory/ignore_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ def load_gitignore_patterns(base_path: Path, use_gitignore: bool = True) -> Set[
180180
"""Load gitignore patterns from .gitignore file and .bmignore.
181181
182182
Combines patterns from:
183-
1. ~/.basic-memory/.bmignore (user's global ignore patterns)
183+
1. <basic-memory data dir>/.bmignore (user's global ignore patterns, honors
184+
BASIC_MEMORY_CONFIG_DIR)
184185
2. {base_path}/.gitignore (project-specific patterns, if use_gitignore=True)
185186
186187
Args:

src/basic_memory/services/project_service.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,10 +1139,8 @@ def get_system_status(self) -> SystemStatus:
11391139
watch_status = None
11401140
watch_status_path = self.config_manager.config.data_dir_path / WATCH_STATUS_JSON
11411141
if watch_status_path.exists():
1142-
try: # pragma: no cover
1143-
watch_status = json.loads( # pragma: no cover
1144-
watch_status_path.read_text(encoding="utf-8")
1145-
)
1142+
try:
1143+
watch_status = json.loads(watch_status_path.read_text(encoding="utf-8"))
11461144
except Exception: # pragma: no cover
11471145
pass
11481146

src/basic_memory/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ def setup_logging(
262262
263263
Args:
264264
log_level: DEBUG, INFO, WARNING, ERROR
265-
log_to_file: Write to ~/.basic-memory/basic-memory.log with rotation
265+
log_to_file: Write to <basic-memory data dir>/basic-memory.log with rotation
266+
(honors BASIC_MEMORY_CONFIG_DIR)
266267
log_to_stdout: Write to stderr (for Docker/cloud deployments)
267268
structured_context: Bind tenant_id, fly_region, etc. for cloud observability
268269
"""

0 commit comments

Comments
 (0)