Skip to content

Fix layout#113

Merged
chengcli merged 1 commit intomainfrom
cli/fix_layout
Feb 17, 2026
Merged

Fix layout#113
chengcli merged 1 commit intomainfrom
cli/fix_layout

Conversation

@chengcli
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 17, 2026 03:33
Copy link
Contributor

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 pull request adds Python bindings for several methods (options, rank_of, loc_of, neighbor_rank) to layout implementation classes, and fixes a bug where the __repr__ lambda parameter for CubedLayout incorrectly referenced CubedSphereLayoutImpl instead of CubedLayoutImpl.

Changes:

  • Added Python bindings for options, rank_of, loc_of, and neighbor_rank to LayoutImpl, SlabLayoutImpl, CubedLayoutImpl, and CubedSphereLayoutImpl
  • Fixed the lambda parameter type in CubedLayout.__repr__ from CubedSphereLayoutImpl to CubedLayoutImpl

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

.def("__repr__", [](const snap::CubedLayoutImpl &self) {
std::stringstream ss;
self.pretty_print(ss);
return fmt::format("CubedSphereLayout(\n{})", ss.str());
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The repr method for CubedLayout incorrectly returns a string labeled as "CubedSphereLayout". It should return "CubedLayout" instead to match the actual class name. This inconsistency could confuse users when inspecting CubedLayout objects.

Suggested change
return fmt::format("CubedSphereLayout(\n{})", ss.str());
return fmt::format("CubedLayout(\n{})", ss.str());

Copilot uses AI. Check for mistakes.
@chengcli chengcli merged commit 9050434 into main Feb 17, 2026
9 checks passed
@chengcli chengcli deleted the cli/fix_layout branch February 17, 2026 03:57
@github-actions
Copy link
Contributor

🎉 Released v1.3.1!

What's Changed

Full Changelog: v1.3.0...v1.3.1

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.

1 participant