Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,11 @@ def create_config(config:Optional[str]=None):

config_args.setdefault('max_pool_connections', DEFAULT_MAX_POOL_CONNECTIONS)

return Config(
retries={
'total_max_attempts': 1,
'mode': 'standard'
},
read_timeout=600,
user_agent_appid=f'graphrag-lexical-graph-{toolkit_version}',
**config_args
)
config_args.setdefault('read_timeout', 600)
config_args.setdefault('retries', {'total_max_attempts': 1, 'mode': 'standard'})
config_args.setdefault('user_agent_appid', f'graphrag-lexical-graph-{toolkit_version}')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix looks correct and follows same pattern already used for max_pool_connections above. Could you add regression tests for the three fields that were breaking? The existing TestCreateConfig class in test_neptune_graph_stores.py already has this pattern for max_pool_connections so should be straightforward. Without regression tests there is nothing preventing someone from refactoring this back to kwargs and reintroducing the TypeError.

return Config(**config_args)

def create_property_assigment_fn_for_neptune(key:str, value:Any) -> Callable[[str], str]:
"""
Expand Down