Skip to content

fix: handle missing dataset files without traceback (#110)#201

Open
raywcm wants to merge 3 commits into
UBC-MOAD:mainfrom
raywcm:fix/missing-dataset-file-errors
Open

fix: handle missing dataset files without traceback (#110)#201
raywcm wants to merge 3 commits into
UBC-MOAD:mainfrom
raywcm:fix/missing-dataset-file-errors

Conversation

@raywcm

@raywcm raywcm commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Closes #110

This change converts missing dataset files during extraction into a clean CLI error instead of allowing the FileNotFoundError from xarray/h5netcdf to surface as a traceback.

It handles both places mentioned in the issue:

  • the first/last dataset probes used to build the drop_vars set
  • the later xarray.open_mfdataset() call over the full dataset path list

Test plan

  • pytest -q tests/core/test_extract.py::TestOpenDatasetMissingFiles::test_missing_first_dataset_path_exits_cleanly
  • pytest -q tests/core/test_extract.py::TestOpenDatasetMissingFiles tests/core/test_extract.py::TestCliExtract::test_no_config_file tests/core/test_extract.py::TestCliExtract::test_cli_extract
  • python -m compileall -q reshapr/core/extract.py tests/core/test_extract.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Users see FileNotFoundError tracebacks

1 participant