-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #439 +/- ##
=======================================
Coverage 79.93% 79.94%
=======================================
Files 52 52
Lines 6016 6018 +2
=======================================
+ Hits 4809 4811 +2
Misses 1207 1207
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this 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?
@deprecated("1.5", "ivoid2service does not work in the presence of" | ||
" multiple capabilities. Use" | ||
" registry.search(ivoid=...)[0].get_service('capname') instead.") |
There was a problem hiding this comment.
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
@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')") |
253f0d9
to
920b186
Compare
On Wed, Apr 19, 2023 at 10:16:42AM -0700, Brigitta Sipőcz wrote:
@bsipocz commented on this pull request.
> ***@***.***("1.5", "ivoid2service does not work in the presence of"
+ " multiple capabilities. Use"
+ " registry.search(ivoid=...)[0].get_service('capname') instead.")
Maybe chop up the `message` arg to `message` and `alternative`
I considered that but then read the argument description "alternative
function or class name", which to me didn't sound free-text-ish
enough to put in something very definitely not just a name.
If you tell me "trust me, it's ok", I'll make the change. Do you?
|
On Wed, Apr 19, 2023 at 10:14:19AM -0700, Brigitta Sipőcz wrote:
@bsipocz approved this pull request.
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?
No -- which is part of the reason why I'd like to scupper it: it's
not only a bad API, it would also require a lot of scaffolding (bad)
or a remote test (worse) to test.
|
Actually, it's not OK. 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.
920b186
to
86e3dfe
Compare
Thank you Markus! |
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.