@@ -121,6 +121,47 @@ jobs:
121121 run : |
122122 .venv/bin/ruff check src_py test
123123
124+ - name : Debug dataset resolution
125+ working-directory : ladybug/tools/python_api
126+ run : |
127+ pwd
128+ ls -la
129+ echo "--- test_helper candidates ---"
130+ find . .. ../.. -name 'test_helper.py' -print
131+ echo "--- dataset candidates ---"
132+ find . .. ../.. -maxdepth 3 -type d -name dataset -print
133+ echo "--- python debug ---"
134+ .venv/bin/python - <<'PY'
135+ import importlib.util
136+ import pathlib
137+ import sys
138+
139+ print("cwd =", pathlib.Path.cwd())
140+ print("sys.path[:6] =", sys.path[:6])
141+ print("find_spec(test_helper) =", importlib.util.find_spec("test_helper"))
142+
143+ try:
144+ import test_helper
145+
146+ print("test_helper.__file__ =", getattr(test_helper, "__file__", None))
147+ print("LBUG_ROOT =", getattr(test_helper, "LBUG_ROOT", None))
148+ print("LBUG_ROOT_PATH =", getattr(test_helper, "LBUG_ROOT_PATH", None))
149+ print("DATASET_ROOT =", getattr(test_helper, "DATASET_ROOT", None))
150+ except Exception as exc:
151+ print("import test_helper failed:", repr(exc))
152+
153+ for rel in (
154+ pathlib.Path("dataset"),
155+ pathlib.Path("../dataset"),
156+ pathlib.Path("../../dataset"),
157+ pathlib.Path("test/test_helper.py"),
158+ pathlib.Path("test_helper.py"),
159+ pathlib.Path("../dataset/tinysnb/schema.cypher"),
160+ pathlib.Path("../../dataset/tinysnb/schema.cypher"),
161+ ):
162+ print(f"{rel} exists={rel.exists()} resolved={rel.resolve()}")
163+ PY
164+
124165 - name : Run pytest (C API backend, non-torch)
125166 working-directory : ladybug/tools/python_api
126167 env :
@@ -202,6 +243,47 @@ jobs:
202243 make python
203244 cp tools/python_api/src_py/*.py tools/python_api/build/ladybug/
204245
246+ - name : Debug dataset resolution
247+ working-directory : ladybug/tools/python_api
248+ run : |
249+ pwd
250+ ls -la
251+ echo "--- test_helper candidates ---"
252+ find . .. ../.. -name 'test_helper.py' -print
253+ echo "--- dataset candidates ---"
254+ find . .. ../.. -maxdepth 3 -type d -name dataset -print
255+ echo "--- python debug ---"
256+ .venv/bin/python - <<'PY'
257+ import importlib.util
258+ import pathlib
259+ import sys
260+
261+ print("cwd =", pathlib.Path.cwd())
262+ print("sys.path[:6] =", sys.path[:6])
263+ print("find_spec(test_helper) =", importlib.util.find_spec("test_helper"))
264+
265+ try:
266+ import test_helper
267+
268+ print("test_helper.__file__ =", getattr(test_helper, "__file__", None))
269+ print("LBUG_ROOT =", getattr(test_helper, "LBUG_ROOT", None))
270+ print("LBUG_ROOT_PATH =", getattr(test_helper, "LBUG_ROOT_PATH", None))
271+ print("DATASET_ROOT =", getattr(test_helper, "DATASET_ROOT", None))
272+ except Exception as exc:
273+ print("import test_helper failed:", repr(exc))
274+
275+ for rel in (
276+ pathlib.Path("dataset"),
277+ pathlib.Path("../dataset"),
278+ pathlib.Path("../../dataset"),
279+ pathlib.Path("test/test_helper.py"),
280+ pathlib.Path("test_helper.py"),
281+ pathlib.Path("../dataset/tinysnb/schema.cypher"),
282+ pathlib.Path("../../dataset/tinysnb/schema.cypher"),
283+ ):
284+ print(f"{rel} exists={rel.exists()} resolved={rel.resolve()}")
285+ PY
286+
205287 - name : Run pytest (pybind backend, non-torch)
206288 working-directory : ladybug/tools/python_api
207289 env :
0 commit comments