Skip to content

New DataClass.hstack#455

Open
mkelley wants to merge 6 commits into
NASA-Planetary-Science:mainfrom
mkelley:new-dataclass-hstack-2026.06
Open

New DataClass.hstack#455
mkelley wants to merge 6 commits into
NASA-Planetary-Science:mainfrom
mkelley:new-dataclass-hstack-2026.06

Conversation

@mkelley

@mkelley mkelley commented Jun 10, 2026

Copy link
Copy Markdown
Member

DataClass.hstack will append another object's columns:

import astropy.units as u
from sbpy.data import DataClass

data1 = DataClass.from_dict({"rh": [1, 2, 3] * u.au, "delta": [1, 2, 3] * u.au})
data2 = DataClass.from_dict({"phase": [60, 30, 15] * u.deg})
data1.hstack(data2)

It uses astropy's hstack and will rename columns as needed to avoid DataClass field name collisions.

@github-actions

Copy link
Copy Markdown

Thank you for your contribution to sbpy, an Astropy affiliated package! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the sbpy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related?
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label.
  • Is a milestone added?

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.15%. Comparing base (e720e46) to head (bb88cf5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #455      +/-   ##
==========================================
+ Coverage   82.11%   82.15%   +0.04%     
==========================================
  Files          53       53              
  Lines        4339     4349      +10     
==========================================
+ Hits         3563     3573      +10     
  Misses        776      776              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mkelley mkelley requested a review from hhsieh00 June 10, 2026 23:46
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