instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00023348.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
Test: nexusfiles-scipp|estia|load_raw_file|
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00023201.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00023068.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00022921.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00022773.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00022633.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00022460.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00022320.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00022180.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00022033.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00021893.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00021760.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00021480.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/middle_focus_changer/transformations as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00021333.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/middle_focus_changer/transformations as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00021193.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/middle_focus_changer/transformations as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00021060.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/middle_focus_changer/transformations as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020920.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/middle_focus_changer/transformations as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020829.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/middle_focus_changer/transformations as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020829.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/middle_focus_changer/transformations as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020780.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/middle_focus_changer/transformations as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020766.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/middle_focus_changer/transformations as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020728.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020728.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020728.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020728.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020728.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020728.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020588.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020448.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020308.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020251.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020160.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00020020.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00019964.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00019957.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00019887.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00019831.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00019817.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'estia'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00019817.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/middle_focus_changer/horizontal_adjustment/transformations', value='/entry/instrument/mask_changer/transformations/translation') references missing node 'Unable to synchronously open object (component not found)'
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning