-
Notifications
You must be signed in to change notification settings - Fork 2
chore: Add regression tests for DataFrame rendering and analysis #25
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
base: main
Are you sure you want to change the base?
chore: Add regression tests for DataFrame rendering and analysis #25
Conversation
📝 WalkthroughWalkthroughTwo test suites are added to strengthen type-handling validation. Integration tests in Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
|
📦 Python package built successfully!
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
=======================================
Coverage 75.39% 75.39%
=======================================
Files 99 99
Lines 5625 5625
Branches 784 784
=======================================
Hits 4241 4241
Misses 1384 1384 ☔ View full report in Codecov by Sentry. |
|
🚀 Review App Deployment Started
|
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 details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
tests/unit/test_ocelots_pandas_utils.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/unit/test_ocelots_pandas_utils.py (1)
deepnote_toolkit/ocelots/pandas/utils.py (1)
safe_convert_to_string(10-35)
🪛 Ruff (0.14.3)
tests/unit/test_ocelots_pandas_utils.py
49-49: Boolean positional value in function call
(FBT003)
57-57: Missing return type annotation for special method __str__
Add return type annotation: str
(ANN204)
58-58: Avoid specifying long messages outside the exception class
(TRY003)
60-60: Missing return type annotation for special method __repr__
Add return type annotation: str
(ANN204)
61-61: Avoid specifying long messages outside the exception class
(TRY003)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Test - Python 3.10
- GitHub Check: Test - Python 3.11
- GitHub Check: Test - Python 3.9
- GitHub Check: Build and push artifacts for Python 3.9
- GitHub Check: Build and push artifacts for Python 3.11
- GitHub Check: Build and push artifacts for Python 3.13
- GitHub Check: Build and push artifacts for Python 3.12
- GitHub Check: Build and push artifacts for Python 3.10
🔇 Additional comments (10)
tests/unit/test_ocelots_pandas_utils.py (10)
1-6: LGTM - Clean imports.Necessary imports for testing JSON conversion and Trino types.
8-14: LGTM - Solid dict test.Validates JSON output and round-trip parsing.
17-23: LGTM - Correct tuple→JSON→list handling.Properly expects list after JSON round-trip (JSON lacks tuple type).
26-32: LGTM - Basic list coverage.
35-40: LGTM - Nested structure coverage.Critical for complex Trino STRUCT/ARRAY types.
43-51: LGTM - Primitive type coverage.Static analysis warning on line 49 is a false positive for test code.
54-64: LGTM - Error handling validated.Static analysis warnings are false positives for test helper class.
68-84: LGTM - NamedRowTuple coverage.Field access checks (lines 83-84) provide extra validation of Trino type behavior.
87-100: LGTM - Quote validation is excellent.Lines 99-100 explicitly verify double-quote JSON vs single-quote str() output.
103-113: LGTM - Nested array coverage.
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: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
tests/integration/test_trino.py(1 hunks)tests/unit/test_dataframe_rendering.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
tests/unit/test_dataframe_rendering.py (1)
deepnote_toolkit/ocelots/pyspark/implementation.py (1)
to_records(223-282)
tests/integration/test_trino.py (2)
deepnote_toolkit/sql/sql_execution.py (1)
execute_sql(197-233)deepnote_toolkit/ocelots/pyspark/implementation.py (2)
columns(30-37)to_records(223-282)
🪛 Ruff (0.14.3)
tests/unit/test_dataframe_rendering.py
20-20: Missing return type annotation for private function _test_rendering_flow
Add return type annotation: None
(ANN202)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Test - Python 3.9
- GitHub Check: Test - Python 3.11
- GitHub Check: Test - Python 3.10
- GitHub Check: Build and push artifacts for Python 3.9
- GitHub Check: Build and push artifacts for Python 3.13
- GitHub Check: Build and push artifacts for Python 3.11
- GitHub Check: Build and push artifacts for Python 3.10
- GitHub Check: Build and push artifacts for Python 3.12
Summary by CodeRabbit