-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
feature/fallback-strategy #351
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## dev #351 +/- ##
==========================================
+ Coverage 98.84% 98.88% +0.04%
==========================================
Files 20 21 +1
Lines 2242 2339 +97
==========================================
+ Hits 2216 2313 +97
Misses 26 26
Continue to review full report at Codecov.
|
cosmicBboy
added a commit
that referenced
this pull request
Dec 10, 2020
* check fallback strategy, register custom checks * fix pylint errors * add test for usage in Field * fix pylint error: hypothesis * 100% coverage extensions module * increase deadline on test strategies * suppress health check on slow running tests
cosmicBboy
added a commit
that referenced
this pull request
Dec 15, 2020
* implement hypothesis strategies for generating synthetic data (#314) * schemas can generate valid samples * implemented basic generation * implement register check strategy * implementations for built-in checks and register check strat * implement column, series, dataframe strategies * implement more tests * implement index/multiindex strategies, at built-in str tests * simplify string strategy tests * fix chained continuous tests * implement nullable strategies * address pylint issues * update environment, setup.py * add docstrings to new PandasDtype methods * null mask is the last strategy in index_strategy * address mypy and black errors * fix legacy pandas issue with nullable ints * skip complex256 tests with windows os * use SUPPORTED_DTYPES to control tested dtypes for os * fix multiindex strategy equality test * bugfix: test index/multiindex strategy type check * add back linux/osx tests * fix str strat tests, move BaseStrat error * improve test coverage * fix series schema pdtype test * add more teset coverage * feature/dataframe-checks (#334) * add support for dataframe check strategies * add support for coerce dtype on dataframe-level pandas_dtype * fix issue with type coercian in multiindex * add packaging to requirements-dev.txt * update travis ci spec with pandera-core env file * increase deadline of in_range strategy test * fix test_in_range_strategy * fix bugs in dataframe check and index tests * update conftest.py: reduce max examples to 100 * fix dataframe strategy * fix type error on windows * improve coverage * bugfix/lazy-error-dtype-coercion (#339) * bugfix: dtype coercion should be cause by lazy validation, update String documentation * improve test coverage * rebase onto dev * feature/str-dtype: introduce PandasDtype.STRING for pandas-native str type (#340) * add PandasDtype.STRING, remove PandasDtype.Str - changing the semantics of PandasDtype.String to map onto the pandas-native 'string' type would have caused backwards compatibility issues - revert changes from 2e2c5d7: remove PandasDtype.Str, and add a PandasDtype.STRING type for the pandas-native string type * fix docs * fix tests for legacy pandas * fix: DataFrameSchema.dtype property * add github action file for ci tests (#349) this diff replaces travis-ci with github actions for unit test CI * bugfix/345: support duplicate columns (#346) * support validating dataframes w/ duplicate columns * add test for multiindex duplicate names * increase coverage * feature/fallback-strategy (#351) * check fallback strategy, register custom checks * fix pylint errors * add test for usage in Field * fix pylint error: hypothesis * 100% coverage extensions module * increase deadline on test strategies * suppress health check on slow running tests * add ci test run on push/PR on dev and master branches (#353) * Add column order validation (#352) * add DataFrameSchema.ordered * fix ordered documentation * add support for MultiIndex.ordered * preserve duplicate indexes when converting multiiindex to df * increase code coverage * fix ordered with optional columns * add documentation of ordered Co-authored-by: cosmicBboy <niels.bantilan@gmail.com> * update ci-badge in README and docs (#355) * update ci badge * add dev and prod build badge * revert * docs: strategies, extensions; bugfix: strategy support object dtype (#354) * add documentation for strategies, check register, extensions * finish up documentation * fix pylint import error * mypy ignore type * update docs * update readme, add schema model to strategy docs Co-authored-by: Jean-Francois Zinque <jzinque@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
thie PR does two things:
strategy simply applies the check on th generated data and filters out
values that don't pass the check. This is undesirable for the obvious reason
that many checks would filter out a lot of data... this leads to...
pandera.extensions
module that enables users to register custom checksand, optionally, strategies for those checks. See here for an example.
Once registered, these checks will be available in the
pa.Check
namespace, aswell as a
Field(..., my_check=...)
key-word argument.