-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix expected node type from server by renaming resolution to mag #8187
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ export const tracing: ServerSkeletonTracing = { | |
}, | ||
radius: 120, | ||
viewport: 1, | ||
resolution: 1, | ||
mag: 1, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Incomplete renaming of Please update the following test fixtures to replace
🔗 Analysis chainLGTM! Property name change aligns with server response format. The change from Let's verify if similar changes were made in all test fixtures: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for any remaining instances of 'resolution' in test fixtures
# and confirm consistent use of 'mag' property in node definitions
# Search for any remaining 'resolution' properties in test fixtures
echo "Checking for remaining 'resolution' properties in test fixtures:"
rg -l "resolution.*:" "frontend/javascripts/test/fixtures/"
# Search for node definitions to verify 'mag' property usage
echo "Verifying 'mag' property usage in node definitions:"
rg -A 5 "nodes.*:.*\[" "frontend/javascripts/test/fixtures/"
Length of output: 2032 |
||
bitDepth: 0, | ||
interpolation: false, | ||
createdTimestamp: 1528811979356, | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -756,7 +756,7 @@ export type ServerNode = { | |||||||||||||||||||||||||
rotation: Point3; | ||||||||||||||||||||||||||
bitDepth: number; | ||||||||||||||||||||||||||
viewport: number; | ||||||||||||||||||||||||||
resolution: number; | ||||||||||||||||||||||||||
mag: number; | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is the root of the problem. The backend sends nodes with the field called mag and not resolution. See: webknossos/webknossos-datastore/proto/SkeletonTracing.proto Lines 8 to 19 in 8dec578
By changing the type, TS should show all locations to change and the resulting code should be fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, that makes sense! |
||||||||||||||||||||||||||
radius: number; | ||||||||||||||||||||||||||
createdTimestamp: number; | ||||||||||||||||||||||||||
interpolation: boolean; | ||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Residual
resolution
fields found in type definitions.Several type definitions still contain
resolution
fields. Please update these to maintain consistency.readonly resolutions: Array<Vector3>;
resolution: 10,
resolutionsCount: number;
const resolutionRestrictions: APIMagRestrictions = {};
const getMaxDim = (resolution: Vector3) => Math.max(...resolution);
resolution: 0,
handleQualityChangeForPrecomputation = (resolutionIndex: number) =>
handleQualityChangeForAdHocGeneration = (resolutionIndex: number) =>
resolutions ? resolutions.map(Utils.point3ToVector3) : ([[1, 1, 1]] as Vector3[]),
resolutions: Array<Vector3>,
resolutions: [
resolution: Vector3;
const resolutionUnionDict: { [key: number]: Vector3[] } = {};
resolutionIdentifier: number,
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ resolutions: [number, number, number][]; c...
const resolution = magIndex < mags.length ? mags[magIndex] : upsampleMag(mags, magIndex);
resolution: {
resolution: number | Vector3;
resolution: Vector3 | null | undefined;
🔗 Analysis chain
LGTM! Property rename aligns with server behavior.
The change from
resolution
tomag
correctly reflects the server's behavior as mentioned in the PR objectives. The modification is consistent across all nodes and maintains the existing values.Let's verify the type definitions to ensure consistency:
Also applies to: 73-73, 93-93
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 11629