None
Test: ingestor|dream|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
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/2025/999999/raw/dream_999999_00001289.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00002403.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00002396.hdf')]
tests/ingestor/ingestor_test.py:39: AssertionError
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/2025/999999/raw/dream_999999_00001289.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00002340.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00002333.hdf')]
tests/ingestor/ingestor_test.py:39: AssertionError
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/2025/999999/raw/dream_999999_00001289.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00002200.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00002193.hdf')]
tests/ingestor/ingestor_test.py:39: AssertionError
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/2025/999999/raw/dream_999999_00001289.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00002060.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00002053.hdf')]
tests/ingestor/ingestor_test.py:39: AssertionError
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/2025/999999/raw/dream_999999_00001289.hdf') in [PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00001913.hdf'), PosixPath('/ess/raw/coda/2025/999999/raw/dream_999999_00001906.hdf')]
tests/ingestor/ingestor_test.py:39: AssertionError
None
None
None
None
None
None
None
None
None
None
None
None
None
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:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.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
E
E
503 Service Temporarily Unavailable
E
E
E
.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:1219: ScicatCommError
None