Skip to content

Commit

Permalink
custom StacIO init needs to call parent init (#1308)
Browse files Browse the repository at this point in the history
* custom StacIO init needs to call parent init

* Add changelog entry for docs update.

* Update CHANGELOG.md

---------

Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
  • Loading branch information
tylere and gadomski authored Feb 8, 2024
1 parent 8004c10 commit 8079dd3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Made item pickles smaller by changing how nested links are stored([#1285](https://github.com/stac-utils/pystac/pull/1285))
- Add APILayoutStrategy ([#1294](https://github.com/stac-utils/pystac/pull/1294))
- Allow setting a default layout strategy for Catalog ([#1295](https://github.com/stac-utils/pystac/pull/1295))
- Updated documentation code examples that use AWS S3 for file storage ([#1308](https://github.com/stac-utils/pystac/pull/1308)

### Fixed

Expand Down
1 change: 1 addition & 0 deletions docs/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ for reading from AWS's S3 cloud object storage using `boto3
class CustomStacIO(DefaultStacIO):
def __init__(self):
self.s3 = boto3.resource("s3")
super().__init__()
def read_text(
self, source: Union[str, Link], *args: Any, **kwargs: Any
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/how-to-create-stac-catalogs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3142,6 +3142,7 @@
"class CustomStacIO(DefaultStacIO):\n",
" def __init__(self):\n",
" self.s3 = boto3.resource(\"s3\")\n",
" super().__init__()\n",
"\n",
" def read_text(self, source: Union[str, Link], *args: Any, **kwargs: Any) -> str:\n",
" parsed = urlparse(source)\n",
Expand Down Expand Up @@ -3599,7 +3600,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.12.1"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 8079dd3

Please sign in to comment.