Fix: refactor implementation and design smells#1088
Closed
cassandrabeaton wants to merge 1 commit intobiojava:masterfrom
Closed
Fix: refactor implementation and design smells#1088cassandrabeaton wants to merge 1 commit intobiojava:masterfrom
cassandrabeaton wants to merge 1 commit intobiojava:masterfrom
Conversation
… and structure modules
josemduarte
requested changes
Apr 8, 2024
Contributor
josemduarte
left a comment
There was a problem hiding this comment.
Thanks. Please see some comments below
| // Use structural alignment to match the subunit clusters | ||
| if (c1.get(i).mergeStructure(c2.get(j),cParams)) { | ||
| SubunitClusterMerge subunitClusterMerge = new SubunitClusterMerge(c1.get(i)); | ||
| if (subunitClusterMerge.mergeStructure(c2.get(j),cParams)) { |
Contributor
There was a problem hiding this comment.
In my opinion it was more readable before, as you could see the i/j merging in a single line. Would you have a strong reason for this change?
| public PdbPairsMessage(){ | ||
|
|
||
| method = PdbPairXMLConverter.DEFAULT_METHOD_NAME; | ||
| method = FatCatRigid.algorithmName; |
Contributor
There was a problem hiding this comment.
I think it was intended to point to DEFAULT_METHOD_NAME. Then there's a constant that's specific for the default.
| SubunitClusterMerge subunitClusterMerge = new SubunitClusterMerge(clusters.get(c1)); | ||
| if (params.isUseEntityIdForSeqIdentityDetermination() && | ||
| clusters.get(c1).mergeIdenticalByEntityId(clusters.get(c2))) { | ||
| subunitClusterMerge.mergeIdenticalByEntityId(clusters.get(c2))) { |
Contributor
There was a problem hiding this comment.
I would have the same comment here as above. I don't see this improves readability. And same for a few other cases below.
| * i.e. it is between symmetry-related molecules (with same chain identifier) | ||
| * @return | ||
| */ | ||
| public boolean isSymRelated() { |
Contributor
There was a problem hiding this comment.
The Pair class is general and intended for any kind of pair (note the generic type T). This would break that generality.
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.
This is a fix for several code smells discovered in the code.
Tests are passing for all fixes. Test class TestSubunitClusterMerge was created for the new extracted class mentioned in #4.