mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-30 01:52:29 +00:00
up
This commit is contained in:
parent
18c0c84367
commit
ca40f26455
7 changed files with 17 additions and 17 deletions
|
|
@ -88,7 +88,7 @@ async def _make_scan_step(
|
|||
dump_store_index: bool = True,
|
||||
dispatch_job: str = "update_store_index",
|
||||
) -> tuple[_RecordingScanChangesStep, RuntimeContext, LocalFileStore, ChunkedFileParser]:
|
||||
fs = LocalFileStore(store_name="test_store", embedding_model="")
|
||||
fs = LocalFileStore(name="test_store", embedding_model="")
|
||||
parser = ChunkedFileParser()
|
||||
await fs.start()
|
||||
await parser.start()
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ def _node(path: str, links: list[tuple[str, str | None, str | None]] | None = No
|
|||
|
||||
async def _make_store(nodes: list[FileNode]) -> LocalFileStore:
|
||||
"""LocalFileStore seeded with the given graph nodes (no files on disk)."""
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
if nodes:
|
||||
await store.file_graph.upsert_nodes(nodes)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class temp_chdir:
|
|||
|
||||
async def _make_store(files: dict[str, str] | None = None) -> LocalFileStore:
|
||||
"""LocalFileStore seeded with files on disk + registered in the graph."""
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
nodes: list[FileNode] = []
|
||||
for rel, content in (files or {}).items():
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ async def _make_store_with_dailies(entries: list[tuple[str, str, str]]) -> Local
|
|||
``daily/<date>/<slug>.md`` with a minimal ``name``-only
|
||||
frontmatter — no opinionated status / lifecycle axes.
|
||||
"""
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
for day, slug, body in entries:
|
||||
day_dir = Path.cwd() / "daily" / day
|
||||
|
|
@ -158,7 +158,7 @@ def test_daily_list_returns_path_slug_name_description():
|
|||
|
||||
async def run():
|
||||
with tempfile.TemporaryDirectory() as tmp, temp_chdir(tmp):
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
await _seed_note(
|
||||
"2026-05-18",
|
||||
|
|
@ -216,7 +216,7 @@ def test_daily_list_empty_when_no_daily_dir():
|
|||
|
||||
async def run():
|
||||
with tempfile.TemporaryDirectory() as tmp, temp_chdir(tmp):
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
step = daily_list_step.DailyListStep(file_store=store)
|
||||
await step(date="2026-05-18")
|
||||
|
|
@ -280,7 +280,7 @@ def test_daily_read_returns_body_and_frontmatter_dict():
|
|||
|
||||
async def run():
|
||||
with tempfile.TemporaryDirectory() as tmp, temp_chdir(tmp):
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
day_dir = Path(tmp) / "daily" / "2026-05-18"
|
||||
day_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
|
@ -373,7 +373,7 @@ def test_daily_read_empty_frontmatter_dict():
|
|||
|
||||
async def run():
|
||||
with tempfile.TemporaryDirectory() as tmp, temp_chdir(tmp):
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
day_dir = Path(tmp) / "daily" / "2026-05-18"
|
||||
day_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
|
@ -678,7 +678,7 @@ def test_day_index_lists_each_note():
|
|||
|
||||
async def run():
|
||||
with tempfile.TemporaryDirectory() as tmp, temp_chdir(tmp):
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
await _seed_note("2026-05-18", "alpha", name="Alpha Project")
|
||||
await _seed_note("2026-05-18", "beta", name="Beta Project")
|
||||
|
|
@ -702,7 +702,7 @@ def test_day_index_includes_note_descriptions():
|
|||
|
||||
async def run():
|
||||
with tempfile.TemporaryDirectory() as tmp, temp_chdir(tmp):
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
cases = [
|
||||
("alpha", "Alpha Project", "实现 JWT auth 中间件,迁移 session middleware"),
|
||||
|
|
@ -751,7 +751,7 @@ def test_day_index_preserves_manual_segment():
|
|||
|
||||
async def run():
|
||||
with tempfile.TemporaryDirectory() as tmp, temp_chdir(tmp):
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
await _seed_note("2026-05-18", "alpha")
|
||||
reindex = daily_reindex_step.DailyReindexStep(file_store=store)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class temp_chdir:
|
|||
|
||||
async def make_store(store_name: str = "test_store", **kwargs) -> LocalFileStore:
|
||||
"""Build a started LocalFileStore with embedding disabled (no OpenAI dep)."""
|
||||
store = LocalFileStore(store_name=store_name, embedding_model="", **kwargs)
|
||||
store = LocalFileStore(name=store_name, embedding_model="", **kwargs)
|
||||
await store.start()
|
||||
return store
|
||||
|
||||
|
|
@ -352,7 +352,7 @@ def _skip_if_no_faiss(name: str) -> bool:
|
|||
|
||||
async def make_faiss_store(store_name: str = "test_faiss", **kwargs) -> FaissLocalFileStore:
|
||||
"""Build a started FaissLocalFileStore wired to FakeEmbeddingModel (no API calls)."""
|
||||
store = FaissLocalFileStore(store_name=store_name, embedding_model="fake", **kwargs)
|
||||
store = FaissLocalFileStore(name=store_name, embedding_model="fake", **kwargs)
|
||||
fake = FakeEmbeddingModel()
|
||||
# Replace the unresolved Dependency placeholder with a concrete instance and
|
||||
# let start() cascade lifecycle to it via _owned.
|
||||
|
|
@ -531,7 +531,7 @@ def test_faiss_disabled_without_embedding():
|
|||
|
||||
async def run():
|
||||
with tempfile.TemporaryDirectory() as tmpdir, temp_chdir(tmpdir):
|
||||
store = FaissLocalFileStore(store_name="disabled", embedding_model="")
|
||||
store = FaissLocalFileStore(name="disabled", embedding_model="")
|
||||
await store.start()
|
||||
await store.upsert([make_file("a.md", "alpha")])
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class temp_chdir:
|
|||
|
||||
async def _make_store() -> LocalFileStore:
|
||||
"""Minimal LocalFileStore (embedding disabled). vault_path resolves to CWD."""
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
return store
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ async def _store_with(files: dict[str, str]) -> LocalFileStore:
|
|||
Without the parsed links the reverse-index lookup yields nothing and
|
||||
retarget becomes a no-op.
|
||||
"""
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
nodes: list[FileNode] = []
|
||||
root = Path.cwd()
|
||||
|
|
@ -72,7 +72,7 @@ async def _store_with(files: dict[str, str]) -> LocalFileStore:
|
|||
|
||||
|
||||
async def _empty_store() -> LocalFileStore:
|
||||
store = LocalFileStore(store_name="t", embedding_model="")
|
||||
store = LocalFileStore(name="t", embedding_model="")
|
||||
await store.start()
|
||||
return store
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue