Skip to content

Conversation

NeejWeej
Copy link
Collaborator

@NeejWeej NeejWeej commented Oct 6, 2025

without subclassing.

This follows the approach highlighted here: https://docs.pydantic.dev/latest/concepts/types/#handling-third-party-types

on the pydantic documentation.

Copy link
Contributor

github-actions bot commented Oct 6, 2025

Test Results

436 tests  +10   432 ✅ +10   23s ⏱️ -1s
  1 suites ± 0     4 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit 95c02a3. ± Comparison against base commit fa733a0.

This pull request removes 6 and adds 16 tests. Note that renamed tests count towards both.
ccflow.tests.exttypes.test_polars.TestPolarsExpression ‑ test_expression
ccflow.tests.exttypes.test_polars.TestPolarsExpression ‑ test_expression_complex
ccflow.tests.exttypes.test_polars.TestPolarsExpression ‑ test_expression_deserialization
ccflow.tests.exttypes.test_polars.TestPolarsExpression ‑ test_json_serialization
ccflow.tests.exttypes.test_polars.TestPolarsExpression ‑ test_validation_eval_failure
ccflow.tests.exttypes.test_polars.TestPolarsExpression ‑ test_validation_failure
ccflow.tests.exttypes.test_polars ‑ test_expression_complex[PolarsExpression]
ccflow.tests.exttypes.test_polars ‑ test_expression_complex[typ1]
ccflow.tests.exttypes.test_polars ‑ test_expression_from_string[PolarsExpression]
ccflow.tests.exttypes.test_polars ‑ test_expression_from_string[typ1]
ccflow.tests.exttypes.test_polars ‑ test_expression_passthrough[PolarsExpression]
ccflow.tests.exttypes.test_polars ‑ test_expression_passthrough[typ1]
ccflow.tests.exttypes.test_polars ‑ test_json_serialization_roundtrip[PolarsExpression]
ccflow.tests.exttypes.test_polars ‑ test_json_serialization_roundtrip[typ1]
ccflow.tests.exttypes.test_polars ‑ test_model_field_and_dataframe_filter
ccflow.tests.exttypes.test_polars ‑ test_polars_expression_validate_errors
…

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 97.22222% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.45%. Comparing base (fa733a0) to head (95c02a3).

Files with missing lines Patch % Lines
ccflow/tests/exttypes/test_polars.py 97.01% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
+ Coverage   95.42%   95.45%   +0.02%     
==========================================
  Files         120      120              
  Lines        6754     6792      +38     
  Branches      427      427              
==========================================
+ Hits         6445     6483      +38     
  Misses        203      203              
  Partials      106      106              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Nijat Khanbabayev <[email protected]>
@NeejWeej NeejWeej requested a review from timkpaine October 6, 2025 18:39
raise ValueError(f"Supplied value '{value}' cannot be converted to a Polars expression")


class PolarsExpression(_PolarsExprPydanticAnnotation, pl.Expr):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to make PolarsExpression the annotated type and just drop PolarsExpr. Having both is confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants