Repository: opendatacube/odc-tools (language: python)

Issue:
Proposal: Rename odc-index to odc-stac
I would like to propose we rename `odc-index` to `odc-stac`  at a "pypi project" level and at git filesystem level. We will still keep `odc.index.*` import for various datacube specific tools we have in there, but we would also include `odc.stac.*`  namespace in that same package. So the impact will be at `setup.{cfg,py}`  level initially, it's important to get naming right early on, these things are much harder after releases are made and started being used.

Package `odc-index` started off as a bunch of "missing tooling" for `datacube` index operations. Then we added some STAC to ODC adapters and hoping to add more. From user perspective it makes more sense to `pip install odc-stac` than `pip install odc-index` for the task of "working with STAC data", which will be the most likely external user-facing activity.
Proposal: Rename odc-index to odc-stac
I would like to propose we rename `odc-index` to `odc-stac`  at a "pypi project" level and at git filesystem level. We will still keep `odc.index.*` import for various datacube specific tools we have in there, but we would also include `odc.stac.*`  namespace in that same package. So the impact will be at `setup.{cfg,py}`  level initially, it's important to get naming right early on, these things are much harder after releases are made and started being used.

Package `odc-index` started off as a bunch of "missing tooling" for `datacube` index operations. Then we added some STAC to ODC adapters and hoping to add more. From user perspective it makes more sense to `pip install odc-stac` than `pip install odc-index` for the task of "working with STAC data", which will be the most likely external user-facing activity.


Discussion / hints:
ping: @alexgleith @gadomski 
I'm fully on board with this.

👍 from me
👍🏽
ping: @alexgleith @gadomski 
I'm fully on board with this.

👍 from me
👍🏽

Fix patch:
diff --git a/README.md b/README.md
index 475c0448d..3a9316e6c 100644
--- a/README.md
+++ b/README.md
@@ -20,14 +20,12 @@ Full list of libraries, and install instructions:
 - `odc.algo` algorithms (GeoMedian wrapper is here)
 - `odc.stats` large scale processing framework (under development)
 - `odc.ui` tools for data visualization in notebook/lab
-- `odc.index` extra utils for working with datacube database
-- `odc.aws` AWS/S3 utilities, used by apps mainly
-- `odc.aio` faster concurrent fetching from S3 with async, used by apps
+- `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.dtools` tools/experiments in the area of dask.distributed/dask<>datacube integration
 - `odc.geom` geometry utils and prototypes
-- `odc.ppt` parallel processing helper methods, internal lib
+- `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
 
 Pre-release of these libraries is on PyPI now, so can be installed with `pip`
@@ -37,15 +35,14 @@ pushed to `https://packages.dea.ga.gov.au`, and can be installed like so:
 ```
 pip install --extra-index-url="https://packages.dea.ga.gov.au" \
   odc-ui \
-  odc-index \
+  odc-stac \
   odc-stats \
   odc-geom \
   odc-algo \
   odc-io \
   odc-aws \
   odc-aio \
-  odc-dscache \
-  odc-dtools
+  odc-dscache
 ```
 
 **NOTE**: on Ubuntu 18.04 the default `pip` version is awfully old and does not
diff --git a/apps/dc_tools/setup.cfg b/apps/dc_tools/setup.cfg
index ce82867e4..0189c759f 100644
--- a/apps/dc_tools/setup.cfg
+++ b/apps/dc_tools/setup.cfg
@@ -29,7 +29,7 @@ install_requires =
     toolz
     pyyaml
     datacube
-    odc_index
+    odc_stac
     odc_io
     odc_aws
     odc_aio
diff --git a/libs/algo/setup.cfg b/libs/algo/setup.cfg
index 8f3bbfb83..df702661c 100644
--- a/libs/algo/setup.cfg
+++ b/libs/algo/setup.cfg
@@ -26,7 +26,7 @@ install_requires =
     xarray
     numpy
     toolz
-    odc-index
+    odc-stac
     datacube
     scikit-image
     dask_image
