Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pint support for Dataset (pydata#3975)
* remove the xfail marks from all aggregations except prod and np.median * rewrite the aggregation tests * rewrite the repr tests it still does not check the content of the repr, though * rewrite some more tests * simplify the numpy-method-with-args tests * always use the same data units unless the compatibility is tested * partially rewrite more tests * rewrite combine_first This also adds tests for units in indexes, which are by default stripped. * simplify the comparisons test a bit * skip the tests for identical * remove the map_values function * only call convert_units if necessary * use assert_units_equal and assert_equal in broadcast_like and skip it * remove the conditional skip since pint now supports __array_function__ * only skip the broadcast_like tests if we attempt to put units in indexes * remove the xfail mark from the where tests * reimplement the broadcast_equals tests * reimplement the tests on stacked arrays * refactor the to_stacked_array tests this test is marked as skipped because the unit registry always returns numpy.array objects which are not hashable, so the initial dataset with units cannot be constructed (the result of to_stacked_array wouldn't be correct either because IndexVariable doesn't support units) * fix the stacking and reordering tests * don't create a coordinate for the isel tests * separate the tests for units in dims from the tests for units in data * refactor the dataset constructor tests * fix the repr tests * raise on all warnings * rename merge_mappings to zip_mappings * rename merge_dicts to merge_mappings * make the missing value filling tests raise on warnings * remove a leftover assert_equal_with_units * refactor the sel tests * make the loc tests a slightly modified copy of the sel tests * make the drop_sel tests a slightly modified version of the sel tests * refactor the head / tail / thin tests * refactor the squeeze tests to not have multiple tests per case * skip the head / tail / thin tests with units in dimensions * combine the interp and reindex tests * combine the interp_like and reindex_like tests * refactor the computation tests * rewrite the computation objects tests * rewrite the resample tests * rewrite the grouped operations tests * rewrite the content manipulation tests * refactor the merge tests * remove the old assert_equal_with_units function * xfail the groupby_bins tests for now * fix and use allclose * filterwarnings for the whole TestDataset class * modify the squeeze tests to not use units in indexes * replace skip with xfail * update whats-new.rst * update the xfail reason for the rolling_exp tests * temporarily use pip to install pint since the feedstock seems to take a while * don't use pip to install pint * update the xfail to require at least 0.12.1 * xfail the prod tests * filter only UnitStrippedWarning * remove unncessary commas
- Loading branch information