-
Notifications
You must be signed in to change notification settings - Fork 584
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 Looker Classifications handing #5322
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request modifies the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (3)
app/packages/looker/src/lookers/abstract.ts (3)
27-29
: Add a short docstring for new overlay imports
While these imports look good, consider adding a short docstring or code comment clarifying the purpose of each overlay to improve clarity in the codebase.
556-557
: Leverage the existing buffer checks
There is a blank line before pushingbuffer
toarrayBuffers
. This is more of a style preference than a functional concern, but be mindful of extra lines that could reduce visual clarity.
752-752
: Ensure robust cleanup error handling
The optional chaining onoverlay.cleanup?.()
is a good safeguard. However, if a cleanup error arises, ensure it is handled or logged to prevent silent failures and aid debugging.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/packages/looker/src/lookers/abstract.ts
(4 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/packages/looker/src/lookers/abstract.ts (1)
Pattern **/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
🔇 Additional comments (1)
app/packages/looker/src/lookers/abstract.ts (1)
534-540
: Check for missing or undefined overlay.label
Before accessing overlay.label.mask
or overlay.label.map
, ensure overlay.label
is defined. Otherwise, if overlay.label
is unexpectedly null, a runtime error may occur.
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/packages/state/src/utils.ts (1)
68-79
: Check behavior for string inputs inviewsAreEqual
.When
viewOne
andviewTwo
are both strings with identical content, the initial strict equality check (===
) correctly treats them as equal. However, other string nuances (e.g., leading/trailing spaces) might lead to unexpected comparisons. If partial matches or case-insensitive comparisons are desired, consider customizing the comparison logic.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
app/packages/looker/tsconfig.json
is excluded by!**/*.json
📒 Files selected for processing (1)
app/packages/state/src/utils.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/packages/state/src/utils.ts (1)
Pattern **/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
🔇 Additional comments (1)
app/packages/state/src/utils.ts (1)
60-60
: Type annotation improvement is good to see.
By explicitly typing the parameter as State.Stage[]
, this prevents inadvertent misuse of the filterView
function. It also ensures better clarity for future readers and contributors.
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/packages/state/src/utils.test.ts (1)
12-20
: Expand test coverage for array-based viewsCurrently, there is only a test for empty arrays. Consider adding more scenarios, such as different array lengths, partially similar arrays, or objects within arrays, to ensure
viewsAreEqual
is thoroughly validated.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/packages/state/src/utils.test.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/packages/state/src/utils.test.ts (1)
Pattern **/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
🔇 Additional comments (1)
app/packages/state/src/utils.test.ts (1)
2-2
: Ensure comprehensive testing of all newly imported functions
While adding viewsAreEqual
to the import statement is correct, confirm that all required functionality is covered by unit tests. This prevents future regressions if the function is referenced in other test suites.
} | ||
|
||
arrayBuffers.push(buffer); |
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.
Should we add a guard for undefined buffer?
arrayBuffers.push(buffer); | |
if (buffer) { | |
arrayBuffers.push(buffer); | |
} |
What changes are proposed in this pull request?
The
ClassificationsOverlay
does not have alabel
attribute. Resolves #5317How is this patch tested? If it is not, please explain why.
Todo
Release Notes
What areas of FiftyOne does this PR affect?
fiftyone
Python library changesSummary by CodeRabbit
New Features
Bug Fixes
Chores
viewsAreEqual
function to ensure correct behavior.