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 ivoid2service. #439

Merged
merged 1 commit into from
Apr 21, 2023
Merged

Conversation

msdemlei
Copy link
Contributor

The problem with it is that when a resource has multiple capabilities (e.g., SCS and TAP, as is now true for the big majority of VO resources), its result is ill-defined.

One could add a parameter to select the kind of service desired, but that's complicated in detail. Hence, we advise people to use normal registry search with an ivoid constraint.

This is supposed to address Bug #425.

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Merging #439 (86e3dfe) into main (915b496) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #439   +/-   ##
=======================================
  Coverage   79.93%   79.94%           
=======================================
  Files          52       52           
  Lines        6016     6018    +2     
=======================================
+ Hits         4809     4811    +2     
  Misses       1207     1207           
Impacted Files Coverage Δ
pyvo/registry/regtap.py 79.76% <100.00%> (+0.15%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

This will need a changelog entry, but otherwise all good.

The only thing I wonder that why this doesn't trigger a CI failure, didn't we have test coverage for ivoid2service?

Comment on lines +899 to +901
@deprecated("1.5", "ivoid2service does not work in the presence of"
" multiple capabilities. Use"
" registry.search(ivoid=...)[0].get_service('capname') instead.")
Copy link
Member

Choose a reason for hiding this comment

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

Maybe chop up the message arg to message and alternative

Suggested change
@deprecated("1.5", "ivoid2service does not work in the presence of"
" multiple capabilities. Use"
" registry.search(ivoid=...)[0].get_service('capname') instead.")
@deprecated("1.5", message="ivoid2service does not work in the presence of multiple capabilities",
alternative=" registry.search(ivoid=...)[0].get_service('capname')")

@msdemlei
Copy link
Contributor Author

msdemlei commented Apr 20, 2023 via email

@msdemlei
Copy link
Contributor Author

msdemlei commented Apr 20, 2023 via email

@bsipocz
Copy link
Member

bsipocz commented Apr 21, 2023

If you tell me "trust me, it's ok", I'll make the change. Do you?

Actually, it's not OK. alternative accepts a free text, but unfortunately when message is provided, it overrides it all. The behaviour is somewhat different than what I would have expected. So what you have here is in fact better.
I'm sorry for the noise.

In the meantime, merging the other PR introduced a changelog conflict, I'll go ahead and rebase and then merge this.

The problem with it is that when a resource has multiple capabilities
(e.g., SCS and TAP, as is now true for the big majority of VO resources),
its result is ill-defined.

One *could* add a parameter to select the kind of service desired, but
that's complicated in detail.  Hence, we advise people to use normal
registry search with an ivoid constraint.

This is supposed to address Bug astropy#425.
@bsipocz bsipocz added this to the v1.5 milestone Apr 21, 2023
@bsipocz bsipocz merged commit a897483 into astropy:main Apr 21, 2023
10 checks passed
@bsipocz
Copy link
Member

bsipocz commented Apr 21, 2023

Thank you Markus!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants