Skip to content

Commit

Permalink
Merge pull request #13 from stactools-packages/initial
Browse files Browse the repository at this point in the history
Fix bucket prefix
  • Loading branch information
fredliporace authored Jun 26, 2023
2 parents d2ac0c7 + 745fc3a commit 1d5cb42
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ number as needed.

### Fixed

- Nothing.
- Fixed bucket prefix ([#13](https://github.com/stactools-packages/amazonia-1/pull/13)).

## [0.1.1] - 2023-06-23

Expand Down
10 changes: 5 additions & 5 deletions examples/AMAZONIA_1_WFI_20220810_033_018.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
"type": "image/png"
},
"metadata": {
"href": "s3://cbers-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND2.xml",
"href": "s3://amazonia-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND2.xml",
"type": "application/xml",
"title": "INPE original metadata"
},
"B1": {
"href": "s3://cbers-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND1.tif",
"href": "s3://amazonia-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND1.tif",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"eo:bands": [
{
Expand All @@ -70,7 +70,7 @@
]
},
"B2": {
"href": "s3://cbers-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND2.tif",
"href": "s3://amazonia-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND2.tif",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"eo:bands": [
{
Expand All @@ -80,7 +80,7 @@
]
},
"B3": {
"href": "s3://cbers-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND3.tif",
"href": "s3://amazonia-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND3.tif",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"eo:bands": [
{
Expand All @@ -90,7 +90,7 @@
]
},
"B4": {
"href": "s3://cbers-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND4.tif",
"href": "s3://amazonia-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND4.tif",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"eo:bands": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/stactools/amazonia_1/stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def create_item(asset_href: str) -> Item:
# Metadata bucket
meta_prefix = "https://s3.amazonaws.com/amazonia-meta-pds/"
# COG bucket
main_prefix = "s3://cbers-pds/"
main_prefix = "s3://amazonia-pds/"

# Thumbnail asset
item.add_asset(
Expand Down
8 changes: 4 additions & 4 deletions tests/test_stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ def test_create_item() -> None:
)
assert (
item.assets["metadata"].href
== "s3://cbers-pds/AMAZONIA1/WFI/036/018/AMAZONIA_1_WFI_20220811_036_018_L4/"
== "s3://amazonia-pds/AMAZONIA1/WFI/036/018/AMAZONIA_1_WFI_20220811_036_018_L4/"
"AMAZONIA_1_WFI_20220811_036_018_L4_BAND2.xml"
)
assert (
item.assets["B2"].href
== "s3://cbers-pds/AMAZONIA1/WFI/036/018/AMAZONIA_1_WFI_20220811_036_018_L4/"
== "s3://amazonia-pds/AMAZONIA1/WFI/036/018/AMAZONIA_1_WFI_20220811_036_018_L4/"
"AMAZONIA_1_WFI_20220811_036_018_L4_BAND2.tif"
)

Expand Down Expand Up @@ -158,12 +158,12 @@ def test_create_item() -> None:
)
assert (
item.assets["metadata"].href
== "s3://cbers-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/"
== "s3://amazonia-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/"
"AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND2.xml"
)
assert (
item.assets["B2"].href
== "s3://cbers-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/"
== "s3://amazonia-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/"
"AMAZONIA_1_WFI_20220810_033_018_L4_LEFT_BAND2.tif"
)

Expand Down

0 comments on commit 1d5cb42

Please sign in to comment.