chore(deps): Address dependabot and pip-audit findings#111
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
Suggested reviewers
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
📦 Python package built successfully!
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #111 +/- ##
==========================================
+ Coverage 74.09% 74.18% +0.09%
==========================================
Files 95 95
Lines 5678 5698 +20
Branches 843 848 +5
==========================================
+ Hits 4207 4227 +20
Misses 1195 1195
Partials 276 276
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
🚀 Review App Deployment Started
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
deepnote_toolkit/chart/utils.py (1)
12-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd explicit return annotations to the changed sanitizer helpers.
sanitize_dataframe_for_chartand_convert_uuid_columns_to_stringare changed here, but they still omit return types;sanitize_dataframe_for_chartalso lacks a docstring.Suggested cleanup
-def sanitize_dataframe_for_chart(pd_df: pd.DataFrame): +def sanitize_dataframe_for_chart(pd_df: pd.DataFrame) -> pd.DataFrame: + """Return a chart-safe copy of a pandas DataFrame.""" sanitized_dataframe = pd_df.copy() @@ -def _convert_uuid_columns_to_string(pd_df: pd.DataFrame): +def _convert_uuid_columns_to_string(pd_df: pd.DataFrame) -> None:As per coding guidelines, "Use type hints consistently", "Use docstrings for all functions/classes", and "Use explicit type hints for function parameters and return values".
Also applies to: 57-70
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@deepnote_toolkit/chart/utils.py` around lines 12 - 20, The sanitizer helpers in chart/utils.py still rely on implicit returns, so update sanitize_dataframe_for_chart and _convert_uuid_columns_to_string to include explicit return type annotations consistent with the existing type-hint style. Also add a docstring for sanitize_dataframe_for_chart, and make sure the related helper functions in the same block follow the same parameter/return typing conventions so the sanitizer API is documented and typed consistently.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@deepnote_toolkit/chart/utils.py`:
- Around line 75-79: The UUID sanitization in the column-processing logic only
checks the first non-null value, so it can miss columns where a later entry is a
uuid.UUID; update the detection in the utility that iterates columns in
deepnote_toolkit/chart/utils.py to scan the full non-null slice (for example, by
checking whether any non-null value is a uuid.UUID) before applying the existing
string conversion map. Add or update a regression test covering a column with a
string first and a UUID later to ensure conversion no longer depends on row
order.
---
Nitpick comments:
In `@deepnote_toolkit/chart/utils.py`:
- Around line 12-20: The sanitizer helpers in chart/utils.py still rely on
implicit returns, so update sanitize_dataframe_for_chart and
_convert_uuid_columns_to_string to include explicit return type annotations
consistent with the existing type-hint style. Also add a docstring for
sanitize_dataframe_for_chart, and make sure the related helper functions in the
same block follow the same parameter/return typing conventions so the sanitizer
API is documented and typed consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0e98fccf-9152-4497-8ee7-796914ed2d81
📒 Files selected for processing (3)
deepnote_toolkit/chart/deepnote_chart.pydeepnote_toolkit/chart/utils.pytests/unit/test_chart.py
Summary by CodeRabbit
polars-eagerto ensure consistent chart compilation.