Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello astroquery maintainers 🙂 !
In the former API, we had two fields
membership
andlink_bibcode
that would hint whether the object had parents. I did not replace those in the rewrite from #2954 as I didn't find them easy to use, and they did not have a direct equivalent in the relational schema.This PR, adds a new query method
query_hierarchy
to replace them. The behavior is based on what people can see on the webpages in the hierarchy section. You can either ask for parents, children, or siblings of the object.Ex on NGC4038's page:
![image](https://private-user-images.githubusercontent.com/16650466/402908819-f9117a11-ed1e-4c50-9809-38ad3fa264c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODI5NTksIm5iZiI6MTczOTM4MjY1OSwicGF0aCI6Ii8xNjY1MDQ2Ni80MDI5MDg4MTktZjkxMTdhMTEtZWQxZS00YzUwLTk4MDktMzhhZDNmYTI2NGMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE3NTA1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIzMjI3NjE1Y2M5NTliZDYyMWEwNzE0N2FmY2NiM2M3MGJlOWU0NmMyODM1YjY4Zjc1YjFlZTBjNTA0OTdjYjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.vDuqfDQWPt1vMjwioeLyI4L-XKaU1DOybKkjA_sOO8c)
The two fields from before (
membership
andlink_bibcode
) are only returned if the users ask for them with the argumentdetailed_hierarchy
. This is toggled off by default as it has a tendency of duplicating the results a lot (see the example in the new documentation section).