Skip to content

0.10.0

Compare
Choose a tag to compare
@shawnbrown shawnbrown released this 17 Dec 06:24
· 100 commits to master since this release
  • Fixed bug where ValidationErrors were crashing pytest-xdist workers.

  • Added tighter Pandas integration using Pandas' extension API.

    After calling the new register_accessors() function, your existing
    DataFrame, Series, Index, and MultiIndex objects will have
    a validate() method that can be used instead of the validate()
    function:

    import padas as pd
    import datatest as dt
    
    dt.register_accessors()  # <- Activate Pandas integration.
    
    df = pd.DataFrame(...)
    df[['A', 'B']].validate((str, int))  # <- New accessor method.
    
  • Changed Pandas validation behavior:

    • DataFrame and Series: These objects are treated as sequences
      when they use a RangeIndex index (this is the default type
      assigned when no index is specified). And they are treated as
      dictionaries when they use an index of any other type--the
      index values become the dictionary keys.

    • Index and MultiIndex: These objects are treated as sequences.

  • Changed repr behavior of Deviation to make timedeltas more readable.

  • Added Predicate matching support for NumPy types np.character,
    np.integer, np.floating, and np.complexfloating.

  • Added improved NaN handling:

    • Added NaN support to accepted.keys(), accepted.args(), and
      validate.interval().
    • Improved existing NaN support for difference comparisons.
    • Added how-to documentation for NaN handling.
  • Added data handling support for squint.Select objects.

  • Added deprecation warnings for soon-to-be-removed functions and classes:

    • Added DeprecationWarning to get_reader function. This function
      is now available from the get-reader package on PyPI:

      https://pypi.org/project/get-reader/

    • Added DeprecationWarning to Select, Query, and Result classes.
      These classes will be deprecated in the next release but are now
      available from the squint package on PyPI:

      https://pypi.org/project/squint/

  • Changed validate.subset() and validate.superset() behavior:

    The semantics are now inverted. This behavior was flipped to more
    closely match user expectations. The previous semantics were used
    because they reflect the internal structure of datatest more precisely.
    But these are implementation details that and they are not as important
    as having a more intuitive API.

  • Added temporary a warning when using the new subset superset methods
    to alert users to the new behavior. This warning will be removed from
    future versions of datatest.

  • Added Python 3.9 and 3.10 testing and support.

  • Removed Python 3.1 testing and support. If you were still using this
    version of Python, please email me--this is a story I need to hear.