Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecating image and spectrum as registry servicetype-s #449

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

msdemlei
Copy link
Contributor

@msdemlei msdemlei commented Jun 9, 2023

I'm also promising all-VO-searches in some other way in the docs (which perhaps I shouldn't).

This is supposed to address bug #429.

@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.10%. Comparing base (ded4360) to head (8c9c011).
Report is 14 commits behind head on main.

❗ Current head 8c9c011 differs from pull request most recent head e4e8c9f. Consider uploading reports for the commit e4e8c9f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #449      +/-   ##
==========================================
- Coverage   80.38%   80.10%   -0.28%     
==========================================
  Files          52       52              
  Lines        6189     6027     -162     
==========================================
- Hits         4975     4828     -147     
+ Misses       1214     1199      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msdemlei
Copy link
Contributor Author

msdemlei commented Aug 7, 2023 via email

@msdemlei msdemlei force-pushed the deprecate-image-and-spectrum branch 2 times, most recently from e4e8c9f to 723bd0a Compare May 7, 2024 11:06
@trjaffe
Copy link
Contributor

trjaffe commented Jul 16, 2024

The NAVO Python working group has discussed this PR internally and come up with a review. (TJ is just speaking for the team.)

Basically, we agree that while we work on the alternative (we also have a review of #470), the user needs to be warned that they are not getting global discovery results. We just feel that a deprecation that involves removing mention of "image" and "spectrum" from the docs is not yet appropriate, so we would suggest two things. Firstly, can the short warning link to the docs? I.e., something like:

“Warning: services of type “image” are not complete. See https://pyvo.readthedocs.io/en/latest/api/pyvo.registry.Servicetype.html#pyvo.registry.Servicetype.”

Then in the updated doc page, we suggest not yet removing mention of the "image" and "spectrum" options but adding something like:

“Contrary to appearances, querying “image” or "spectrum" services will not get you all resources serving those data products through the VO. Ensuring you get a more-or-less complete list of what’s available would require you to become a bit more familiar with the complexities of the VO. You would, for instance, have to search for images served three different ways: SIA, SIAv2, and ObsTAP, each of which has a different interface. This “image” search currently only searches for the first of those types, and "spectrum" similarly omits ObsTAP. A global discovery module is under active development to provide this functionality. When it is ready, these two misleading options will be deprecated.”

This gets the warning out there, gives a pointer to the intrepid user who wants to dig in, and promises a better way.

msdemlei added a commit to msdemlei/pyvo that referenced this pull request Jul 19, 2024
In an attempt to accomodate the concerns brought up in
astropy#449 (comment),
we also explain a bit why image and spectrum are being deprecated.
we still raise deprecation warnings (rather than something else), as
that is, I think, what we are doing (and should be doing): We are saying
that we discourage people to use these two strings and reserve the
right to drop them one day.
@msdemlei msdemlei force-pushed the deprecate-image-and-spectrum branch from 723bd0a to 17681b6 Compare July 19, 2024 07:41
@msdemlei
Copy link
Contributor Author

msdemlei commented Jul 19, 2024 via email

msdemlei added a commit to msdemlei/pyvo that referenced this pull request Jul 19, 2024
In an attempt to accomodate the concerns brought up in
astropy#449 (comment),
we also explain a bit why image and spectrum are being deprecated.
we still raise deprecation warnings (rather than something else), as
that is, I think, what we are doing (and should be doing): We are saying
that we discourage people to use these two strings and reserve the
right to drop them one day.
@msdemlei msdemlei force-pushed the deprecate-image-and-spectrum branch from 17681b6 to afbce15 Compare July 19, 2024 07:53
msdemlei added a commit to msdemlei/pyvo that referenced this pull request Jul 19, 2024
In an attempt to accomodate the concerns brought up in
astropy#449 (comment),
we also explain a bit why image and spectrum are being deprecated.
we still raise deprecation warnings (rather than something else), as
that is, I think, what we are doing (and should be doing): We are saying
that we discourage people to use these two strings and reserve the
right to drop them one day.
@msdemlei msdemlei force-pushed the deprecate-image-and-spectrum branch from afbce15 to 3bb54e5 Compare July 19, 2024 07:56
@msdemlei
Copy link
Contributor Author

Ummm... it's actually commit 3bb54e5. Ahhh... Can we have a plan to change the SIA2 tests so running the test suite locally before a commit becomes non-tedious again?

@trjaffe
Copy link
Contributor

trjaffe commented Jul 19, 2024

This is fine with me. But it's @bsipocz who has the opinions on how to use astropy's deprecation warning. Brigitta, is there a different type of warning you prefer this uses?

@bsipocz
Copy link
Member

bsipocz commented Jul 19, 2024

I have issues with the alternative as it requires the users to know way more about SIA, SSA, etc.

So let me phrase it differently: are we ready to remove all usage of 'image' in the Navo material? If it's just a heads up warning (e.g. userwarning type) then it's fine not to and say something about it during the session, but we definitely should use something that raises a deprecation as that already marks the functionality for removal.

@trjaffe
Copy link
Contributor

trjaffe commented Jul 19, 2024

I have issues with the alternative as it requires the users to know way more about SIA, SSA, etc.

So let me phrase it differently: are we ready to remove all usage of 'image' in the Navo material? If it's just a heads up warning (e.g. userwarning type) then it's fine not to and say something about it during the session, but we definitely should use something that raises a deprecation as that already marks the functionality for removal.

We are not ready yet. So right now, it's a heads up. But we will be working on getting rid of our usage of it.

@msdemlei
Copy link
Contributor Author

msdemlei commented Jul 19, 2024 via email

@msdemlei
Copy link
Contributor Author

msdemlei commented Jul 22, 2024 via email

@bsipocz
Copy link
Member

bsipocz commented Jul 30, 2024

While I was looking into updating the navo material to switch out all the image and spectrum examples, I notice that we do have sia2 but don't have sia1 (only sia).
I see that we cannot get rid of sia as is to mean sia1, but nevertheless I think it would be better to add the more explicit sia1 and use that when teaching.

Do you think it fits into this PR, or should I rather open a follow-up to this one?

@msdemlei
Copy link
Contributor Author

msdemlei commented Aug 1, 2024 via email

@bsipocz
Copy link
Member

bsipocz commented Aug 1, 2024

Looking at the SIA classes, we kept the without number ones as SIAv1, so keeping sia is fine. In fact, we haven't introduced SIA1... classnames, but here I still think it would be useful for removing ambiguity.

@msdemlei msdemlei force-pushed the deprecate-image-and-spectrum branch from 5344176 to 9c50df4 Compare August 8, 2024 15:37
@msdemlei
Copy link
Contributor Author

msdemlei commented Aug 8, 2024 via email

@bsipocz
Copy link
Member

bsipocz commented Aug 8, 2024

OK, I'm totally fine with leaving the classes, and only have this servicetype 'sia1' alias. We may still want to add more explicit docstrings, but that is way out of scope for this PR.

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.

I think this can go in now once I have @tomdonaldson or @andamian gives a thumbs up, too.

However, I would like to cut it up into two PRs, will cherry-pick you second commit into a separate PR to backport for a 1.5.3 release, and keep the deprecation for 1.6.

(I'm happy to do this all as well as fixing the changelog conflict github complains about)

@msdemlei
Copy link
Contributor Author

msdemlei commented Aug 8, 2024 via email

Copy link
Contributor

@tomdonaldson tomdonaldson left a comment

Choose a reason for hiding this comment

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

This looks good. Thanks @msdemlei for the changes and @trjaffe and @bsipocz for the discussion.

In an attempt to accomodate the concerns brought up in
astropy#449 (comment),
we also explain a bit why image and spectrum are being deprecated.
we still raise deprecation warnings (rather than something else), as
that is, I think, what we are doing (and should be doing): We are saying
that we discourage people to use these two strings and reserve the
right to drop them one day.
@bsipocz bsipocz force-pushed the deprecate-image-and-spectrum branch from 9c50df4 to 2ddb7d2 Compare August 8, 2024 21:11
@bsipocz bsipocz added this to the v1.6 milestone Aug 8, 2024
@bsipocz bsipocz merged commit 197071f into astropy:main Aug 8, 2024
10 of 11 checks passed
@bsipocz
Copy link
Member

bsipocz commented Aug 8, 2024

Thank you!

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.

5 participants