Skip to content

Introduce astro_types_support to enable time_support and quantity_support simultaneously#19727

Open
TheScreechingBagel wants to merge 8 commits into
astropy:mainfrom
TheScreechingBagel:pr17575
Open

Introduce astro_types_support to enable time_support and quantity_support simultaneously#19727
TheScreechingBagel wants to merge 8 commits into
astropy:mainfrom
TheScreechingBagel:pr17575

Conversation

@TheScreechingBagel
Copy link
Copy Markdown

Description

Introduce astro_types_support, a context manager that enables both quantity_support and time_support.

This pull request is re-opening #17575 by @spranav1205; I squashed some of their commits, rebased on main and renamed it. I am now seeing if there is more feedback to be applied, and figuring out tests/hashes.

Fixes #8860

  • 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.

@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.

@TheScreechingBagel
Copy link
Copy Markdown
Author

51cd708 removed pyplot so i gotta fix that

@TheScreechingBagel TheScreechingBagel marked this pull request as draft May 12, 2026 14:13
@TheScreechingBagel TheScreechingBagel marked this pull request as draft May 12, 2026 14:13
@pllim pllim added this to the v8.1.0 milestone May 12, 2026
spranav1205 and others added 5 commits May 12, 2026 17:20
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>

testing ..plot::

Using other docstring example refs
@TheScreechingBagel
Copy link
Copy Markdown
Author

i got momentarily confused because #17575 (comment) showed coincident lines but 07ada01 changed the numbers so it's fine i think :p

@TheScreechingBagel TheScreechingBagel marked this pull request as ready for review May 12, 2026 16:44
@TheScreechingBagel
Copy link
Copy Markdown
Author

question: why does units.py have the if HAS_MATPLOTLIB check but time.py doesn't? does it not need one? the class redeclaration is confusing my typechecker (and me)

and should i add a Parameters section to the docstring, like quantity_support has?

for docs, should there be a blurb added to visualization/matplotlib_integration.rst

@TheScreechingBagel
Copy link
Copy Markdown
Author

TheScreechingBagel commented May 12, 2026

i only just now noticed this PR: #19061 , not sure how.. looks neater too

p.s. that one adds to units.py but predates the check, so i'm still curious

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a way to enable both quantity_support and time_support in one go

3 participants