Skip to content

Add unit tests for NetworkXStorage#24

Merged
gusye1234 merged 2 commits intogusye1234:mainfrom
NumberChiffre:numberchiffre/add-networkx-storage-unittests
Sep 5, 2024
Merged

Add unit tests for NetworkXStorage#24
gusye1234 merged 2 commits intogusye1234:mainfrom
NumberChiffre:numberchiffre/add-networkx-storage-unittests

Conversation

@NumberChiffre
Copy link
Collaborator

@NumberChiffre NumberChiffre commented Sep 5, 2024

Description

This PR is to add unit tests strictly for NetworkXStorage data class, as well as some minor adjustments.

Some details to keep in mind:

  • Self-loop and parallel edges are enabled.
  • Community schema has default hyperparameters not configurable by users.
  • Only a single level for the community schema right after Leiden clustering because the Leiden algorithm is creating a single-level clustering (overwriting any previous multi-level clustering data that might have existed).

Updates

  • Add handling of non-existent node for node and edge degree.
  • Add unit tests.

@NumberChiffre NumberChiffre marked this pull request as ready for review September 5, 2024 05:15
@gusye1234 gusye1234 merged commit e5ec32b into gusye1234:main Sep 5, 2024
AhmaddAbbass pushed a commit to AhmaddAbbass/nano-graphrag that referenced this pull request Nov 14, 2025
* Added unittests and handling edge and node degree with non-existing node

* Added more test cases for community schema and stable largest connected component

---------

Co-authored-by: terence-gpt <numberchiffre@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants