Skip to content

Commit

Permalink
update test for newer pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMount committed May 2, 2022
1 parent f5c9a86 commit 9afd92e
Show file tree
Hide file tree
Showing 14 changed files with 1,891 additions and 2,363 deletions.
14 changes: 7 additions & 7 deletions coverage.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
============================= test session starts ==============================
platform darwin -- Python 3.7.4, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
platform darwin -- Python 3.9.7, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/johnmount/Documents/work/pyvtreat/pkg
plugins: cov-2.12.1, anyio-3.5.0, arraydiff-0.3, remotedata-0.3.2, doctestplus-0.4.0, openfiles-0.4.0
plugins: anyio-3.5.0, cov-3.0.0
collected 40 items

pkg/tests/test_KDD2009.py . [ 2%]
Expand Down Expand Up @@ -31,19 +31,19 @@ pkg/tests/test_user_coders.py . [ 90%]
pkg/tests/test_util.py .. [ 95%]
pkg/tests/test_xicor.py .. [100%]

---------- coverage: platform darwin, python 3.7.4-final-0 -----------
---------- coverage: platform darwin, python 3.9.7-final-0 -----------
Name Stmts Miss Cover
-----------------------------------------------------
pkg/vtreat/__init__.py 6 0 100%
pkg/vtreat/cross_plan.py 49 1 98%
pkg/vtreat/stats_utils.py 132 0 100%
pkg/vtreat/transform.py 12 0 100%
pkg/vtreat/transform.py 14 0 100%
pkg/vtreat/util.py 140 7 95%
pkg/vtreat/vtreat_api.py 285 34 88%
pkg/vtreat/vtreat_db_adapter.py 69 0 100%
pkg/vtreat/vtreat_impl.py 702 58 92%
pkg/vtreat/vtreat_impl.py 703 58 92%
-----------------------------------------------------
TOTAL 1395 100 93%
TOTAL 1398 100 93%


======================== 40 passed in 111.32s (0:01:51) ========================
======================== 40 passed in 89.37s (0:01:29) =========================
255 changes: 3 additions & 252 deletions docs/index.html

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions docs/search.js

Large diffs are not rendered by default.

559 changes: 207 additions & 352 deletions docs/vtreat.html

Large diffs are not rendered by default.

430 changes: 209 additions & 221 deletions docs/vtreat/cross_plan.html

Large diffs are not rendered by default.

430 changes: 209 additions & 221 deletions docs/vtreat/stats_utils.html

Large diffs are not rendered by default.

418 changes: 203 additions & 215 deletions docs/vtreat/transform.html

Large diffs are not rendered by default.

458 changes: 223 additions & 235 deletions docs/vtreat/util.html

Large diffs are not rendered by default.

552 changes: 268 additions & 284 deletions docs/vtreat/vtreat_api.html

Large diffs are not rendered by default.

406 changes: 197 additions & 209 deletions docs/vtreat/vtreat_db_adapter.html

Large diffs are not rendered by default.

712 changes: 350 additions & 362 deletions docs/vtreat/vtreat_impl.html

Large diffs are not rendered by default.

Binary file modified pkg/dist/vtreat-1.2.4-py3-none-any.whl
Binary file not shown.
Binary file modified pkg/dist/vtreat-1.2.4.tar.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions pkg/tests/test_KDD2009.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_KDD2009_vtreat_1():
# check against previous result
assert test_processed.shape == expect_test.shape
assert set(test_processed.columns) == set(expect_test.columns)
assert numpy.max(numpy.max(numpy.abs(test_processed - expect_test))) < 1e-3
assert numpy.abs(test_processed - expect_test).max(axis=0).max() < 1e-3
# test transform conversion
transform_as_data = plan.description_matrix()
incoming_vars = list(set(transform_as_data['orig_var']))
Expand All @@ -116,7 +116,7 @@ def test_KDD2009_vtreat_1():
assert numpy.all([c in test_pipeline_cols for c in test_processed.columns])
test_cols_sorted = list(test_processed.columns)
test_cols_sorted.sort()
assert numpy.max(numpy.max(numpy.abs(test_processed[test_cols_sorted] - test_by_pipeline[test_cols_sorted]))) < 1e-5
assert numpy.abs(test_processed[test_cols_sorted] - test_by_pipeline[test_cols_sorted]).max(axis=0).max() < 1e-5
# data algebra pipeline in database
sql = data_algebra.BigQuery.BigQueryModel().to_sql(ops)
assert isinstance(sql, str)
Expand All @@ -130,7 +130,7 @@ def test_KDD2009_vtreat_1():
db_res = db_handle.read_query(
f"SELECT * FROM {db_handle.db_model.table_prefix}.d_test_processed ORDER BY orig_index")
assert db_res.shape[0] == test_processed.shape[0]
assert numpy.max(numpy.max(numpy.abs(test_processed[test_cols_sorted] - db_res[test_cols_sorted]))) < 1e-5
assert numpy.abs(test_processed[test_cols_sorted] - db_res[test_cols_sorted]).max(axis=0).max() < 1e-5
db_handle.drop_table('d_test')
db_handle.drop_table('transform_as_data')
db_handle.drop_table('d_test_processed')
Expand Down

0 comments on commit 9afd92e

Please sign in to comment.