Skip to content

Add type annotation and require kwargs for centered_image#13

Merged
sethrj merged 3 commits intoceleritas-project:mainfrom
sethrj:centered-image
Feb 9, 2026
Merged

Add type annotation and require kwargs for centered_image#13
sethrj merged 3 commits intoceleritas-project:mainfrom
sethrj:centered-image

Conversation

@sethrj
Copy link
Member

@sethrj sethrj commented Feb 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 9, 2026 11:40
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 PR updates centered_image in celerpy.visualize to add typing, enforce keyword-only arguments (partially), and tighten width parsing/validation for more predictable image specification construction.

Changes:

  • Added numpy.typing.ArrayLike and annotated center, xdir, and outdir accordingly.
  • Made width, xdir, and outdir keyword-only and added defaults for the direction vectors/center.
  • Hardened width handling by accepting scalar numeric widths or validating array-like widths to be shape (2,).

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

@sethrj sethrj merged commit c107c2c into celeritas-project:main Feb 9, 2026
7 of 8 checks passed
@sethrj sethrj deleted the centered-image branch February 9, 2026 12:39
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