Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [Unreleased]

- **Test Environment & Import Fallback Hygiene (Pfad A, 2026-11-01)**:
- **Pytest Conftest Setup**: Added ests/conftest.py ensuring repo root is inserted into sys.path and providing fallback KnowledgeDigest module alias during direct test runs without prior pip install -e ..
- **Graceful Import Fallback in est_transit.py**: Added ry...except ImportError fallback for KnowledgeDigest.schema and KnowledgeDigest.transit imports, ensuring standalone execution parity with est_core.py and est_bach_import.py.
- **Test Suite Verification**: Verified all 219 tests pass (1 skipped for optional sqlite-transit-sync),
uff check reports 0 errors, compileall clean, and all contract tests green. Version 0.4.0 strictly unchanged (T-20260920-167562623).


- **Documentation and package boundary corrections (2026-10-12)**: Clarified that core indexing/search use the local database while optional provider and synchronization paths may transfer configured data; corrected CLI/configuration documentation; bounded dependency/license and security statements; added a wheel/sdist smoke gate for the packaged GUI icon. Version remains 0.4.0.

- **Bugfix-Sweep (2026-10-06)**:
Expand Down
17 changes: 17 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
"""Pytest fixtures and configuration for KnowledgeDigest test suite."""

import sys
import types
from pathlib import Path

REPO_ROOT = Path(__file__).resolve().parent.parent

if str(REPO_ROOT) not in sys.path:
sys.path.insert(0, str(REPO_ROOT))

# Provide package fallback when running tests directly without editable install
if "KnowledgeDigest" not in sys.modules:
pkg = types.ModuleType("KnowledgeDigest")
pkg.__path__ = [str(REPO_ROOT)]
sys.modules["KnowledgeDigest"] = pkg
32 changes: 22 additions & 10 deletions tests/test_transit.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,28 @@
except ImportError: # optional dependency, see transit.py
SyncError = None

from KnowledgeDigest.schema import ensure_schema
from KnowledgeDigest.transit import (
TRANSIT_SYNC_AVAILABLE,
generate_chunk_key,
ChunkTaskManager,
KnowledgeDigestMergePolicy,
create_knowledge_sync,
utc_now,
iso_timestamp,
)
try:
from KnowledgeDigest.schema import ensure_schema
from KnowledgeDigest.transit import (
TRANSIT_SYNC_AVAILABLE,
generate_chunk_key,
ChunkTaskManager,
KnowledgeDigestMergePolicy,
create_knowledge_sync,
utc_now,
iso_timestamp,
)
except ImportError:
from schema import ensure_schema
from transit import (
TRANSIT_SYNC_AVAILABLE,
generate_chunk_key,
ChunkTaskManager,
KnowledgeDigestMergePolicy,
create_knowledge_sync,
utc_now,
iso_timestamp,
)

requires_transit_sync = pytest.mark.skipif(
not TRANSIT_SYNC_AVAILABLE, reason="optional package sqlite-transit-sync not installed"
Expand Down
Loading