DMSC Integration Testing

Last updated: May 27, 2026 07:22:11

Test: ingestor|dream|file_found_by_scicat_is_consistent_with_manual|

View job log here


instrument = 'dream', coda_proposal_id = '999999'

def test_file_found_by_scicat_is_consistent_with_manual(
instrument: str,
coda_proposal_id: str,
) -> None:
> scicat_path = scicat.get_latest_coda_nexus_path(
proposal_id=coda_proposal_id, instrument=instrument
)

tests/ingestor/ingestor_test.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

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

View job log here


instrument = 'dream', coda_proposal_id = '999999'

def test_file_found_by_scicat_is_consistent_with_manual(
instrument: str,
coda_proposal_id: str,
) -> None:
scicat_path = scicat.get_latest_coda_nexus_path(
proposal_id=coda_proposal_id, instrument=instrument
)
raw_paths = coda.get_latest_nexus_paths(
proposal_id=coda_proposal_id,
instrument=instrument,
n=2,
)

# Resolve symlinks because the raw folder is symlinked to `/ess/data`
# and we don't care whether we access files through links or regular paths.
scicat_path = scicat_path.resolve()
raw_paths = [path.resolve() for path in raw_paths]

> assert scicat_path in raw_paths
E AssertionError: assert PosixPath('/ess/raw/coda/999999/raw/coda_dream_999999_00026438.hdf') in [PosixPath('/ess/raw/coda/999999/raw/coda_dream_999999_00026294.hdf'), PosixPath('/ess/raw/coda/999999/raw/coda_dream_999999_00026286.hdf')]

tests/ingestor/ingestor_test.py:39: AssertionError

View job log here


instrument = 'dream', coda_proposal_id = '999999'

def test_file_found_by_scicat_is_consistent_with_manual(
instrument: str,
coda_proposal_id: str,
) -> None:
scicat_path = scicat.get_latest_coda_nexus_path(
proposal_id=coda_proposal_id, instrument=instrument
)
raw_paths = coda.get_latest_nexus_paths(
proposal_id=coda_proposal_id,
instrument=instrument,
n=2,
)

# Resolve symlinks because the raw folder is symlinked to `/ess/data`
# and we don't care whether we access files through links or regular paths.
scicat_path = scicat_path.resolve()
raw_paths = [path.resolve() for path in raw_paths]

> assert scicat_path in raw_paths
E AssertionError: assert PosixPath('/ess/raw/coda/999999/raw/coda_dream_999999_00025685.hdf') in [PosixPath('/ess/raw/coda/999999/raw/coda_dream_999999_00025587.hdf'), PosixPath('/ess/raw/coda/999999/raw/coda_dream_999999_00025580.hdf')]

tests/ingestor/ingestor_test.py:39: AssertionError