diff --git a/libs/dscache/setup.cfg b/libs/dscache/setup.cfg
index a6de75a32..52aa0b418 100644
--- a/libs/dscache/setup.cfg
+++ b/libs/dscache/setup.cfg
@@ -20,7 +20,7 @@ python_requires = >=3.6
 tests_require = pytest
 install_requires =
     datacube
-    odc-index
+    odc-stac
     zstandard
     lmdb
     click
diff --git a/libs/index/README.md b/libs/index/README.md
deleted file mode 100644
index 000f8b7b3..000000000
--- a/libs/index/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-odc.index
-=========
-
-Datacube index prototypes/tools
-
-Installation
-------------
-
-```
-pip install odc-index
-```
-
-Usage
------
-
-TODO
diff --git a/libs/stac/README.md b/libs/stac/README.md
new file mode 100644
index 000000000..d886f21e6
--- /dev/null
+++ b/libs/stac/README.md
@@ -0,0 +1,16 @@
+odc.stac
+========
+
+Tooling for converting STAC metadata to ODC data model.
+
+Installation
+------------
+
+```
+pip install odc-stac
+```
+
+Usage
+-----
+
+TODO
diff --git a/libs/index/odc/index/__init__.py b/libs/stac/odc/index/__init__.py
similarity index 96%
rename from libs/index/odc/index/__init__.py
rename to libs/stac/odc/index/__init__.py
index 3ecb3100d..c4e518969 100644
--- a/libs/index/odc/index/__init__.py
+++ b/libs/stac/odc/index/__init__.py
@@ -1,6 +1,6 @@
 """ Indexing related helper methods.
 """
