Skip to content

Commit

Permalink
Fix the "how to create STAC catalogs" tutorial (#775)
Browse files Browse the repository at this point in the history
* docs: fix creating catalogs tutorial

* docs: fix concepts python

* chore: update changelog

Co-authored-by: Jon Duckworth <duckontheweb@gmail.com>
  • Loading branch information
gadomski and duckontheweb authored Mar 30, 2022
1 parent 3209bf8 commit 443828f
Show file tree
Hide file tree
Showing 3 changed files with 509 additions and 652 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

### Fixed

- "How to create STAC catalogs" tutorial ([#775](https://github.com/stac-utils/pystac/pull/775))

## [v1.4.0]

### Added
Expand Down
7 changes: 3 additions & 4 deletions docs/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ for reading from AWS's S3 cloud object storage using `boto3
from pystac.stac_io import DefaultStacIO, StacIO
class CustomStacIO(DefaultStacIO):
def __init__():
def __init__(self):
self.s3 = boto3.resource("s3")
def read_text(
Expand All @@ -302,8 +302,7 @@ for reading from AWS's S3 cloud object storage using `boto3
if parsed.scheme == "s3":
bucket = parsed.netloc
key = parsed.path[1:]
s3 = boto3.resource("s3")
s3.Object(bucket, key).put(Body=txt, ContentEncoding="utf-8")
self.s3.Object(bucket, key).put(Body=txt, ContentEncoding="utf-8")
else:
super().write_text(dest, txt, *args, **kwargs)
Expand All @@ -322,7 +321,7 @@ to take advantage of connection pooling using a `requests.Session
from pystac.stac_io import DefaultStacIO, StacIO
class ConnectionPoolingIO(DefaultStacIO):
def __init__():
def __init__(self):
self.session = requests.Session()
def read_text(
Expand Down
Loading

0 comments on commit 443828f

Please sign in to comment.