-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: safely import azure-storage-blob and boto3
- Loading branch information
1 parent
d80b5cd
commit 69198e5
Showing
7 changed files
with
96 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ channels: | |
- conda-forge | ||
|
||
dependencies: | ||
- python =3.8 | ||
- python =3.10 | ||
|
||
# odc-geo dependencies | ||
- pyproj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,10 +54,14 @@ tiff = | |
s3 = | ||
boto3 | ||
|
||
az = | ||
azure-storage-blob | ||
|
||
all = | ||
%(warp)s | ||
%(tiff)s | ||
%(s3)s | ||
%(az)s | ||
|
||
test = | ||
pytest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
from odc.geo.cog._s3 import MultiPartUpload | ||
"""Tests for odc.geo.cog._s3.""" | ||
|
||
from odc.geo.cog._s3 import S3MultiPartUpload | ||
|
||
# TODO: moto | ||
|
||
|
||
def test_s3_mpu(): | ||
mpu = MultiPartUpload("bucket", "file.dat") | ||
assert mpu.bucket == "bucket" | ||
assert mpu.key == "file.dat" | ||
"""Test S3MultiPartUpload class initialization.""" | ||
mpu = S3MultiPartUpload("bucket", "file.dat") | ||
if mpu.bucket != "bucket": | ||
raise ValueError("Invalid bucket") | ||
if mpu.key != "file.dat": | ||
raise ValueError("Invalid key") |