This repository provides developmental libraries and CLI tools for Open Datacube.
Full list of libraries, and install instructions:
odc.ui
tools for data visualization in notebook/labodc.io
common IO utilities, used by apps mainlyodc-cloud[ASYNC,AZURE,THREDDS]
cloud crawling support package
odc.aws
AWS/S3 utilities, used by apps mainlyodc.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]
odc.stats
large scale processing framework (Moved to odc-stats)odc.stac
STAC to ODC conversion tools (Moved to odc-stac)odc.dscache
experimental key-value store where key=UUID
, value=Dataset
(moved to odc-dscache)Libraries and applications in this repository are published to PyPI, and can be installed \
with pip
like so:
pip install \
odc-ui \
odc-stac \
odc-stats \
odc-io \
odc-cloud[ASYNC] \
odc-dscache
Some odc-tools are available via conda
from the conda-forge
channel.
conda install -c conda-forge odc-apps-dc-tools odc-io odc-cloud
Cloud tools depend on the aiobotocore
package, which depends on specific
versions of botocore
. Another package we use, boto3
, also depends on
specific versions of botocore
. As a result, having both aiobotocore
and
boto3
in one environment can be a bit tricky. The way to solve this
is to install aiobotocore[awscli,boto3]
before anything else, which will install
compatible versions of boto3
and awscli
into the environment.
pip install -U "aiobotocore[awscli,boto3]==1.3.3"
# OR for conda setups
conda install "aiobotocore==1.3.3" boto3 awscli
pip install odc-apps-cloud
pip install odc-apps-cloud[GCP,THREDDS]
dc-index-from-tar
(indexing to datacube from tar archive)
pip install odc-apps-dc-tools
s3-find
list S3 bucket with wildcards3-to-tar
fetch documents from S3 and dump them to a tar archivegs-to-tar
search GS for documents and dump them to a tar archivedc-index-from-tar
read yaml documents from a tar archive and add them to datacubeExample:
#!/bin/bash
s3_src='s3://dea-public-data/L2/sentinel-2-nrt/**/*.yaml'
s3-find "${s3_src}" | \
s3-to-tar | \
dc-index-from-tar --env s2 --ignore-lineage
Fastest way to list regularly placed files is to use fixed depth listing:
#!/bin/bash
# only works when your metadata is same depth and has fixed file name
s3_src='s3://dea-public-data/L2/sentinel-2-nrt/S2MSIARD/*/*/ARD-METADATA.yaml'
s3-find --skip-check "${s3_src}" | \
s3-to-tar | \
dc-index-from-tar --env s2 --ignore-lineage
When using Google Storage:
#!/bin/bash
# Google Storage support
gs-to-tar --bucket data.deadev.com --prefix mangrove_cover
dc-index-from-tar --protocol gs --env mangroves --ignore-lineage metadata.tar.gz
The following steps are used in the GitHub Actions workflow main.yml
# build environment from file
mamba env create -f tests/test-env.yml
# this environment name is defined in tests/test-env.yml file
conda activate odc-tools-tests
# install additional packages
./scripts/dev-install.sh --no-deps
# setup database for testing
./scripts/setup-test-db.sh
# run test
echo "Running Tests"
pytest --cov=. \
--cov-report=html \
--cov-report=xml:coverage.xml \
--timeout=30 \
libs apps
# Optional, to delete the environment
conda env remove -n odc-tools-tests
Use conda env update -f <file>
to install all needed dependencies for
odc-tools
libraries and apps.
{lib,app}/{pkg}/odc/{pkg}/_version.py
file to increase version numberdevelop
branch via a Pull Requestpypi/publish
branch to match develop
Steps 3 and 4 can be done by an authorized user with
./scripts/sync-publish-branch.sh
script.
Publishing to PyPi happens automatically when changes are
pushed to the protected pypi/publish
branch. Only members of Open Datacube
Admins group have the
permission to push to this branch.