Skip to content

Commit 8c1e4dc

Browse files
Adding debug info
1 parent ecf40ff commit 8c1e4dc

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

pandas/tests/io/test_iceberg.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,32 @@
3838

3939
from pandas.io.iceberg import read_iceberg
4040

41+
42+
# TODO: Remove this before merging
43+
# Using to gather information about the CI errors that don't reproduce locally
44+
import os
45+
import pprint
46+
import strictyaml
47+
48+
PYICEBERG_HOME = "PYICEBERG_HOME"
49+
search_dirs = [os.environ.get(PYICEBERG_HOME), os.path.expanduser("~"), os.getcwd()]
50+
data = [".pyiceberg locations:"]
51+
for dir_ in search_dirs:
52+
path = None
53+
exists = False
54+
content = None
55+
if dir_:
56+
path = pathlib.Path(dir_) / ".pyiceberg.yaml"
57+
exists = path.exists()
58+
if exists:
59+
with open(path, encoding="utf-8") as f:
60+
yml_str = f.read()
61+
content = strictyaml.load(yml_str).data
62+
data.append((path, exists, content))
63+
64+
raise RuntimeError(pprint.pformat(data))
65+
# TODO end
66+
4167
pyiceberg = pytest.importorskip("pyiceberg")
4268
pyiceberg_catalog = pytest.importorskip("pyiceberg.catalog")
4369
pq = pytest.importorskip("pyarrow.parquet")

0 commit comments

Comments
 (0)