Add layer_names property to nImage and refactor channel name logic#54
Add layer_names property to nImage and refactor channel name logic#54TimMonko merged 5 commits intondev-kit:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR refactors the layer naming logic in nImage by converting the private _build_layer_name method into a public layer_name property. This provides a cleaner, property-based API for accessing the base layer name (scene-qualified filename stem) while delegating channel name concatenation to call sites.
Changes:
- Adds a new public
layer_nameproperty that returns the scene-qualified filename stem - Removes the private
_build_layer_namemethod that previously handled both scene and channel naming - Updates all call sites in
get_layer_data_tuplesto use the property and handle channel name prepending inline
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Provides clean property API for getting the layer name, which is a combination of current nImage information, including the channel, scene and path stem. This allows us to adjust things in better abstracted pieces going forward, and is more similar to the rest of the nImage API. The layer names property returns a list corresponding to the number of layers that would be added.
This PR also removes the greedy
get_single_channel_nameand instead just directly uses lazynImage.channel_nameslogic throughout.