Repository navigation
refactor: rename Laplacian() to laplacian(), deprecating the old name - #42
Merged
Merged
Conversation
A capitalized name denotes a class method that builds a graph (Dict, Adjacency). Laplacian is an instance method returning a matrix, like adjacency(), incidence() and degree(). Laplacian() remains as a deprecated alias that warns and returns the same matrix. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #42 +/- ##
==========================================
+ Coverage 94.60% 94.61% +0.01%
==========================================
Files 3 3
Lines 1205 1208 +3
==========================================
+ Hits 1140 1143 +3
Misses 65 65 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Laplacian()is renamedlaplacian(); the old name remains as a deprecated alias that emitsDeprecationWarning(stacklevel=2) and returns the same matrix.By the package's convention a capitalized name denotes a class method that builds a graph (
Dict,Adjacency).Laplacianis an instance method that returns a matrix, likeadjacency(),incidence()anddegree(), so the capital made a reader expect a constructor.Laplacianis in 0.6.5, hence the deprecation rather than a plain rename. The.. deprecated:: 1.0note explains why.Callers
No use in RTB, MVTB or SMTB. The README,
matrices.rstand the tests now calllaplacian().Tests
tests/test_laplacian_name.py: for both graph kinds the lowercase name is silent; the capitalized name warns, the warning points at the caller, and the result is identical.🤖 Generated with Claude Code