Repository navigation
refactor!: drop unused public API and split PhaseVectorMatching.swift - #34
Merged
Merged
Conversation
Removes Misorientation.mapIntoSymmetryReducedZone() (an alias of reduce()) and PhaseVectorResult.inPlaneDegrees, neither used by mac4DSTEM or macTEM. LinearScale.compactShellLabel(_:) becomes package (tests only); OrientationMapAnalysis.patternInPlaneAnglePlane(_:) is deprecated. ReflectionList.families() now passes Policy.effectiveFamilyTolerance, the property that had no use (same value: families(of:) sanitises again). PhaseVectorMatching.swift (1879 lines) is split, move only: value types to PhaseVectorTypes.swift, the zone-axis and matrix-orientation fits to PhaseVectorMatcher+ZoneAxisFit.swift, one-pattern classification, the known-variants rule and the orientation relationship to PhaseVectorMatcher+Classify.swift. The matching tests split the same way (PhaseVectorMatchingTests+Classify.swift, an extension of the same suite). Every moved line is unchanged; no number moves. Done: issue #19's removals, deprecations and the split; no source file over 1500 lines. Next: release-please ships it as 0.11.0 with the Migration lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
Second review (public API)Verdict: cleared. The remaining notes are nits, and none blocks the merge. Reviewed at head 1. Removed, narrowed and deprecated symbols: no consumer uses themI searched
2. The split is move-only
3. Migration, title and parity
Nits (no change needed for this PR)
🤖 Generated with Claude Code |
…lds without a warning NOTICE now points the Thronsen-attributed .knownVariants rule at PhaseVectorMatcher+Classify.swift. The mirror-plane test calls the deprecated patternInPlaneAnglePlane through a protocol witness, so it keeps checking the same values without a test-build warning. Done: the two review nits on #34. Next: Paul merges #34. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Requested by Paul
From the 27 Oct audit (#19):
Misorientation.mapIntoSymmetryReducedZone()andPhaseVectorResult.inPlaneDegrees. Neither mac4DSTEM nor macTEM uses them (checked their sources).package:LinearScale.compactShellLabel(_:)(tests only).OrientationMapAnalysis.patternInPlaneAnglePlane(_:)(one test, no consumer).IndexingDisplay.refusalText/isAcceptedand the 0.10.0 additions.ReflectionList.families()passesPolicy.effectiveFamilyTolerance, which had no use before. The value is unchanged becausefamilies(of:)sanitises it again.PhaseVectorMatching.swift(1879 lines) now keeps the method header, vector conversion, nearest and score, the whole-scan map and disk claims (442 lines). The value types are inPhaseVectorTypes.swift, the zone-axis and matrix-orientation fits inPhaseVectorMatcher+ZoneAxisFit.swift, and classification, the known-variants rule and the orientation relationship inPhaseVectorMatcher+Classify.swift. The tests are split the same way:PhaseVectorMatchingTests+Classify.swiftextends the same suite and keeps all 43 tests. A sorted line diff shows every moved line is unchanged. No source file is over 1500 lines.No numbers change. The fast unit target, the consumer check, SwiftLint and SwiftFormat all pass locally.
Migration
Misorientation.mapIntoSymmetryReducedZone(): usereduce().PhaseVectorResult.inPlaneDegrees: convertinPlaneRotationRad(inPlaneRotationRad * 180 / .pi).LinearScale.compactShellLabel(_:)is no longer public. Copy the four lines if you need them.OrientationMapAnalysis.patternInPlaneAnglePlane(_:)is deprecated and will be removed in a later minor. Compute it frominPlaneAnglePlaneandmirroredPlane: subtract 0.5 where mirrored, then wrap to [0, 1).Fixes #19
🤖 Generated with Claude Code