-from ._version import __version__
+from ..stac._version import __version__
 
 from ._index import (
     from_metadata_stream,
diff --git a/libs/index/odc/index/_grouper.py b/libs/stac/odc/index/_grouper.py
similarity index 100%
rename from libs/index/odc/index/_grouper.py
rename to libs/stac/odc/index/_grouper.py
diff --git a/libs/index/odc/index/_index.py b/libs/stac/odc/index/_index.py
similarity index 100%
rename from libs/index/odc/index/_index.py
rename to libs/stac/odc/index/_index.py
diff --git a/libs/index/odc/index/_utm.py b/libs/stac/odc/index/_utm.py
similarity index 100%
rename from libs/index/odc/index/_utm.py
rename to libs/stac/odc/index/_utm.py
diff --git a/libs/index/odc/index/_uuid.py b/libs/stac/odc/index/_uuid.py
similarity index 100%
rename from libs/index/odc/index/_uuid.py
rename to libs/stac/odc/index/_uuid.py
diff --git a/libs/index/odc/index/_yaml.py b/libs/stac/odc/index/_yaml.py
similarity index 100%
rename from libs/index/odc/index/_yaml.py
rename to libs/stac/odc/index/_yaml.py
diff --git a/libs/index/odc/index/data/__init__.py b/libs/stac/odc/index/data/__init__.py
similarity index 100%
rename from libs/index/odc/index/data/__init__.py
rename to libs/stac/odc/index/data/__init__.py
diff --git a/libs/index/odc/index/data/ard_ls5.yaml b/libs/stac/odc/index/data/ard_ls5.yaml
similarity index 100%
rename from libs/index/odc/index/data/ard_ls5.yaml
rename to libs/stac/odc/index/data/ard_ls5.yaml
diff --git a/libs/index/odc/index/data/ard_ls7.yaml b/libs/stac/odc/index/data/ard_ls7.yaml
similarity index 100%
rename from libs/index/odc/index/data/ard_ls7.yaml
rename to libs/stac/odc/index/data/ard_ls7.yaml
diff --git a/libs/index/odc/index/data/ard_ls8.yaml b/libs/stac/odc/index/data/ard_ls8.yaml
similarity index 100%
rename from libs/index/odc/index/data/ard_ls8.yaml
rename to libs/stac/odc/index/data/ard_ls8.yaml
diff --git a/libs/index/odc/index/data/l1_ls5.yaml b/libs/stac/odc/index/data/l1_ls5.yaml
similarity index 100%
rename from libs/index/odc/index/data/l1_ls5.yaml
rename to libs/stac/odc/index/data/l1_ls5.yaml
diff --git a/libs/index/odc/index/data/l1_ls7.yaml b/libs/stac/odc/index/data/l1_ls7.yaml
similarity index 100%
rename from libs/index/odc/index/data/l1_ls7.yaml
rename to libs/stac/odc/index/data/l1_ls7.yaml
diff --git a/libs/index/odc/index/data/l1_ls8.yaml b/libs/stac/odc/index/data/l1_ls8.yaml
similarity index 100%
rename from libs/index/odc/index/data/l1_ls8.yaml
rename to libs/stac/odc/index/data/l1_ls8.yaml
diff --git a/libs/index/odc/index/data/metadata_eo3.yaml b/libs/stac/odc/index/data/metadata_eo3.yaml
similarity index 100%
rename from libs/index/odc/index/data/metadata_eo3.yaml
rename to libs/stac/odc/index/data/metadata_eo3.yaml
diff --git a/libs/index/odc/index/stac.py b/libs/stac/odc/index/stac.py
similarity index 100%
rename from libs/index/odc/index/stac.py
rename to libs/stac/odc/index/stac.py
diff --git a/libs/index/odc/stac/__init__.py b/libs/stac/odc/stac/__init__.py
similarity index 78%
rename from libs/index/odc/stac/__init__.py
rename to libs/stac/odc/stac/__init__.py
index 80ac8dd85..cc5f9bb7b 100644
--- a/libs/index/odc/stac/__init__.py
+++ b/libs/stac/odc/stac/__init__.py
@@ -1,6 +1,7 @@
 """
 STAC Item -> ODC Dataset[eo3]
 """
+from ._version import __version__
 
 from ._eo3 import (
     BandMetadata,
@@ -13,4 +14,5 @@
     "BandMetadata",
     "ConversionConfig",
     "stac2ds",
+    "__version__",
 )
diff --git a/libs/index/odc/stac/_eo3.py b/libs/stac/odc/stac/_eo3.py
similarity index 100%
rename from libs/index/odc/stac/_eo3.py
rename to libs/stac/odc/stac/_eo3.py
diff --git a/libs/index/odc/index/_version.py b/libs/stac/odc/stac/_version.py
similarity index 100%
rename from libs/index/odc/index/_version.py
rename to libs/stac/odc/stac/_version.py
diff --git a/libs/index/pyproject.toml b/libs/stac/pyproject.toml
similarity index 100%
rename from libs/index/pyproject.toml
rename to libs/stac/pyproject.toml
diff --git a/libs/index/setup.cfg b/libs/stac/setup.cfg
similarity index 81%
rename from libs/index/setup.cfg
rename to libs/stac/setup.cfg
index a51d19ae0..de8004619 100644
--- a/libs/index/setup.cfg
+++ b/libs/stac/setup.cfg
@@ -1,7 +1,7 @@
 [metadata]
-name = odc-index
-description = Datacube index prototypes/tools
-version = attr: odc.index._version.__version__
+name = odc-stac
+description = Tooling for converting STAC metadata to ODC data model
+version = attr: odc.stac._version.__version__
 author = Open Data Cube
 author_email =
 maintainer = Open Data Cube
diff --git a/libs/index/setup.py b/libs/stac/setup.py
similarity index 100%
rename from libs/index/setup.py
rename to libs/stac/setup.py
diff --git a/libs/stats/setup.cfg b/libs/stats/setup.cfg
index b1d54fb0c..5ee3a25cf 100644
--- a/libs/stats/setup.cfg
+++ b/libs/stats/setup.cfg
@@ -20,7 +20,7 @@ python_requires = >=3.6
 tests_require = pytest
 install_requires =
     datacube
-    odc_index
+    odc_stac
     odc_dscache
     odc_algo
     odc_aws
diff --git a/libs/ui/setup.cfg b/libs/ui/setup.cfg
index d37709595..3cb3f4855 100644
--- a/libs/ui/setup.cfg
+++ b/libs/ui/setup.cfg
@@ -21,7 +21,7 @@ tests_require = pytest
 install_requires =
     ipywidgets
     ipyleaflet
-    odc_index
+    odc_stac
     odc_algo
     jupyter_ui_poll
 


Test patch:
diff --git a/libs/index/tests/conftest.py b/libs/stac/tests/conftest.py
similarity index 100%
rename from libs/index/tests/conftest.py
rename to libs/stac/tests/conftest.py
diff --git a/libs/index/tests/data/LC08_L2SR_081119_20200101_20200823_02_T2.json b/libs/stac/tests/data/LC08_L2SR_081119_20200101_20200823_02_T2.json
similarity index 100%
rename from libs/index/tests/data/LC08_L2SR_081119_20200101_20200823_02_T2.json
rename to libs/stac/tests/data/LC08_L2SR_081119_20200101_20200823_02_T2.json
diff --git a/libs/index/tests/data/S2A_28QCH_20200714_0_L2A.json b/libs/stac/tests/data/S2A_28QCH_20200714_0_L2A.json
similarity index 100%
rename from libs/index/tests/data/S2A_28QCH_20200714_0_L2A.json
rename to libs/stac/tests/data/S2A_28QCH_20200714_0_L2A.json
diff --git a/libs/index/tests/data/S2A_28QCH_20200714_0_L2A.odc-metadata.json b/libs/stac/tests/data/S2A_28QCH_20200714_0_L2A.odc-metadata.json
similarity index 100%
rename from libs/index/tests/data/S2A_28QCH_20200714_0_L2A.odc-metadata.json
rename to libs/stac/tests/data/S2A_28QCH_20200714_0_L2A.odc-metadata.json
diff --git a/libs/index/tests/data/S2B_MSIL2A_20190629T212529_R043_T06VVN_20201006T080531.json b/libs/stac/tests/data/S2B_MSIL2A_20190629T212529_R043_T06VVN_20201006T080531.json
similarity index 100%
rename from libs/index/tests/data/S2B_MSIL2A_20190629T212529_R043_T06VVN_20201006T080531.json
rename to libs/stac/tests/data/S2B_MSIL2A_20190629T212529_R043_T06VVN_20201006T080531.json
diff --git a/libs/index/tests/data/ga_ls8c_ard_3-1-0_088080_2020-05-25_final.odc-metadata.yaml b/libs/stac/tests/data/ga_ls8c_ard_3-1-0_088080_2020-05-25_final.odc-metadata.yaml
similarity index 100%
rename from libs/index/tests/data/ga_ls8c_ard_3-1-0_088080_2020-05-25_final.odc-metadata.yaml
rename to libs/stac/tests/data/ga_ls8c_ard_3-1-0_088080_2020-05-25_final.odc-metadata.yaml
diff --git a/libs/index/tests/data/ga_ls8c_ard_3-1-0_088080_2020-05-25_final.stac-item.json b/libs/stac/tests/data/ga_ls8c_ard_3-1-0_088080_2020-05-25_final.stac-item.json
similarity index 100%
rename from libs/index/tests/data/ga_ls8c_ard_3-1-0_088080_2020-05-25_final.stac-item.json
rename to libs/stac/tests/data/ga_ls8c_ard_3-1-0_088080_2020-05-25_final.stac-item.json
diff --git a/libs/index/tests/data/lidar_dem.json b/libs/stac/tests/data/lidar_dem.json
similarity index 100%
rename from libs/index/tests/data/lidar_dem.json
rename to libs/stac/tests/data/lidar_dem.json
diff --git a/libs/index/tests/test_stac_eo3.py b/libs/stac/tests/test_stac_eo3.py
similarity index 100%
rename from libs/index/tests/test_stac_eo3.py
rename to libs/stac/tests/test_stac_eo3.py
diff --git a/libs/index/tests/test_stac_transform.py b/libs/stac/tests/test_stac_transform.py
similarity index 100%
rename from libs/index/tests/test_stac_transform.py
rename to libs/stac/tests/test_stac_transform.py