Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions python/python/stacrs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
from . import stacrs
from .stacrs import (
import pystac
Copy link
Member

Choose a reason for hiding this comment

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

It was an intentional decision to not import pystac at the top level — I'd like this library to be zero-dependency by default.

Copy link
Author

Choose a reason for hiding this comment

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

Oh, sorry, that was meant to be the internal .pystac.

from .pystac import (
migrate,
migrate_href,
read,
search,
search_to,
validate,
validate_href,
write,
)

__doc__ = stacrs.__doc__
from .stacrs import (
migrate_href,
search_to,
validate_href,
)

__doc__ = pystac.__doc__
__all__ = [
"migrate",
"migrate_href",
Expand Down
4 changes: 2 additions & 2 deletions python/python/stacrs/pystac.py
Copy link
Member

Choose a reason for hiding this comment

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

We'd want a test to confirm that this works.

Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def search(
... max_items=1,
... ))
"""
items = stacrs.search(
items_dict = stacrs.search(
href,
intersects=intersects,
ids=ids,
Expand All @@ -164,7 +164,7 @@ def search(
filter=filter,
query=query,
)
return (Item.from_dict(d) for d in items)
return ItemCollection(Item.from_dict(d) for d in items_dict)


def validate(
Expand Down
Loading