Skip to content

API: Rename showtable to showtable-astropy - #18047

Merged
pllim merged 2 commits into
astropy:mainfrom
pllim:the-greatest-showtable
Apr 25, 2025
Merged

pllim merged 2 commits into
astropy:mainfrom
pllim:the-greatest-showtable

Conversation

@pllim

@pllim pllim commented Apr 24, 2025

Copy link
Copy Markdown
Member

Description

This pull request is to fix #7233

I don't think it is possible to deprecate a command line? So should we just YOLO this one?

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@pllim pllim added the API change PRs and issues that change an existing API, possibly requiring a deprecation period label Apr 24, 2025
@pllim pllim added this to the v8.0.0 milestone Apr 24, 2025
@pllim
pllim requested a review from olebole April 24, 2025 19:32
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 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 Astropy 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? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@pllim pllim mentioned this pull request Apr 24, 2025
@pllim

pllim commented Apr 24, 2025

Copy link
Copy Markdown
Member Author

Should stay in draft until main is ready to be v8.0.dev

@bsipocz

bsipocz commented Apr 25, 2025

Copy link
Copy Markdown
Member

Any reasons why this have to stay on dev for another half year? I mean it's not like there will be a deprecation period, so users won't be able to pick up on this gracefully

@pllim

pllim commented Apr 25, 2025

Copy link
Copy Markdown
Member Author

Hmm I thought we said we can only break API on vX.0.0 release?

@bsipocz

bsipocz commented Apr 25, 2025

Copy link
Copy Markdown
Member

ahh, ok, fair enough

@olebole
olebole marked this pull request as ready for review April 25, 2025 06:45
@olebole
olebole requested a review from taldcroft as a code owner April 25, 2025 06:45

@olebole olebole left a comment

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.

For me this is fine, approving.
Concerning deprecation: one could still have a showtable script for a while that prints a deprecation message and then runs showtable-astropy, but I am not sure whether this is worth the effort.

@taldcroft

taldcroft commented Apr 25, 2025 •

Copy link
Copy Markdown
Member

Concerning deprecation: one could still have a showtable script for a while that prints a deprecation message and then runs showtable-astropy, but I am not sure whether this is worth the effort.

Agreed, we should have a deprecation message. I think an easy way is by defining a new function in showtable.py:

def main_deprecated(args=None):
    warnings.warn(....)  # *Visible* Deprecation warning
    main(args)

Then:

showtable = "astropy.table.scripts.showtable:main_deprecated"

@astrofrog

Copy link
Copy Markdown
Member

Having a deprecation command would be good, and pretty easy to do as @taldcroft suggests. Can we get this in before feature freeze @pllim?

@pllim

pllim commented Apr 25, 2025

Copy link
Copy Markdown
Member Author

OK I can work on that. Thanks for the suggestions!

@pllim
pllim force-pushed the the-greatest-showtable branch from 033f8d8 to 049b577 Compare April 25, 2025 16:49
@pllim pllim modified the milestones: v8.0.0, v7.1.0 Apr 25, 2025
@pllim

pllim commented Apr 25, 2025

Copy link
Copy Markdown
Member Author

Okay, I deprecated showtable and updated milestone, as suggested. With current state of the PR, it would be lie this:

$ showtable  simple_csv.csv
WARNING: AstropyDeprecationWarning: The showtable function is deprecated and may be removed in a future version.
        Use showtable-astropy instead. [__main__]
 a   b   c
--- --- ---
  1   2   3
  4   5   6
$ showtable-astropy  simple_csv.csv
 a   b   c
--- --- ---
  1   2   3
  4   5   6

@pllim

pllim commented Apr 25, 2025

Copy link
Copy Markdown
Member Author

devdeps failure is unrelated

@taldcroft taldcroft left a comment

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.

Looks good, thanks @pllim. Never say never on closing old issues!!

@pllim
pllim merged commit a57cc86 into astropy:main Apr 25, 2025
@pllim
pllim deleted the the-greatest-showtable branch April 25, 2025 18:38
@pllim

pllim commented Apr 25, 2025

Copy link
Copy Markdown
Member Author

Thanks for the quick reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API change PRs and issues that change an existing API, possibly requiring a deprecation period Docs installation table

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename showtable?

5 participants