DMSC Integration Testing

Last updated: November 02, 2025 03:23:45

Test: ingestor|bifrost|file_found_by_scicat_is_consistent_with_manual|

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

instrument = 'bifrost', 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/2025/999999/raw/bifrost_999999_00001288.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00002402.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00002395.hdf')]

tests/ingestor/ingestor_test.py:39: AssertionError

instrument = 'bifrost', 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/2025/999999/raw/bifrost_999999_00001288.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00002339.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00002332.hdf')]

tests/ingestor/ingestor_test.py:39: AssertionError

instrument = 'bifrost', 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/2025/999999/raw/bifrost_999999_00001288.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00002199.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00002192.hdf')]

tests/ingestor/ingestor_test.py:39: AssertionError

instrument = 'bifrost', 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/2025/999999/raw/bifrost_999999_00001288.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00002059.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00002052.hdf')]

tests/ingestor/ingestor_test.py:39: AssertionError

instrument = 'bifrost', 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/2025/999999/raw/bifrost_999999_00001288.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00001919.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/bifrost_999999_00001912.hdf')]

tests/ingestor/ingestor_test.py:39: AssertionError

None

None

None

None

None

None

None

None

None

None

None

None

None

instrument = 'bifrost', 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:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:75: in get_latest_coda_nexus_path
ds = get_latest_coda_dataset(instrument, proposal_id)
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:66: in get_latest_coda_dataset
ds_model = _get_latest_dataset_model(client, instrument, proposal_id)
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:22: in _get_latest_dataset_model
datasets = client.scicat.query_datasets(
.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:839: in query_datasets
dsets_json = self._call_endpoint(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =

def _call_endpoint(
self,
*,
cmd: str,
url: str,
operation: str,
data: model.BaseModel | None = None,
params: dict[str, str] | None = None,
) -> Any:
full_url = _url_concat(self._base_url, url)
logger = get_logger()
logger.info("Calling SciCat API at %s for operation '%s'", full_url, operation)

response = self._send_to_scicat(cmd=cmd, url=full_url, data=data, params=params)
if not response.is_success:
logger.error(
"SciCat API call to %s failed: %s %s: %s",
full_url,
response.status_code,
response.reason_phrase,
response.text,
)
> raise ScicatCommError(
f"Error in operation '{operation}': {response.status_code} "
f"{response.reason_phrase}: {response.text}"
)
E scitacean.error.ScicatCommError: Error in operation 'query_datasets': 503 Service Temporarily Unavailable:
E 503 Service Temporarily Unavailable
E
E

503 Service Temporarily Unavailable


E
nginx

E
E

.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:1219: ScicatCommError

None