Skip to content

ENH: expose Path-returning API in astropy.config.paths - #17118

Merged
pllim merged 2 commits into
astropy:mainfrom
neutrinoceros:config/enh/expose_path_returning_api
Oct 4, 2024
Merged

pllim merged 2 commits into
astropy:mainfrom
neutrinoceros:config/enh/expose_path_returning_api

Conversation

@neutrinoceros

Copy link
Copy Markdown
Contributor

Description

Follow up to #16997 as discussed in #16997 (comment), implemented in a purely additive fashion to prevent disruption in downstream users of the historical API (no API change, no deprecation).

  • 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

github-actions Bot commented Oct 3, 2024

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

github-actions Bot commented Oct 3, 2024

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?

@neutrinoceros
neutrinoceros force-pushed the config/enh/expose_path_returning_api branch 2 times, most recently from 4ddc7e9 to 4cd9ede Compare October 3, 2024 09:15
@neutrinoceros
neutrinoceros marked this pull request as ready for review October 3, 2024 09:15
@neutrinoceros
neutrinoceros force-pushed the config/enh/expose_path_returning_api branch from 4cd9ede to c7d04e2 Compare October 3, 2024 12:06
@pllim pllim added this to the v7.0.0 milestone Oct 3, 2024
@pllim
pllim self-requested a review October 3, 2024 15:47
@pllim

pllim commented Oct 3, 2024

Copy link
Copy Markdown
Member

Thanks! I will have to test this out with downstream package when I get the chance.

@pllim pllim added the API change PRs and issues that change an existing API, possibly requiring a deprecation period label Oct 3, 2024
@neutrinoceros

Copy link
Copy Markdown
Contributor Author

but ... I did everything I could to avoid this being labelled "API change" ? Maybe I am not understanding what this label means exactly ?

@pllim

pllim commented Oct 3, 2024

Copy link
Copy Markdown
Member

Sorry, didn't have time to look in detail. I can remove the label later if it does not apply. Just want to make sure for now. Thanks.

Comment thread astropy/config/paths.py


def get_cache_dir(rootname: str = "astropy") -> str:
def get_config_dir(rootname: str = "astropy") -> str:

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.

Ah, I see. You added new API instead of changing it. Phew. I might not need downstream testing anymore. Thanks for your thoughtfulness.

Comment thread astropy/config/paths.py Outdated
Comment thread astropy/config/paths.py Outdated

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.

I think we should also make sure the "classic" get_config_dir and get_cache_dir is at least touched once in the tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I haven't (intentionally) removed them from any test that exercises them directly. Instead, I doubled these tests to exercise both APIs instead of just the classic one.

@pllim pllim removed the API change PRs and issues that change an existing API, possibly requiring a deprecation period label Oct 3, 2024

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

LGTM. Thanks!

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.

2 participants