Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added weights option to to_line_graph function. #427

Merged
merged 3 commits into from
Aug 2, 2023

Conversation

tlarock
Copy link
Collaborator

@tlarock tlarock commented Jul 25, 2023

Addresses discussion in abandoned PR #425, now integrated with new convert module.

Adds a single weights parameter to to_line_graph with options None (no weights), 'absolute' (size of intersection between hyperedges), and 'normalized' (size of intersection divided by size of smaller). Raises an XGIError if a bad choice is given.

@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 91.66% and project coverage change: -0.02% ⚠️

Comparison is base (4c2bbd6) 90.95% compared to head (89e33b2) 90.94%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #427      +/-   ##
==========================================
- Coverage   90.95%   90.94%   -0.02%     
==========================================
  Files          57       59       +2     
  Lines        4024     4085      +61     
==========================================
+ Hits         3660     3715      +55     
- Misses        364      370       +6     
Files Changed Coverage Δ
xgi/convert/line_graph.py 95.00% <91.66%> (-5.00%) ⬇️

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tlarock
Copy link
Collaborator Author

tlarock commented Jul 25, 2023

Does codecov want me to add some tests? I don't understand the failed check.

@nwlandry
Copy link
Collaborator

Hi @tlarock - yep, it will trigger a warning if the unit test coverage goes down by more than 0.1%. If you're able to add a few tests for the new functionality, that's great, but otherwise we can deal with it later. Thanks for the PR :)

Copy link
Collaborator

@nwlandry nwlandry left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, @tlarock! Looks good! If everything is good from your end, I'll go ahead and merge it. One thing that I would be interested in getting you opinion on is where a breadth-first search would be more efficient down the road, but I think that's not a high priority right now.

@tlarock
Copy link
Collaborator Author

tlarock commented Aug 2, 2023

Good to be merged from my end @nwlandry! Not sure off the top of my head where BFS could be more efficient but happy to discuss.

@nwlandry nwlandry merged commit 0b19dc1 into xgi-org:main Aug 2, 2023
18 checks passed
@maximelucas
Copy link
Collaborator

Thanks Tim!!

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.

3 participants