Skip to content
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

fix empty data type not supported for serialization #435

Merged
merged 2 commits into from
Mar 13, 2021

Conversation

jeffzi
Copy link
Collaborator

@jeffzi jeffzi commented Mar 13, 2021

Fixes #432

This PR fixes a bug where serializing (script or yaml) a column with empty data type fails.

@codecov
Copy link

codecov bot commented Mar 13, 2021

Codecov Report

Merging #435 (017f136) into dev (a2dca76) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #435      +/-   ##
==========================================
+ Coverage   99.32%   99.37%   +0.04%     
==========================================
  Files          21       21              
  Lines        2537     2545       +8     
==========================================
+ Hits         2520     2529       +9     
+ Misses         17       16       -1     
Impacted Files Coverage Δ
pandera/io.py 98.61% <100.00%> (+0.78%) ⬆️
pandera/model.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2dca76...017f136. Read the comment docs.

Copy link
Collaborator

@cosmicBboy cosmicBboy left a comment

Choose a reason for hiding this comment

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

✨🚀✨

pandera/io.py Outdated Show resolved Hide resolved
@jeffzi jeffzi merged commit c85ce63 into unionai-oss:dev Mar 13, 2021
cosmicBboy added a commit that referenced this pull request Mar 27, 2021
* fix DataFrameSchema comparison with non-DataFrameSchema (#431)

* increase cache version

* fix DataFrameSchema comparison with non-DataFrameSchema

* fix pylint error

Co-authored-by: cosmicBboy <[email protected]>

* add doc about attributes excluded by SchemaModel (#436)

* fix empty SchemaModel (#434)

* fix empty data type not supported for serialization (#435)

* Fix to_yaml serialization dropping global checks (#428)

* increase cache version

* ci: add dataframe checks tests

* bugfix: allow serialization of dataframe checks to_yaml

* ci: add test to ensure serialization of lambda check fails

* bugfix: ensure checks with no parameters generate appropriate schema

* wip: allow looking up registered checks

* fix: compare checks by name rather than by object equality

* ci: black

* ci: lint

* enh: use REGISTERED_CUSTOM_CHECKS for attribute lookup, add dir method

* enh: add to_yaml method to Schema, add unit test

* ci: disable typechecking on _CheckMeta

* ci: isort

* ci: doctests

* ci: improve coverage

* ci: codecov

In these lines, dataframe_checks cannot be None based on the call condition.

* fix unrecognized check dtype during (de)serialization

* fix handle_stat__dtype closures

* enh: move metaclass onto _CheckBase

* ci: add test that ensures to_yaml warns on unregistered checks

* ci: revert adding duplicate test

Co-authored-by: cosmicBboy <[email protected]>
Co-authored-by: Jean-Francois Zinque <[email protected]>

* remove unnecessary warnings (#441)

since parse_checks handles cases of unregistered checks, the
parts of the io module that raised a user warning were are never
in the execution path and therefore never covered in tests

* bugfix: preserve pandas extension types during validation (#443)

* Update docs (#444)

* update docs theme to Furo light

* add furo

* update styles

* add favicon, update style

Co-authored-by: Jean-Francois Zinque <[email protected]>
Co-authored-by: Anton Loukianov <[email protected]>
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