mirror of
https://github.com/microsoft/graphrag.git
synced 2025-07-29 11:53:48 +00:00

* Collapse pre/post embedding workflows * Semver * Fix smoke tests --------- Co-authored-by: Alonso Guevara <alonsog@microsoft.com>
40 lines
888 B
Python
40 lines
888 B
Python
# Copyright (c) 2024 Microsoft Corporation.
|
|
# Licensed under the MIT License
|
|
|
|
from graphrag.index.workflows.v1.create_final_relationships import (
|
|
build_steps,
|
|
workflow_name,
|
|
)
|
|
|
|
from .util import (
|
|
compare_outputs,
|
|
get_config_for_workflow,
|
|
get_workflow_output,
|
|
load_expected,
|
|
load_input_tables,
|
|
remove_disabled_steps,
|
|
)
|
|
|
|
|
|
async def test_create_final_relationships():
|
|
input_tables = load_input_tables([
|
|
"workflow:create_base_entity_graph",
|
|
"workflow:create_final_nodes",
|
|
])
|
|
expected = load_expected(workflow_name)
|
|
|
|
config = get_config_for_workflow(workflow_name)
|
|
|
|
config["skip_description_embedding"] = True
|
|
|
|
steps = remove_disabled_steps(build_steps(config))
|
|
|
|
actual = await get_workflow_output(
|
|
input_tables,
|
|
{
|
|
"steps": steps,
|
|
},
|
|
)
|
|
|
|
compare_outputs(actual, expected)
|