I was trying to call get_all_collections to recursively get all collections within a root catalog. It turned out that only collections of the root catalog and its direct children are returned.
Looking at the code
|
def get_all_collections(self) -> Iterable[Collection]: |
def get_all_collections(self) -> Iterable[Collection]:
"""Get all collections from this catalog and all subcatalogs. Will traverse
any subcatalogs recursively."""
yield from self.get_collections()
for child in self.get_children():
yield from child.get_collections()
It seems that it's expected to only return collections from self and children.
Is it intentional or a bug?
I was trying to call
get_all_collectionsto recursively get all collections within a root catalog. It turned out that only collections of the root catalog and its direct children are returned.Looking at the code
pystac/pystac/catalog.py
Line 455 in ff67de3
It seems that it's expected to only return collections from self and children.
Is it intentional or a bug?