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

[Issue 504] add "detail=min" parameter #634

Merged
merged 4 commits into from
Jan 14, 2025
Merged

Conversation

chmmao
Copy link
Contributor

@chmmao chmmao commented Dec 23, 2024

This is an attempt to address the Issue #504 by adding an additional parameter "detail=min" to the tables function.
When running the following code:

from pyvo import registry
registry.search(registry.Spatial((10, 10)), registry.Freetext("egal")) 

The runtime improves from 2s down to 1.2s (on my machine), while the output size is unchanged.

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.31%. Comparing base (a9ac860) to head (86e52de).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #634   +/-   ##
=======================================
  Coverage   82.31%   82.31%           
=======================================
  Files          72       72           
  Lines        7429     7429           
=======================================
  Hits         6115     6115           
  Misses       1314     1314           

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

@ManonMarchand
Copy link
Member

Hi and thanks for looking into this.

Two remarks:

  1. This should be an option.

These details are interesting in some occasions.

The registry sub-module could then use the minimal details option per default, as I don't see where this could affect the users (but maybe I'm missing something? @msdemlei ?)

  1. What about services that don't support details=min ?

I tried calling this on one VOSI 1.0 service that does not support details=min (namely SIMBAD TAP service) and it looks like this does not raise an error, the maximum details is returned. But I'm not sure that this would be the expected behavior for every VOSI 1.0 service.

@msdemlei
Copy link
Contributor

msdemlei commented Jan 7, 2025 via email

@ManonMarchand
Copy link
Member

ManonMarchand commented Jan 7, 2025

Then it looks to me like no API change is needed, so I'll add the 1.6.1 milestone so that the changelog entry can be added. Don't hesitate to call for help if you have issues making the CI tests pass, @chmmao

@ManonMarchand ManonMarchand added this to the v1.6.1 milestone Jan 7, 2025
@chmmao
Copy link
Contributor Author

chmmao commented Jan 14, 2025

Thanks for your responses. I am wondering what is happening in the dal/tests/testadhoc.py and registry/tests/test_regtap.py so that the CI-devtests failed.. Not quite sure what should I do there.
@ManonMarchand @msdemlei

@bsipocz
Copy link
Member

bsipocz commented Jan 14, 2025

The devtest failures (astropy deprecation related) are unrelated and fixed separately waiting for final review.

The other failures in the remote-data tests seem to be present on the main branch, too and maybe @ManonMarchand can have a look at them separately.

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.

Thank you! I rephrased the changelog, but given the discussion on the PR this seems to be good to go now.

CHANGES.rst Outdated Show resolved Hide resolved
@bsipocz bsipocz linked an issue Jan 14, 2025 that may be closed by this pull request
@bsipocz
Copy link
Member

bsipocz commented Jan 14, 2025

Thank you @chmmao. While this not really a bugfix but an enhancement, I think we can keep it in the bugfix release as the performance improvement seems to be non-negligible.

@bsipocz bsipocz merged commit 6796209 into astropy:main Jan 14, 2025
8 of 11 checks passed
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.

Support VOSI 1.1 detail=min
4 participants