Closed anton-bushuiev closed 1 year ago
@a-r-j BTW Can I be added to the contributors?
Patch coverage: 40.12
% and project coverage change: +3.72
:tada:
Comparison is base (
8123f42
) 40.27% compared to head (908c10e
) 43.99%.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@a-r-j BTW Can I be added to the contributors?
Yes, of course! Do feel free to add yourself :)
Kudos, SonarCloud Quality Gate passed!
Reference Issues/PRs
What does this implement/fix? Explain your changes
I faced an unexpected behaviour constructing k-NN graph and converting it to PyG. After the k-NN construction, the underlying
nx
graph is undirected (notDiGraph
). It means that ifu
andv
are mutually nearest neighbors, I still get only one edge (e.g.(u, v)
). Then, after conversion to PyG this only results in one edge, which is not what is expected since in PyG all edges are directed. So, in this PR I added the symmetrization. Probably, this is also needed for DGL (not familiar with the framework) or other formats.What testing did you do to verify the changes in this PR?
Conversion test passes. I get an undirected graph for my case.
Pull Request Checklist
./CHANGELOG.md
file (if applicable)./graphein/tests/*
directories (if applicable)./notebooks/
(if applicable)python -m py.test tests/
and make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g.,python -m py.test tests/protein/test_graphs.py
)black .
andisort .