Skip to content

Conversation

ytausch
Copy link
Member

@ytausch ytausch commented Sep 18, 2025

Closes #143.


If this is released, the feedstock should add a version constraint on pydantic_core.

@github-actions github-actions bot added the enhancement New feature or request label Sep 18, 2025

@classmethod
@abstractmethod
def validate(
Copy link
Member Author

@ytausch ytausch Sep 18, 2025

Choose a reason for hiding this comment

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

I had to move this here as an abstract class method because the generic argument to dy.Dataframe is only bound to BaseSchema, but I need to be able to call validate on it.

Copy link

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (56b2f86) to head (e1c5ca0).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #148   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           50        51    +1     
  Lines         2851      2906   +55     
=========================================
+ Hits          2851      2906   +55     

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

pixi.toml Outdated
pytest-cov = "*"
pytest-md = "*"
scikit-learn = "*"
pydantic = ">=2.11.9,<3"
Copy link
Member Author

@ytausch ytausch Sep 18, 2025

Choose a reason for hiding this comment

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

Just to be sure: Since we also use the Pydantic mypy plugin, does Pydantic have to be added to the docs feature? I think no, but I haven't checked exactly how you generate the docs for dataframely.mypy.

Copy link
Collaborator

@AndreasAlbertQC AndreasAlbertQC left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @ytausch!

I have no pre-existing experience with custom types in pydantic, so my review on that front relies on understanding the tests. Overall, I just have pretty minor comments.

@ytausch ytausch marked this pull request as draft September 19, 2025 12:30
@ytausch ytausch marked this pull request as ready for review September 19, 2025 13:20
Copy link
Collaborator

@AndreasAlbertQC AndreasAlbertQC left a comment

Choose a reason for hiding this comment

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

Thanks for the changes @ytausch, looks almost done to me! @borchero I think you also talked with @ytausch about this, so let me know if you still want to review as well

@ytausch
Copy link
Member Author

ytausch commented Sep 19, 2025

side note: there are some CI checks not marked as required, is that intended?

@AndreasAlbertQC
Copy link
Collaborator

side note: there are some CI checks not marked as required, is that intended?

Nope, fixed, thanks for pointing it out :)

Co-authored-by: Andreas Albert <[email protected]>
Copy link
Collaborator

@AndreasAlbertQC AndreasAlbertQC left a comment

Choose a reason for hiding this comment

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

LGTM now, thanks for bearing with all the fine-tuning :) I just checked in with @borchero and he asked to take a look before we merge, so let's please wait for his review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Dataframes as Fields in Pydantic Models by Implementing __get_pydantic_core_schema__
2 participants