Skip to content

Add layer_names property to nImage and refactor channel name logic#54

Merged
TimMonko merged 5 commits intondev-kit:mainfrom
TimMonko:enh/layer-name-prop
Feb 19, 2026
Merged

Add layer_names property to nImage and refactor channel name logic#54
TimMonko merged 5 commits intondev-kit:mainfrom
TimMonko:enh/layer-name-prop

Conversation

@TimMonko
Copy link
Member

@TimMonko TimMonko commented Feb 19, 2026

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_name and instead just directly uses lazy nImage.channel_names logic throughout.

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_name property that returns the scene-qualified filename stem
  • Removes the private _build_layer_name method that previously handled both scene and channel naming
  • Updates all call sites in get_layer_data_tuples to use the property and handle channel name prepending inline

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TimMonko TimMonko changed the title Add layer_name property to nImage Add layer_names property to nImage Feb 19, 2026
@TimMonko TimMonko requested a review from Copilot February 19, 2026 02:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@TimMonko TimMonko changed the title Add layer_names property to nImage Add layer_names property to nImage and refactor channel name logic Feb 19, 2026
@TimMonko TimMonko requested a review from Copilot February 19, 2026 03:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@TimMonko TimMonko merged commit 960aa3b into ndev-kit:main Feb 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants