Skip to content

Conversation

ELC
Copy link

@ELC ELC commented May 24, 2025

  • Remove deprecated ColumnSchema and replace with ComponentSchema.
  • Update DataFrameSchema to inherit from the new base class.
  • Adjust type hints to use new DataFrame types for better clarity.
  • Clean up imports and registration of backend components.

ELC added 2 commits May 24, 2025 18:33
- Remove deprecated ColumnSchema and replace with ComponentSchema.
- Update DataFrameSchema to inherit from the new base class.
- Adjust type hints to use new DataFrame types for better clarity.
- Clean up imports and registration of backend components.

Signed-off-by: Ezequiel Leonardo Castaño <[email protected]>
- Introduce Self type for better type hinting in models.
- Refactor DataFrameModel and related classes to use Self.
- Update validation methods to enhance type safety.
- Simplify error handling in backend implementations.
- Remove unused parameters and improve code readability.

Signed-off-by: Ezequiel Leonardo Castaño <[email protected]>
@ELC
Copy link
Author

ELC commented May 24, 2025

This PR aims to bring the pyspark implementation to the new class structure used in Pandas and Polars

@cosmicBboy this is still WIP but I would need the approval to run the CICD tests and fix any failing tests

- Introduce dtype property in Column class for better type management.
- Set default lazy parameter to False in DataFrameSchema methods.
- Remove error_handler parameter from several methods to simplify
  error handling.
- Update tests to reflect changes in schema validation logic.
- Disable ANSI SQL mode in Spark sessions for compatibility.

Signed-off-by: Ezequiel Leonardo Castaño <[email protected]>
Copy link

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 21.95122% with 96 lines in your changes missing coverage. Please review.

Project coverage is 83.29%. Comparing base (812b2a8) to head (8f0d634).
Report is 325 commits behind head on main.

Files with missing lines Patch % Lines
pandera/api/pyspark/components.py 0.00% 22 Missing ⚠️
pandera/backends/pyspark/register.py 0.00% 19 Missing ⚠️
pandera/api/pyspark/model.py 0.00% 17 Missing ⚠️
pandera/api/pyspark/types.py 0.00% 10 Missing ⚠️
pandera/api/pyspark/container.py 0.00% 6 Missing ⚠️
pandera/backends/pyspark/container.py 0.00% 6 Missing ⚠️
pandera/backends/pyspark/column.py 0.00% 5 Missing ⚠️
pandera/backends/pyspark/components.py 0.00% 3 Missing ⚠️
pandera/api/base/schema.py 66.66% 2 Missing ⚠️
pandera/api/pyspark/model_components.py 0.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2007       +/-   ##
===========================================
- Coverage   94.28%   83.29%   -10.99%     
===========================================
  Files          91      134       +43     
  Lines        7013    10226     +3213     
===========================================
+ Hits         6612     8518     +1906     
- Misses        401     1708     +1307     

☔ 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.

@cosmicBboy
Copy link
Collaborator

@ELC looking into reviving this PR now. There are a bunch of conflicts I need to resolve

@ELC
Copy link
Author

ELC commented Jul 4, 2025

Hey @cosmicBboy , I'm a heavy pyspark user and I'd love to help here. I believe the PR already has most of the needed changes but I will need help with fixing the tests as when I tried to run them on Codespace it died before finishing.

Would you be able to help me there?

@cosmicBboy
Copy link
Collaborator

hi @ELC apologies for the delay... going to look into this now

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.

2 participants