Skip to content

Conversation

dn070017
Copy link
Contributor

@dn070017 dn070017 commented Mar 22, 2024

Add new property expected_output_dataframe_type for gokart.TaskOnKart which allows the users to provide the Pandera schema. If expected_output_dataframe_type is provided, when loading (load) and storing (dump) the cached dataframe, it will automatically check if the dataframe meet the schema defined in expected_output_dataframe_type. See test/test_task_on_kart.py for example usage.

[must] fix error from mypy

@hirosassa
Copy link
Collaborator

@dn070017 Please check mypy failure.

gokart/target.py Outdated
with self._target.open('r') as f:
return self._processor.load(f)
obj = self._processor.load(f)
self._validator(obj)
Copy link
Member

Choose a reason for hiding this comment

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

@ujiuji1259 You can use retrun value of validator and let this process fail if return value is False

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