Skip to content

MNT: Run PTH flake test in prep for supporting pathlib (io.votable)#17002

Closed
neutrinoceros wants to merge 1 commit intoastropy:mainfrom
neutrinoceros:io.votable/rfc/pth_checks
Closed

MNT: Run PTH flake test in prep for supporting pathlib (io.votable)#17002
neutrinoceros wants to merge 1 commit intoastropy:mainfrom
neutrinoceros:io.votable/rfc/pth_checks

Conversation

@neutrinoceros
Copy link
Contributor

Description

Ref #16924
This is in the continuation of #16060

  • 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
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
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 io.votable/rfc/pth_checks branch 2 times, most recently from 810cf4d to 37eafa4 Compare September 12, 2024 09:07
@neutrinoceros neutrinoceros marked this pull request as ready for review September 12, 2024 14:13

def get_attribute_path(self):
return os.path.join(self.get_dirpath(), "values.dat")
def get_attribute_path(self) -> Path:
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather not. This is API change and I use this downstream in astroquery.

Copy link
Member

Choose a reason for hiding this comment

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

In general, we should probably leave validator alone.

Copy link
Member

Choose a reason for hiding this comment

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

I agree this should be done in a separate PR as an API change. But I think this is a good thing to do long term. We should probably also consider deprecating getter and setter methods in favor of @property.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I don't know why I thought this would be private API. I'll revert the breaking change for now, but it should be simple enough to futureproof astroquery against such a change: wrapping all calls to this methods with os.fspath() would do the trick.

Copy link
Contributor Author

@neutrinoceros neutrinoceros Sep 13, 2024

Choose a reason for hiding this comment

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

I revamped this as a set of Path returning private properties + str returning public accessors. No API breakage yet, but a clear path forward: properties can be made public and accessors deprecated. What do you guys think ?

@pllim pllim added this to the v7.0.0 milestone Sep 12, 2024
@pllim pllim added Extra CI Run cron CI as part of PR Build all wheels Run all the wheel builds rather than just a selection labels Sep 12, 2024
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.

LGTM.
I don't like how many files are untested, which is no fault of this PR, but does mean we should get explicit approval from the sub-package maintainer.


def get_attribute_path(self):
return os.path.join(self.get_dirpath(), "values.dat")
def get_attribute_path(self) -> Path:
Copy link
Member

Choose a reason for hiding this comment

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

I agree this should be done in a separate PR as an API change. But I think this is a good thing to do long term. We should probably also consider deprecating getter and setter methods in favor of @property.

@neutrinoceros neutrinoceros marked this pull request as draft September 13, 2024 05:57
@neutrinoceros neutrinoceros force-pushed the io.votable/rfc/pth_checks branch from 37eafa4 to 76355c0 Compare September 13, 2024 06:16
@neutrinoceros neutrinoceros marked this pull request as ready for review September 13, 2024 07:34
@neutrinoceros neutrinoceros force-pushed the io.votable/rfc/pth_checks branch from f621046 to 035da28 Compare September 13, 2024 16:03
@pllim
Copy link
Member

pllim commented Sep 20, 2024

Can you please rebase? I just merged the config one and I just want to be sure this PR still okay as it stands. Never know if there is something subtle or not. Thanks!

@neutrinoceros neutrinoceros force-pushed the io.votable/rfc/pth_checks branch from 035da28 to 7168994 Compare September 21, 2024 07:25
@neutrinoceros
Copy link
Contributor Author

done

Copy link
Member

Choose a reason for hiding this comment

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

I am still not sure about the validator changes. Is there a reason why we cannot just exclude it from this ruff check? If you must, I think it should be a separate PR because not everyone that uses io.votable use validator, but I do use the validator and I need extra time to vet it downstream.

Copy link
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.

With the potential downstream implications, I would very strongly prefer this not being merged into 7.0. It's just simply too close to feature freeze and we don't need a fire artificially added on the pyvo/astroquery tables messing up our already set timelines and roadmaps.

@pllim
Copy link
Member

pllim commented Sep 23, 2024

@bsipocz , but you would still be open to this getting merged for v7.1? I can move the milestone if that is the case.

@bsipocz
Copy link
Member

bsipocz commented Sep 23, 2024

but you would still be open to this getting merged for v7.1

Having a ~6month prep period for API changes (dare I say that are added for no good reasons) is more acceptable; but again this makes me wonder if indeed there isn't enough bugs reported in the 1300+ issues so poking around with API changes in code that is being around for a long time and being used downstream but cause no reported problems with is what should take priority just to tick off ruff boxes again? Especially when we talk about paid priorities that don't cause havoc for other maintainers?

@nstarman
Copy link
Member

I think this PR is being taken a bit out of context. @neutrinoceros has done a good job making sure that this PR does not break any API (e.g. #17002 (comment)). This PR expands the input options to many functions that deal with paths, allowing them to take the recommended pathlib.Path objects in addition to strings.
I agree that it is entirely reasonable to bump this to 7.1.

@neutrinoceros
Copy link
Contributor Author

For what it's worth I just ran pyvo's test suite against this branch and found 0 error (or warning). I have intentionally not removed any API here or introduced any deprecation yet, so it would be easy to have this in 7.0 and possibly delay any deprecation to 7.1. I would also be happy to help with said deprecations in downstream code when/if we go this route, but in the meantime I'm not sure I understand why the present PR shouldn't land in 7.0

@pllim
Copy link
Member

pllim commented Sep 24, 2024

Let's punt this to v7.1 then. That way, the validator stuff can stay because I would have time (theoretically) to check it later. I will turn this back into draft for now. Thank you all for your patience and understanding!

@pllim pllim marked this pull request as draft September 24, 2024 15:23
@pllim pllim modified the milestones: v7.0.0, v7.1.0 Sep 24, 2024
@github-actions github-actions bot added the Close? Tell stale bot that this issue/PR is stale label Feb 19, 2025
@github-actions
Copy link
Contributor

Hi humans 👋 - this pull request hasn't had any new commits for approximately 4 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.

@github-actions github-actions bot added the closed-by-bot Closed by stale bot label Mar 22, 2025
@github-actions
Copy link
Contributor

I'm going to close this pull request as per my previous message. If you think what is being added/fixed here is still important, please remember to open an issue to keep track of it. Thanks!

If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here.

@github-actions github-actions bot closed this Mar 22, 2025
@neutrinoceros neutrinoceros deleted the io.votable/rfc/pth_checks branch March 22, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build all wheels Run all the wheel builds rather than just a selection Close? Tell stale bot that this issue/PR is stale closed-by-bot Closed by stale bot dev-automation Extra CI Run cron CI as part of PR io.votable testing unified-io

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants