Skip to content

MAST: Deprecate objectname#3567

Merged
bsipocz merged 2 commits intoastropy:mainfrom
snbianco:deprecate-objectname
Mar 25, 2026
Merged

MAST: Deprecate objectname#3567
bsipocz merged 2 commits intoastropy:mainfrom
snbianco:deprecate-objectname

Conversation

@snbianco
Copy link
Copy Markdown
Contributor

@snbianco snbianco commented Mar 24, 2026

The objectname parameter in Catalogs, Observations, Tesscut, and utils is deprecated in favor of object_name.

I also used this PR to fix an unintentional backwards compatibility issue that was introduced in #3540. Previously, users could input a single coordinate string with a comma separating the RA and declination ("20, -30"). The code introduced in that PR splits the string on commas, assuming that coordinates are only separated by a space, which breaks this workflow. I implemented a corner case that detects this historical single-coordinate input and works around it to still return results.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.08%. Comparing base (9347344) to head (5844c52).
⚠️ Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3567      +/-   ##
==========================================
+ Coverage   73.04%   73.08%   +0.03%     
==========================================
  Files         219      219              
  Lines       20545    20569      +24     
==========================================
+ Hits        15008    15032      +24     
  Misses       5537     5537              

☔ View full report in Codecov by Sentry.
📢 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.

@snbianco snbianco changed the title Deprecate objectname Deprecate object_name Mar 24, 2026
@snbianco snbianco force-pushed the deprecate-objectname branch 2 times, most recently from 84fc385 to 8ddf73d Compare March 24, 2026 13:59
@snbianco snbianco changed the title Deprecate object_name Deprecate objectname Mar 24, 2026
@snbianco snbianco added the mast label Mar 24, 2026
@snbianco snbianco marked this pull request as ready for review March 24, 2026 14:08
@snbianco snbianco requested a review from bsipocz March 24, 2026 14:10
@snbianco snbianco changed the title Deprecate objectname MAST: Deprecate objectname Mar 24, 2026
@snbianco snbianco force-pushed the deprecate-objectname branch from 8ddf73d to 5844c52 Compare March 24, 2026 16:40
@bsipocz bsipocz added this to the 0.4.12 milestone Mar 24, 2026
Copy link
Copy Markdown
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

This all looks good, thanks!

Unrelated issue that came up while I was running the remote tests for this PR:

  • the name resolution sometimes running into timeouts, so I would consider defaulting into a coordinate input for the remote tests rather than using object_name. I mean we should test object_name, but maybe just once and all the rest should use a coordinate rather than doing the additional name resolution with the remote service?

Either case, that is something for a follow-up.


@class_or_instance
@deprecated_renamed_argument('objectname', 'object_names', since='0.4.11')
@deprecated_renamed_argument('objectname', 'object_names', since='0.4.12')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for spotting this and fixing it!

@bsipocz bsipocz merged commit 858e727 into astropy:main Mar 25, 2026
11 checks passed
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