You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
validate_datasets.py: a relative manifest path crashes the failure report instead of printing the ::error line #129
With a relative path and a manifest that fails, the run ends in a traceback instead of the annotation:
$ sed -i -E 's/(F_over_Fmsy:\s*)1\b/\12/' lectures/lingcod_msy_recovery.csv.yml
$ python scripts/validate_datasets.py lectures/lingcod_msy_recovery.csv.yml
File "scripts/validate_datasets.py", line 123, in main
print(f'::error file={path.relative_to(REPO)}::{p}')
ValueError: 'lectures/lingcod_msy_recovery.csv.yml' is not in the subpath of '/…/data-lectures' OR one path is relative and the other is absolute.
The same run with an absolute path prints what was intended:
Reproduced under pandas 2.3.3 and 3.0.5 (Python 3.11). The exit code is 1 either way, so nothing passes that should fail — but the one thing a maintainer runs the script for locally, the named failure, is swallowed. CI is unaffected: with no arguments the script globs LECTURES, which is absolute.
Cause
REPO is absolute (pathlib.Path(__file__).resolve().parents[1]) while the CLI arguments are used as given, and PurePath.relative_to() does not resolve. A passing manifest never reaches the relative_to call, which is why the committed 44/44 run hides it.
Activity
Validation fixes: pandas-3 band check (#128), relative-path annotation (