-
Notifications
You must be signed in to change notification settings - Fork 7
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
Utiliser les FAR plutôt que les DEP pour déterminer les engins de la marée #3088
Utiliser les FAR plutôt que les DEP pour déterminer les engins de la marée #3088
Conversation
Quality Gate passedIssues Measures |
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: 1
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (2)
- datascience/src/pipeline/queries/monitorfish/current_catches.sql (6 hunks)
- datascience/tests/test_pipeline/test_flows/test_current_segments.py (1 hunks)
Additional comments not posted (2)
datascience/src/pipeline/queries/monitorfish/current_catches.sql (1)
81-92
: Ensure theDISTINCT
keyword in the aggregation ofgear_onboard
is necessary and correctly applied. Ifgear
,mesh
, anddimensions
combinations are unique percfr
, theDISTINCT
keyword is redundant and can be removed for performance optimization.- jsonb_agg(DISTINCT + jsonb_agg(datascience/tests/test_pipeline/test_flows/test_current_segments.py (1)
41-42
: Ensure the addition of the"dimensions"
key with a value ofNone
aligns with the expected data schema and handling in the application logic. Ifdimensions
is expected to be a numeric value or a specific format, consider adjusting the test setup accordingly.
((jsonb_array_elements(r.value -> 'hauls'))->>'mesh')::DOUBLE PRECISION as mesh, | ||
(jsonb_array_elements(r.value -> 'hauls'))->>'dimensions' as dimensions, |
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.
Consider adding NULL checks for mesh
and dimensions
fields to handle potential missing data gracefully.
- ((jsonb_array_elements(r.value -> 'hauls'))->>'mesh')::DOUBLE PRECISION as mesh,
- (jsonb_array_elements(r.value -> 'hauls'))->>'dimensions' as dimensions,
+ COALESCE(((jsonb_array_elements(r.value -> 'hauls'))->>'mesh')::DOUBLE PRECISION, 0) as mesh,
+ COALESCE((jsonb_array_elements(r.value -> 'hauls'))->>'dimensions', 'N/A') as dimensions,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
((jsonb_array_elements(r.value -> 'hauls'))->>'mesh')::DOUBLE PRECISION as mesh, | |
(jsonb_array_elements(r.value -> 'hauls'))->>'dimensions' as dimensions, | |
COALESCE(((jsonb_array_elements(r.value -> 'hauls'))->>'mesh')::DOUBLE PRECISION, 0) as mesh, | |
COALESCE((jsonb_array_elements(r.value -> 'hauls'))->>'dimensions', 'N/A') as dimensions, |
WalkthroughThis update primarily focuses on refining the data handling for fishing activities, particularly by adjusting how fishing gear data is captured and represented. Changes include the removal of Changes
Assessment against linked issues
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Linked issues
Summary by CodeRabbit
mesh
anddimensions
, providing more detailed information on catches.