None
Test: ingestor|bifrost|file_found_is_not_old|scicat
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'
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)
> assert date > datetime.now(date.tzinfo) - timedelta(hours=24)
E AssertionError: assert datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) > (datetime.datetime(2025, 10, 17, 10, 10, 19, 949152, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 17, 10, 10, 19, 949152, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) =
E + where
E + and datetime.timezone(datetime.timedelta(seconds=7200), 'CEST') = datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:48: AssertionError
instrument = 'bifrost', 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)
> assert date > datetime.now(date.tzinfo) - timedelta(hours=24)
E AssertionError: assert datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) > (datetime.datetime(2025, 10, 17, 0, 15, 13, 742215, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 17, 0, 15, 13, 742215, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) =
E + where
E + and datetime.timezone(datetime.timedelta(seconds=7200), 'CEST') = datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:48: AssertionError
instrument = 'bifrost', 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)
> assert date > datetime.now(date.tzinfo) - timedelta(hours=24)
E AssertionError: assert datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) > (datetime.datetime(2025, 10, 16, 0, 15, 27, 864990, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 16, 0, 15, 27, 864990, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) =
E + where
E + and datetime.timezone(datetime.timedelta(seconds=7200), 'CEST') = datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:48: AssertionError
instrument = 'bifrost', 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)
> assert date > datetime.now(date.tzinfo) - timedelta(hours=24)
E AssertionError: assert datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) > (datetime.datetime(2025, 10, 15, 0, 14, 44, 354452, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 15, 0, 14, 44, 354452, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) =
E + where
E + and datetime.timezone(datetime.timedelta(seconds=7200), 'CEST') = datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:48: AssertionError
instrument = 'bifrost', 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)
> assert date > datetime.now(date.tzinfo) - timedelta(hours=24)
E AssertionError: assert datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) > (datetime.datetime(2025, 10, 14, 0, 14, 54, 599919, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 14, 0, 14, 54, 599919, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) =
E + where
E + and datetime.timezone(datetime.timedelta(seconds=7200), 'CEST') = datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:48: AssertionError
instrument = 'bifrost', 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)
> assert date > datetime.now(date.tzinfo) - timedelta(hours=24)
E AssertionError: assert datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) > (datetime.datetime(2025, 10, 13, 12, 14, 59, 217827, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 13, 12, 14, 59, 217827, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) =
E + where
E + and datetime.timezone(datetime.timedelta(seconds=7200), 'CEST') = datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:48: AssertionError
instrument = 'bifrost', 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)
> assert date > datetime.now(date.tzinfo) - timedelta(hours=24)
E AssertionError: assert datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) > (datetime.datetime(2025, 10, 13, 10, 46, 22, 757954, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 13, 10, 46, 22, 757954, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) =
E + where
E + and datetime.timezone(datetime.timedelta(seconds=7200), 'CEST') = datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:48: AssertionError
instrument = 'bifrost', 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)
> assert date > datetime.now(date.tzinfo) - timedelta(hours=24)
E AssertionError: assert datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) > (datetime.datetime(2025, 10, 13, 9, 57, 13, 300630, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 13, 9, 57, 13, 300630, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')) =
E + where
E + and datetime.timezone(datetime.timedelta(seconds=7200), 'CEST') = datetime.datetime(2025, 10, 9, 12, 9, 4, 265389, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'CEST')).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:48: AssertionError
None
None
None
None
None
None
None
None
None
None
instrument = 'bifrost', 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)
.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