Skip to content

MAINT: Run PTH flake test in prep for supporting pathlib#16060

Closed
MridulS wants to merge 1 commit intoastropy:mainfrom
MridulS:use_tmp_path
Closed

MAINT: Run PTH flake test in prep for supporting pathlib#16060
MridulS wants to merge 1 commit intoastropy:mainfrom
MridulS:use_tmp_path

Conversation

@MridulS
Copy link
Contributor

@MridulS MridulS commented Feb 18, 2024

This PR starts work on making a unified i/o interface for reading and writing to disk. In some places using strings for filenames work, in other pathlib objects works too. We should be able to pass around Path objects all around the code. For a first go I want to make the PTH ruff flake8 linter happy.

As a start this fixes ruff complaints in couple of sub packages. Didn't want to make the PR too big.

Also want to check if this works with windows CI all fine. (pathlib has had some issues with windows from what I remember).

One way to go about #14893

@github-actions
Copy link
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.

Copy link
Member

@nstarman nstarman left a comment

Choose a reason for hiding this comment

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

Lots of good things in this PR! I have a few suggestions that are applicable in many places to further simplify the code, e.g. using read_text.

@MridulS MridulS requested review from a team as code owners February 19, 2024 09:35
Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

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

Looks good for time.

Copy link
Member

@nstarman nstarman left a comment

Choose a reason for hiding this comment

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

Some of the os.path.join got replaced by os-dependent strings.

Copy link
Member

@larrybradley larrybradley left a comment

Choose a reason for hiding this comment

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

Fine for convolution and stats.

@neutrinoceros
Copy link
Contributor

I am no ma...intainer.

https://m.youtube.com/watch?v=W7_c-R7i8F4

@pllim
Copy link
Member

pllim commented Aug 29, 2024

If you open an alternate PR, please link here and I can close this one (again). Thanks, all!

@github-actions github-actions bot added the Close? Tell stale bot that this issue/PR is stale label Aug 30, 2024
@github-actions
Copy link
Contributor

Hi humans 👋 - this pull request hasn't had any new commits for approximately 6 months. I plan to close this in 30 days if the pull request doesn't have any new commits by then.

In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock.

If you believe I commented on this pull request incorrectly, please report this here.

@neutrinoceros
Copy link
Contributor

Yes, I'll probably end up splitting this into smaller, subpackage-targetted PRs. Will try to get to it next week !

@neutrinoceros
Copy link
Contributor

I've started chunking this PR in smaller bits starting with #16917, and pushed packaged-targeted patched in #16918, #16918 and #16923 for starters since these bits were already approved here. I'll open all other PRs after #16917 is merged.

@pllim
Copy link
Member

pllim commented Sep 3, 2024

Since this PR is stale, instead of keeping it open, I have moved the idea to #16924 . Please continue there. Thanks!

@pllim pllim closed this Sep 3, 2024
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.

10 participants