PR #1936 allowed Axom's Python bindings to be installed into a uv/pip virtual environment, and run through Jupyter.
This revealed that some Sidre calls could silently fail without showing the underlying SLIC errors/warnings.
E.g. if you call the following twice:
child_group = parent_group.createGroup("child)
print( type(child_group) ) # Returns `sidre.Group` the first time; `None` in subsequent calls
The first call will return a valid group, but the second call will return a nullptr with a SLIC_WARNING that the group already exists.
In Python, child_group will be None the second time.
This comes up often in Jupyter if you rerun a cell, but unfortunately, Jupyter does not show the SLIC_WARNING in its output, so this can silently fail.
To make this more prominent, we should rewire the error handler to throw exceptions in Python.
Since Sidre already has hooks for this, I think it should be fairly easy to do this.
PR #1936 allowed Axom's Python bindings to be installed into a uv/pip virtual environment, and run through Jupyter.
This revealed that some Sidre calls could silently fail without showing the underlying SLIC errors/warnings.
E.g. if you call the following twice:
The first call will return a valid group, but the second call will return a
nullptrwith a SLIC_WARNING that the group already exists.In Python,
child_groupwill beNonethe second time.This comes up often in Jupyter if you rerun a cell, but unfortunately, Jupyter does not show the SLIC_WARNING in its output, so this can silently fail.
To make this more prominent, we should rewire the error handler to throw exceptions in Python.
Since Sidre already has hooks for this, I think it should be fairly easy to do this.