Closed github-actions[bot] closed 2 years ago
Test failures related to fragment counts:
=================================== FAILURES ===================================
_ ExamplesTest.test_docs[/home/runner/work/TileDB-Py/TileDB-Py/tiledb/libtiledb.pyx] _
self = <tiledb.tests.test_examples.ExamplesTest object at 0x7ff010fc8100>
path = '/home/runner/work/TileDB-Py/TileDB-Py/tiledb/libtiledb.pyx'
capsys = <_pytest.capture.CaptureFixture object at 0x7ff010fc8430>
@pytest.mark.skipif(
sys.platform == "win32",
reason="Some doctests are missing a clean-up step on windows",
)
@pytest.mark.parametrize(
"path",
[
os.path.join(PROJECT_DIR, "tiledb", "libtiledb.pyx"),
os.path.join(PROJECT_DIR, "tiledb", "fragment.py"),
],
)
def test_docs(self, path, capsys):
failures, _ = doctest.testfile(
path,
module_relative=False,
verbose=False,
optionflags=doctest.NORMALIZE_WHITESPACE,
)
if failures:
> pytest.fail(capsys.readouterr().out)
E Failed: **********************************************************************
E File "/home/runner/work/TileDB-Py/TileDB-Py/tiledb/libtiledb.pyx", line 6801, in libtiledb.pyx
E Failed example:
E len(paths) # should be 13 (3 base files + 2*5 fragment+ok files)
E Expected:
E 13
E Got:
E 12
E **********************************************************************
E File "/home/runner/work/TileDB-Py/TileDB-Py/tiledb/libtiledb.pyx", line 6807, in libtiledb.pyx
E Failed example:
E len(paths) # should now be 5 (3 base files + 2 fragment+ok files)
E Expected:
E 5
E Got:
E 4
E **********************************************************************
E 1 items had failures:
E 2 of 59 in libtiledb.pyx
E ***Test Failed*** 2 failures.
tiledb/tests/test_examples.py:61: Failed
_________ TestPandasDataFrameRoundtrip.test_dataframe_csv_schema_only __________
self = <tiledb.tests.test_pandas_dataframe.TestPandasDataFrameRoundtrip object at 0x7ff0085f8be0>
def test_dataframe_csv_schema_only(self):
col_size = 10
df = make_dataframe_basic3(col_size)
tmp_dir = self.path("csv_schema_only")
self.vfs.create_dir(tmp_dir)
tmp_csv = os.path.join(tmp_dir, "generated.csv")
df.sort_values("time", inplace=True)
with tiledb.FileIO(self.vfs, tmp_csv, "wb") as fio:
df.to_csv(fio, index=False)
attrs_filters = tiledb.FilterList([tiledb.ZstdFilter(3)])
# from_pandas default is 1, so use 7 here to check
# the arg is correctly parsed/passed
coords_filters = tiledb.FilterList([tiledb.ZstdFilter(7)])
tmp_assert_dir = os.path.join(tmp_dir, "array")
# this should raise an error
with self.assertRaises(ValueError):
tiledb.from_csv(tmp_assert_dir, tmp_csv, tile="abc")
with self.assertRaises(ValueError):
tiledb.from_csv(tmp_assert_dir, tmp_csv, tile=(3, 1.0))
tmp_array = os.path.join(tmp_dir, "array")
tiledb.from_csv(
tmp_array,
tmp_csv,
index_col=["time", "double_range"],
parse_dates=["time"],
mode="schema_only",
capacity=1001,
sparse=True,
tile={"time": 5},
coords_filters=coords_filters,
attr_filters=attrs_filters,
)
t0, t1 = df.time.min(), df.time.max()
import numpy
ref_schema = tiledb.ArraySchema(
domain=tiledb.Domain(
*[
tiledb.Dim(
name="time",
domain=(t0.to_datetime64(), t1.to_datetime64()),
tile=5,
dtype="datetime64[ns]",
),
tiledb.Dim(
name="double_range",
domain=(-1000.0, 1000.0),
tile=1000,
dtype="float64",
),
]
),
attrs=[tiledb.Attr(name="int_vals", dtype="int64", filters=attrs_filters)],
coords_filters=coords_filters,
cell_order="row-major",
tile_order="row-major",
capacity=1001,
sparse=True,
allows_duplicates=False,
)
# note: filters omitted
array_nfiles = len(tiledb.VFS().ls(tmp_array))
> self.assertEqual(array_nfiles, 3)
tiledb/tests/test_pandas_dataframe.py:780:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/contextlib.py:281: in helper
return _GeneratorContextManager(func, args, kwds)
/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/contextlib.py:103: in __init__
self.gen = func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tiledb.tests.test_pandas_dataframe.TestPandasDataFrameRoundtrip object at 0x7ff0085f8be0>
args = (2, 3)
@contextlib.contextmanager
def assertEqual(self, *args):
if not len(args) == 2:
raise Exception("Unexpected input len > 2 to assertEquals")
> assert args[0] == args[1]
E AssertionError
tiledb/tests/common.py:127: AssertionError
=============================== warnings summary ===============================
tiledb/tests/test_dask.py::TestDaskSupport::test_dask_overlap_blocks
/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/dask/array/core.py", line 3994, in <listcomp>
(names[bisect(cum_dims, key[axis + 1]) - 1],)
ResourceWarning: unclosed <socket.socket fd=23, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED tiledb/tests/test_examples.py::ExamplesTest::test_docs[/home/runner/work/TileDB-Py/TileDB-Py/tiledb/libtiledb.pyx]
FAILED tiledb/tests/test_pandas_dataframe.py::TestPandasDataFrameRoundtrip::test_dataframe_csv_schema_only
= 2 failed, 359 passed, 3 skipped, 8 xfailed, 2 xpassed, 1 warning in 83.82s (0:01:23) =
Error: Process completed with exit code 1.
This is due to https://github.com/TileDB-Inc/TileDB/pull/2692, will put in a fix later.
See run for more details: https://github.com/TileDB-Inc/TileDB-Py/actions/runs/1538142385