None
Test: ingestor|dream|file_found_is_not_old|scicat
instrument = 'dream', coda_proposal_id = '999999'
datefinder =
def test_file_found_is_not_old(
instrument: str,
coda_proposal_id: str,
datefinder: Callable[..., datetime],
) -> None:
> date = datefinder(instrument=instrument, proposal_id=coda_proposal_id)
tests/ingestor/ingestor_test.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:92: in get_latest_coda_nexus_date
path = get_latest_coda_nexus_path(instrument=instrument, proposal_id=proposal_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
instrument = 'dream', proposal_id = '999999'
def get_latest_coda_nexus_path(instrument: str, proposal_id: str) -> Path:
ds = get_latest_coda_dataset(instrument, proposal_id)
logging.info(
"Latest dataset found for instrument %s and proposal_id %s:\n%s",
instrument,
proposal_id,
ds,
)
for f in ds.files:
if f.remote_path.suffix == ".hdf":
# We have direct access to the remote file store:
path = Path((ds.source_folder / f.remote_path).posix) # type: ignore[operator]
logging.info("Path to selected file is: %s", path)
return path
> raise RuntimeError("Dataset contains no HDF files")
E RuntimeError: Dataset contains no HDF files
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:88: RuntimeError
instrument = 'dream', coda_proposal_id = '999999'
datefinder =
def test_file_found_is_not_old(
instrument: str,
coda_proposal_id: str,
datefinder: Callable[..., datetime],
) -> None:
> date = datefinder(instrument=instrument, proposal_id=coda_proposal_id)
tests/ingestor/ingestor_test.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:93: in get_latest_coda_nexus_date
return get_ctime(path)
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/system.py:10: in get_ctime
return datetime.fromtimestamp(path.stat().st_ctime, tz=local_timezone())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = PosixPath('/ess/raw/coda/999999/raw/coda_dream_999999_00026438.hdf')
def stat(self, *, follow_symlinks=True):
"""
Return the result of the stat() system call on this path, like
os.stat() does.
"""
> return os.stat(self, follow_symlinks=follow_symlinks)
E FileNotFoundError: [Errno 2] No such file or directory: '/ess/raw/coda/999999/raw/coda_dream_999999_00026438.hdf'
/opt/miniforge/lib/python3.12/pathlib.py:840: FileNotFoundError
instrument = 'dream', coda_proposal_id = '999999'
datefinder =
def test_file_found_is_not_old(
instrument: str,
coda_proposal_id: str,
datefinder: Callable[..., datetime],
) -> None:
> date = datefinder(instrument=instrument, proposal_id=coda_proposal_id)
tests/ingestor/ingestor_test.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:93: in get_latest_coda_nexus_date
return get_ctime(path)
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/system.py:10: in get_ctime
return datetime.fromtimestamp(path.stat().st_ctime, tz=local_timezone())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = PosixPath('/ess/raw/coda/999999/raw/coda_dream_999999_00025685.hdf')
def stat(self, *, follow_symlinks=True):
"""
Return the result of the stat() system call on this path, like
os.stat() does.
"""
> return os.stat(self, follow_symlinks=follow_symlinks)
E FileNotFoundError: [Errno 2] No such file or directory: '/ess/raw/coda/999999/raw/coda_dream_999999_00025685.hdf'
/opt/miniforge/lib/python3.12/pathlib.py:840: FileNotFoundError