mirror of
https://github.com/microsoft/graphrag.git
synced 2025-07-06 00:20:27 +00:00

* Collapse create_final_communities * Semver * Spellcheck * Clean up filtering * Add space in title * Format * Cleanup imports and format * Spruce up the tests * Update dictionary.txt * Spellcheck --------- Co-authored-by: Alonso Guevara <alonsog@microsoft.com>
36 lines
813 B
Python
36 lines
813 B
Python
# Copyright (c) 2024 Microsoft Corporation.
|
|
# Licensed under the MIT License
|
|
|
|
from graphrag.index.workflows.v1.create_final_communities import (
|
|
build_steps,
|
|
workflow_name,
|
|
)
|
|
|
|
from .util import (
|
|
compare_outputs,
|
|
get_workflow_output,
|
|
load_expected,
|
|
load_input_tables,
|
|
)
|
|
|
|
|
|
async def test_create_final_communities():
|
|
input_tables = load_input_tables([
|
|
"workflow:create_base_entity_graph",
|
|
])
|
|
expected = load_expected(workflow_name)
|
|
|
|
steps = build_steps({})
|
|
|
|
actual = await get_workflow_output(
|
|
input_tables,
|
|
{
|
|
"steps": steps,
|
|
},
|
|
)
|
|
|
|
# we removed the raw_community column, so expect one less in the output
|
|
compare_outputs(
|
|
actual, expected, ["id", "title", "level", "relationship_ids", "text_unit_ids"]
|
|
)
|