Skip to content

Group index helpers, add index accessors, and move copying separator#12

Merged
rguliev merged 1 commit intodevelopfrom
codex/fix-index-behavior-in-spectraframe
Jan 20, 2026
Merged

Group index helpers, add index accessors, and move copying separator#12
rguliev merged 1 commit intodevelopfrom
codex/fix-index-behavior-in-spectraframe

Conversation

@rguliev
Copy link
Copy Markdown
Collaborator

@rguliev rguliev commented Jan 20, 2026

Motivation

  • Fix the misplaced Copying section separator so index-related helpers are grouped together for clearer code organization.
  • Provide explicit index accessors and ensure set_index/reset_index are contiguous and behave consistently with SpectraFrame copy semantics.
  • Remove the redundant __getattr__ special-case for index now that an index property is present.

Description

  • Move the # Copying separator to appear after the index helper methods and correct the section header to # Index.
  • Add an index property and setter, and keep set_index and reset_index implementations that return new SpectraFrame objects and ignore inplace.
  • Remove the __getattr__ clause that returned self.data.index for the index attribute since the property now covers that behavior.
  • Add tests in tests/test_spectra.py to cover index setter behavior and set_index/reset_index methods and adjust test_getattr expectations.

Testing

  • No automated tests were executed as part of this change.
  • New and modified tests live in tests/test_spectra.py but were not run in this rollout.

Codex Task

@codecov-commenter
Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@rguliev rguliev marked this pull request as ready for review January 20, 2026 12:16
@rguliev rguliev merged commit 30cbd52 into develop Jan 20, 2026
1 check passed
@rguliev rguliev deleted the codex/fix-index-behavior-in-spectraframe branch January 20, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants