Require node and layer counts by name across the package - #18
Open
rodvals wants to merge 2 commits into
Open
Conversation
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.
Dependency
Stacked on #17. Merge after its parents, then rebase onto
masterand retarget.Problem
After the previous pull request, half the package requires the dimensions to be named and half does not, and a caller has no way to remember which half. This applies one rule everywhere: a node count and a layer count are always passed by name.
Nothing unsafe changes here. A transposed call into these functions already returned the wrong length: on 4 nodes and 3 layers,
compute_aggregated_multidegree(supra, 3, 4)returns 3 values where 4 are expected. The gain is consistency and the cost is a wider break, which is why it is separate and can be declined on its own. The parameters were also namednandl; since callers now have to write the names out, this is the only moment to fix that without breaking the same signatures twice.Changes
nandlrenamed tonodesandlayersin 43 functions inversatility.py,global_descriptors.py,mesoscale.pyandutils/parsing.py, and both become keyword-onlylayersrenamed tolayer_matrices, so the parameter name is freeget_percolationinpercolation.py, the one function I missed from the first commitVerification
mypy src/: no issues found in 17 source files