Repository navigation
Conversation
|
Thanks for this. I was looking at #372 too and found the same pattern in a second place that this PR doesn't touch yet: files = [f for f in files if str(f.path).startswith(prefix)]With only the A regression test in the same style, for def test_prefix_filter_windows_path(self):
"""Regression for #372: backslash paths must still match prefix."""
from pathlib import PureWindowsPath
from pysus.api._impl.source import _fetch_origin_direct
matching = self._file(
PureWindowsPath("public/data/ftp/sinasc/DNSE2010.parquet")
)
other = self._file(PureWindowsPath("elsewhere/b.parquet"))
pysus = self._make_pysus([matching, other])
result = self._run(
_fetch_origin_direct(
pysus, "sinasc", None, "SE", 2010, None, "FTP", None,
False, False, download=False, _bag=True,
)
)
assert result == [matching]Feel free to fold it into this PR. If it helps, a small shared helper (e.g. |
Summary
Normalize Windows path separators before filtering files by client in PySUS.query, so FTP files are not dropped on Windows.
Fixes #372
Validation