Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several updates to improve the clarity and functionality of the SpatialData processing functions. The main changes involve refining the function docstrings, adding error handling, and removing an unused function.
Docstring improvements and error handling:
bento/_utils.py: Updated docstrings for functions such asfilter_by_gene,get_points,get_shape,get_points_metadata,get_shape_metadata,set_points_metadata,set_shape_metadata,_sync_points,_sync_shapes,get_instance_key, andget_feature_keyto improve clarity and consistency. Added error handling for missing keys.Codebase simplification:
bento/geometry/__init__.py: Removed the import of the unusedlabels_to_shapesfunction.bento/geometry/_ops.py: Removed thelabels_to_shapesfunction to simplify the codebase. Updated theoverlayfunction docstring for clarity.Functionality enhancements:
bento/io/_index.py: Improved the_sjoin_pointsand_sjoin_shapesfunctions by refining docstrings and adding error handling for missing keys. Added a check to ensure empty categories are present in shape keys.General improvements:
bento/io/_io.py: Enhanced theprepfunction docstring for better readability and understanding.