Skip to content

Commit

Permalink
Merge pull request #16 from stactools-packages/dev
Browse files Browse the repository at this point in the history
New bucket location
  • Loading branch information
fredliporace authored Feb 7, 2024
2 parents efa95f4 + 0b3197b commit 9a23908
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ repos:
- id: mypy
additional_dependencies:
- click != 8.1.0
- stactools == 0.4.7
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ number as needed.

### Added

- Nothing.
- New bucket prefix ([#15](https://github.com/stactools-packages/amazonia-1/issues/15)).

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apt-get -y -q update \
RUN python -m venv /opt/venv
RUN pip install . --no-binary rasterio \
&& ls /opt/venv \
&& rm -r /opt/venv/lib/python3.10/site-packages/stactools/amazonia_1
&& rm -r /opt/venv/lib/python3.11/site-packages/stactools/amazonia_1


FROM dependencies as builder
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ packages = find_namespace:
install_requires =
stactools >= 0.4.2
utm
requests

[options.packages.find]
where = src
4 changes: 2 additions & 2 deletions src/stactools/amazonia_1/stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,9 @@ def create_item(asset_href: str) -> Item:
)

# Metadata bucket
meta_prefix = "https://s3.amazonaws.com/amazonia-meta-pds/"
meta_prefix = "https://brazil-eosats.s3.amazonaws.com/"
# COG bucket
main_prefix = "s3://amazonia-pds/"
main_prefix = "s3://brazil-eosats/"

# Thumbnail asset
item.add_asset(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from stactools.amazonia_1.commands import create_amazonia1_command


class CommandsTest(CliTestCase):
class CommandsTest(CliTestCase): # type: ignore
"""CommandsTest."""

def create_subcommand_functions(self) -> List[Callable[[Group], Command]]:
Expand Down
14 changes: 7 additions & 7 deletions tests/test_stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,24 @@ def test_create_item() -> None:
in item.stac_extensions
)
assert (
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
in item.stac_extensions
)

# assets
assert (
item.assets["thumbnail"].href
== "https://s3.amazonaws.com/amazonia-meta-pds/AMAZONIA1/WFI/036/018/"
== "https://brazil-eosats.s3.amazonaws.com/AMAZONIA1/WFI/036/018/"
"AMAZONIA_1_WFI_20220811_036_018_L4/AMAZONIA_1_WFI_20220811_036_018.png"
)
assert (
item.assets["metadata"].href
== "s3://amazonia-pds/AMAZONIA1/WFI/036/018/AMAZONIA_1_WFI_20220811_036_018_L4/"
== "s3://brazil-eosats/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://amazonia-pds/AMAZONIA1/WFI/036/018/AMAZONIA_1_WFI_20220811_036_018_L4/"
== "s3://brazil-eosats/AMAZONIA1/WFI/036/018/AMAZONIA_1_WFI_20220811_036_018_L4/"
"AMAZONIA_1_WFI_20220811_036_018_L4_BAND2.tif"
)

Expand Down Expand Up @@ -153,17 +153,17 @@ def test_create_item() -> None:
# assets
assert (
item.assets["thumbnail"].href
== "https://s3.amazonaws.com/amazonia-meta-pds/AMAZONIA1/WFI/033/018/"
== "https://brazil-eosats.s3.amazonaws.com/AMAZONIA1/WFI/033/018/"
"AMAZONIA_1_WFI_20220810_033_018_L4/AMAZONIA_1_WFI_20220810_033_018.png"
)
assert (
item.assets["metadata"].href
== "s3://amazonia-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/"
== "s3://brazil-eosats/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://amazonia-pds/AMAZONIA1/WFI/033/018/AMAZONIA_1_WFI_20220810_033_018_L4/"
== "s3://brazil-eosats/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 9a23908

Please sign in to comment.