Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge cloud libs into one package (#331) #343

Merged
merged 1 commit into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ Full list of libraries, and install instructions:
- `odc.stac` STAC to ODC conversion tools
- `odc.dscache` experimental key-value store where `key=UUID`, `value=Dataset`
- `odc.io` common IO utilities, used by apps mainly
- `odc.aws` AWS/S3 utilities, used by apps mainly
- `odc.aio` faster concurrent fetching from S3 with async, used by apps
- `odc.{thredds,azure}` internal libs for cloud IO
- `odc-cloud[ASYNC,AZURE,THREDDS]` cloud crawling support package
- `odc.aws` AWS/S3 utilities, used by apps mainly
- `odc.aio` faster concurrent fetching from S3 with async, used by apps `odc-cloud[ASYNC]`
- `odc.{thredds,azure}` internal libs for cloud IO `odc-cloud[THREDDS,AZURE]`

Pre-release of these libraries is on PyPI now, so can be installed with `pip`
"the normal way". Most recent development versions of `odc-tools` packages are
Expand All @@ -38,8 +39,7 @@ pip install --extra-index-url="https://packages.dea.ga.gov.au" \
odc-stats \
odc-algo \
odc-io \
odc-aws \
odc-aio \
odc-cloud[ASYNC] \
odc-dscache
```

Expand Down
9 changes: 4 additions & 5 deletions apps/cloud/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ packages = find_namespace:
python_requires = >=3.6
tests_require = pytest
install_requires =
odc_aws
odc_io
odc_aio
odc-cloud[ASYNC]
odc-io
click

[options.extras_require]
THREDDS = odc-thredds
AZURE = odc-azure
THREDDS = odc-cloud[THREDDS]
AZURE = odc-cloud[AZURE]
GCP = google-cloud-storage

[options.entry_points]
Expand Down
14 changes: 9 additions & 5 deletions apps/dc_tools/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ install_requires =
datacube
odc_stac
odc_io
odc_aws
odc_aio
odc-cloud
odc-cloud[ASYNC]
pystac>=1.0.0

[options.extras_require]
tests = pytest; deepdiff; pytest-depends
AZURE = odc_azure
THREDDS = odc_thredds
tests =
pytest
deepdiff
pytest-depends

AZURE = odc-cloud[AZURE]
THREDDS = odc-cloud[THREDDS]

[options.entry_points]
console_scripts =
Expand Down
34 changes: 0 additions & 34 deletions libs/aio/README.md

This file was deleted.

1 change: 0 additions & 1 deletion libs/aio/odc/aio/_version.py

This file was deleted.

28 changes: 0 additions & 28 deletions libs/aio/setup.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion libs/algo/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install_requires =
hdstats = hdstats>=0.1.7.post5
s3 =
boto3
odc-aws
odc-cloud

[options.packages.find]
include =
Expand Down
18 changes: 0 additions & 18 deletions libs/aws/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions libs/aws/pyproject.toml

This file was deleted.

3 changes: 0 additions & 3 deletions libs/aws/setup.py

This file was deleted.

1 change: 0 additions & 1 deletion libs/azure/odc/azure/_version.py

This file was deleted.

3 changes: 0 additions & 3 deletions libs/azure/pyproject.toml

This file was deleted.

26 changes: 0 additions & 26 deletions libs/azure/setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions libs/azure/setup.py

This file was deleted.

24 changes: 24 additions & 0 deletions libs/cloud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
odc.cloud
=========

Various cloud access helper methods.

This package ships several namespaces:

- `odc.aws.` S3 and other AWS resources
- `odc.aio.` S3 but async, depends (needs `[ASYNC]` feature flag, pulls in `aiobotocore`)
- `odc.azure.` Azure blob storage traversal helpers (needs `[AZURE]` feature flag)
- `odc.thredds.` THREDDS traversal helper method (needs `[THREDDS]` feature flag)


Installation
------------

```
pip install odc-cloud
```

Usage
-----

TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ._version import __version__
from ..cloud._version import __version__
import logging

import botocore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Helper methods for working with AWS
"""
from ._version import __version__
from ..cloud._version import __version__
import os
import botocore
import botocore.session
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Azure blob storage crawling and YAML fetching utilities
"""
from ._version import __version__
from ..cloud._version import __version__
from azure.storage.blob import ContainerClient, BlobClient
from typing import List, Tuple, Optional
from multiprocessing.dummy import Pool as ThreadPool
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Thredds crawling and YAML fetching utilities
"""
from ._version import __version__
from ..cloud._version import __version__
from thredds_crawler.crawl import Crawl
import requests
from urllib.parse import urlparse
Expand Down
File renamed without changes.
13 changes: 11 additions & 2 deletions libs/aws/setup.cfg → libs/cloud/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = odc-aws
name = odc-cloud
description = Various AWS helper methods
version = attr: odc.aws._version.__version__
version = attr: odc.cloud._version.__version__
author = Open Data Cube
author_email =
maintainer = Open Data Cube
Expand All @@ -22,6 +22,15 @@ install_requires =
botocore
boto3

[options.extras_require]
THREDDS =
thredds_crawler
requests

AZURE = azure-storage-blob
ASYNC = aiobotocore[boto3]>=1.0


[options.packages.find]
include =
odc*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions libs/stats/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ install_requires =
datacube
distributed
numpy
odc_aio
odc-cloud[ASYNC]
odc_algo
odc_aws
odc_dscache
odc_io
odc_stac
Expand Down
1 change: 0 additions & 1 deletion libs/thredds/odc/thredds/_version.py

This file was deleted.

3 changes: 0 additions & 3 deletions libs/thredds/pyproject.toml

This file was deleted.

27 changes: 0 additions & 27 deletions libs/thredds/setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions libs/thredds/setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion staging/dnsup/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ packages = find_namespace:
python_requires = >=3.6
tests_require = pytest
install_requires =
odc_aws
odc-cloud

[options.entry_points]
console_scripts =
Expand Down