dea-tools 0.3.7.dev10__tar.gz → 0.3.7.dev17__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. dea_tools-0.3.7.dev17/.gitignore +11 -0
  2. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/LICENSE +1 -1
  3. dea_tools-0.3.7.dev17/PKG-INFO +199 -0
  4. dea_tools-0.3.7.dev17/README_tools.md +102 -0
  5. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/temporal.py +6 -2
  6. dea_tools-0.3.7.dev17/pyproject.toml +236 -0
  7. dea_tools-0.3.7.dev10/.gitignore +0 -7
  8. dea_tools-0.3.7.dev10/MANIFEST.in +0 -1
  9. dea_tools-0.3.7.dev10/PKG-INFO +0 -190
  10. dea_tools-0.3.7.dev10/README.rst +0 -109
  11. dea_tools-0.3.7.dev10/dea_tools.egg-info/PKG-INFO +0 -190
  12. dea_tools-0.3.7.dev10/dea_tools.egg-info/SOURCES.txt +0 -41
  13. dea_tools-0.3.7.dev10/dea_tools.egg-info/dependency_links.txt +0 -1
  14. dea_tools-0.3.7.dev10/dea_tools.egg-info/requires.txt +0 -52
  15. dea_tools-0.3.7.dev10/dea_tools.egg-info/top_level.txt +0 -1
  16. dea_tools-0.3.7.dev10/index.rst +0 -69
  17. dea_tools-0.3.7.dev10/mock_imports.txt +0 -60
  18. dea_tools-0.3.7.dev10/pyproject.toml +0 -4
  19. dea_tools-0.3.7.dev10/setup.cfg +0 -4
  20. dea_tools-0.3.7.dev10/setup.py +0 -172
  21. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/__init__.py +0 -0
  22. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/__main__.py +0 -0
  23. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/__init__.py +0 -0
  24. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/animations.py +0 -0
  25. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/changefilmstrips.py +0 -0
  26. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/crophealth.py +0 -0
  27. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/deacoastlines.py +0 -0
  28. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/geomedian.py +0 -0
  29. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/imageexport.py +0 -0
  30. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/miningrehab.py +0 -0
  31. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/wetlandsinsighttool.py +0 -0
  32. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/app/widgetconstructors.py +0 -0
  33. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/bandindices.py +0 -0
  34. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/bom.py +0 -0
  35. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/classification.py +0 -0
  36. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/coastal.py +0 -0
  37. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/dask.py +0 -0
  38. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/datahandling.py +0 -0
  39. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/landcover.py +0 -0
  40. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/maps.py +0 -0
  41. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/plotting.py +0 -0
  42. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/pyfes_model.py +0 -0
  43. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/spatial.py +0 -0
  44. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/validation.py +0 -0
  45. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/waterbodies.py +0 -0
  46. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/wetlands.py +0 -0
  47. {dea_tools-0.3.7.dev10 → dea_tools-0.3.7.dev17}/dea_tools/wit_app.py +0 -0
@@ -0,0 +1,11 @@
1
+ *.py~
2
+ *~
3
+ .ipynb_checkpoints
4
+ */.ipynb_checkpoints/*
5
+ *.tif
6
+ *.xml
7
+ __pycache__
8
+ Tools/gen
9
+ dist
10
+ .coverage
11
+ uv.lock
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2020 Geoscience Australia
189
+ Copyright [yyyy] [name of copyright owner]
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -0,0 +1,199 @@
1
+ Metadata-Version: 2.4
2
+ Name: dea-tools
3
+ Version: 0.3.7.dev17
4
+ Summary: Functions and algorithms for analysing Digital Earth Australia data.
5
+ Project-URL: Homepage, https://github.com/GeoscienceAustralia/dea-notebooks
6
+ Project-URL: Repository, https://github.com/GeoscienceAustralia/dea-notebooks
7
+ Author-email: Geoscience Australia <earth.observation@ga.gov.au>
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Keywords: datacube,digital earth australia,earth observation,geospatial analysis,remote sensing,satellite data
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering :: GIS
21
+ Requires-Python: <4.0,>=3.10
22
+ Requires-Dist: aiohttp>=3.5.0
23
+ Requires-Dist: dask-ml>=2023.3.24
24
+ Requires-Dist: dask>=2023.1.0
25
+ Requires-Dist: fiona>=1.10.0
26
+ Requires-Dist: folium>=0.16.0
27
+ Requires-Dist: geopandas>=0.10.0
28
+ Requires-Dist: geopy>=2.0.0
29
+ Requires-Dist: imageio>=2.20.0
30
+ Requires-Dist: joblib>=1.0.0
31
+ Requires-Dist: lxml>=5.0.0
32
+ Requires-Dist: matplotlib>=3.8.0
33
+ Requires-Dist: numba>=0.57.0
34
+ Requires-Dist: numpy>=1.26.0
35
+ Requires-Dist: odc-algo>=1.0.0
36
+ Requires-Dist: odc-geo[tiff]>=0.4.7
37
+ Requires-Dist: owslib>=0.26.0
38
+ Requires-Dist: packaging>=22.0
39
+ Requires-Dist: pandas>=2.2.0
40
+ Requires-Dist: pyproj>=3.7.0
41
+ Requires-Dist: pytmd==2.1.6
42
+ Requires-Dist: pytz>=2022.1
43
+ Requires-Dist: rasterio>=1.3.11
44
+ Requires-Dist: rasterstats>=0.16.0
45
+ Requires-Dist: requests>=2.25.0
46
+ Requires-Dist: rioxarray>=0.10.0
47
+ Requires-Dist: scikit-image>=0.22.0
48
+ Requires-Dist: scikit-learn>=1.4.0
49
+ Requires-Dist: scipy>=1.14.1
50
+ Requires-Dist: seaborn>=0.10.0
51
+ Requires-Dist: shapely>=2.0.5
52
+ Requires-Dist: tqdm>=4.55.0
53
+ Requires-Dist: traitlets>=5.0.0
54
+ Requires-Dist: xarray>=2022.3.0
55
+ Provides-Extra: all
56
+ Requires-Dist: affine>=2.3.1; extra == 'all'
57
+ Requires-Dist: bs4>=0.0.1; extra == 'all'
58
+ Requires-Dist: cmocean>=3.0.0; extra == 'all'
59
+ Requires-Dist: contextily>=1.3.0; extra == 'all'
60
+ Requires-Dist: dask-gateway>=2023.1.0; extra == 'all'
61
+ Requires-Dist: datacube>=1.8.5; extra == 'all'
62
+ Requires-Dist: gcsfs>=2022.1.0; extra == 'all'
63
+ Requires-Dist: hdstats>=0.1.8.post1; extra == 'all'
64
+ Requires-Dist: ipyleaflet>=0.17.0; extra == 'all'
65
+ Requires-Dist: jupyter>=1.0.0; extra == 'all'
66
+ Requires-Dist: odc-stac[botocore]>=0.3.0; extra == 'all'
67
+ Requires-Dist: odc-ui>=0.2.1; extra == 'all'
68
+ Requires-Dist: opencv-python>=4.6.0.66; extra == 'all'
69
+ Requires-Dist: planetary-computer>=1.0.0; extra == 'all'
70
+ Requires-Dist: pydotplus>=2.0.0; extra == 'all'
71
+ Requires-Dist: pystac-client>=0.8.3; extra == 'all'
72
+ Requires-Dist: statsmodels>=0.14.0; extra == 'all'
73
+ Provides-Extra: dask-gateway
74
+ Requires-Dist: dask-gateway>=2023.1.0; extra == 'dask-gateway'
75
+ Provides-Extra: datacube
76
+ Requires-Dist: datacube>=1.8.5; extra == 'datacube'
77
+ Requires-Dist: odc-ui>=0.2.1; extra == 'datacube'
78
+ Provides-Extra: hdstats
79
+ Requires-Dist: hdstats>=0.1.8.post1; extra == 'hdstats'
80
+ Provides-Extra: jupyter
81
+ Requires-Dist: ipyleaflet>=0.17.0; extra == 'jupyter'
82
+ Requires-Dist: jupyter>=1.0.0; extra == 'jupyter'
83
+ Provides-Extra: notebooks
84
+ Requires-Dist: affine>=2.3.1; extra == 'notebooks'
85
+ Requires-Dist: bs4>=0.0.1; extra == 'notebooks'
86
+ Requires-Dist: cmocean>=3.0.0; extra == 'notebooks'
87
+ Requires-Dist: contextily>=1.3.0; extra == 'notebooks'
88
+ Requires-Dist: gcsfs>=2022.1.0; extra == 'notebooks'
89
+ Requires-Dist: opencv-python>=4.6.0.66; extra == 'notebooks'
90
+ Requires-Dist: pydotplus>=2.0.0; extra == 'notebooks'
91
+ Requires-Dist: statsmodels>=0.14.0; extra == 'notebooks'
92
+ Provides-Extra: stac
93
+ Requires-Dist: odc-stac[botocore]>=0.3.0; extra == 'stac'
94
+ Requires-Dist: planetary-computer>=1.0.0; extra == 'stac'
95
+ Requires-Dist: pystac-client>=0.8.3; extra == 'stac'
96
+ Description-Content-Type: text/markdown
97
+
98
+ # dea-tools Python package
99
+
100
+ The `dea-tools` Python package provides a collection of functions and algorithms for geospatial analysis using Open Data Cube, Xarray, and Digital Earth Australia.
101
+ It includes utilities for loading data, plotting, spatial and temporal analysis, and applying machine learning to satellite data.
102
+
103
+ The package is organised into the following modules:
104
+
105
+ * `dea_tools.datahandling`: Tools for loading and managing DEA data (e.g. combining products, handling CRSs, pansharpening)
106
+ * `dea_tools.plotting`: Plotting tools for DEA data (e.g. RGB composites, animations, interactive maps)
107
+ * `dea_tools.bandindices`: Functions to calculate remote sensing indices (e.g. NDVI, NDWI)
108
+ * `dea_tools.spatial`: Spatial analysis utilities (e.g. rasterisation, vectorisation, contours, image processing)
109
+ * `dea_tools.temporal`: Tools for temporal analysis (e.g. phenology, time-series statistics, multi-dimensional regression)
110
+ * `dea_tools.classification`: Machine learning utilities (e.g. training and applying models on satellite data)
111
+ * `dea_tools.dask`: Utilities for parallel processing with Dask (e.g. creating scalable Dask clusters)
112
+ * `dea_tools.landcover`: Tools for accessing and visualising DEA Land Cover data
113
+ * `dea_tools.coastal`: Coastal and intertidal analysis tools (e.g. tidal tagging, coastal change time series)
114
+ * `dea_tools.bom`: Accessing Bureau of Meteorology water data (e.g. gauge and discharge data)
115
+ * `dea_tools.waterbodies`: Accessing and analysing DEA Waterbodies data (e.g. loading waterbody time series)
116
+ * `dea_tools.maps`: Tools for interactive mapping (e.g. folium and ipyleaflet maps)
117
+ * `dea_tools.validation`: Tools for generating validation statistics (e.g. RMSE, R2, correlations)
118
+
119
+ ## API documentation
120
+
121
+ A rendered version of the `dea-tools` API is available on the DEA Knowledge Hub (https://knowledge.dea.ga.gov.au/notebooks/Tools/).
122
+
123
+ ## Installation
124
+
125
+ You can install `dea-tools` from PyPI with `pip` (https://pypi.org/project/dea-tools/).
126
+ By default `dea-tools` will be installed with [minimal dependencies](https://github.com/GeoscienceAustralia/dea-notebooks/blob/develop/pyproject.toml), which excludes `datacube` and other difficult to install packages.
127
+
128
+ ```console
129
+ pip install dea-tools
130
+ ```
131
+
132
+ To install with `datacube` dependencies:
133
+ ```console
134
+ pip install dea-tools[datacube]
135
+ ```
136
+
137
+ To install with additonal STAC-loading dependencies:
138
+ ```console
139
+ pip install dea-tools[stac]
140
+ ```
141
+
142
+ To install with additonal Jupyter-related dependencies:
143
+ ```console
144
+ pip install dea-tools[jupyter]
145
+ ```
146
+
147
+ To install with other packages used in DEA Notebooks examples:
148
+ ```console
149
+ pip install dea-tools[jupyter,dask_gateway,hdstats,notebooks]
150
+ ```
151
+
152
+ You can also install `dea-tools` with *all* optional dependencies. **Note:** some of these dependencies are difficult to install. If you encounter issues, you may need to try the [Conda](#with-conda) instructions below.
153
+ ```console
154
+ pip install dea-tools[all]
155
+ ```
156
+
157
+ ### With conda
158
+
159
+ If you encounter issues with the installation, try installing the package in a `conda` Python environment where [GDAL](https://pypi.org/project/GDAL/) and [pyproj](https://pypi.org/project/pyproj/) are already installed:
160
+
161
+ ```console
162
+ wget -O conda-environment.yml https://raw.githubusercontent.com/opendatacube/datacube-core/develop/conda-environment.yml
163
+
164
+ mamba env create -f conda-environment.yml
165
+ conda activate cubeenv
166
+
167
+ pip install dea-tools
168
+ ```
169
+
170
+ ### Working on DEA Sandbox or NCI
171
+
172
+ To work with this module on the DEA Sandbox or National Computational Infrastructure environments without installing it, you can add the `Tools` directory to the system path from within your `dea-notebooks` directory:
173
+
174
+ ```python
175
+ import sys
176
+ sys.path.insert(1, "../Tools/")
177
+ import dea_tools.datahandling # or some other submodule
178
+ ```
179
+
180
+ Alternatively, you can also do a local installation of `dea-tools`. To do this on the DEA Sandbox, run `pip` from the terminal from within your `dea-notebooks` directory:
181
+
182
+ ```bash
183
+ pip install -e .
184
+ ```
185
+
186
+ ## Importing functions in Python
187
+
188
+ One `dea-tools` is installed, you can import functions using:
189
+
190
+ ```python
191
+ from dea_tools.datahandling import load_ard
192
+ from dea_tools.plotting import rgb
193
+ ```
194
+
195
+ ## Citing DEA Tools
196
+
197
+ If you use any of the notebooks, code or tools in this repository in your work, please reference them using the following citation:
198
+
199
+ > Krause, C., Dunn, B., Bishop-Taylor, R., Adams, C., Burton, C., Alger, M., Chua, S., Phillips, C., Newey, V., Kouzoubov, K., Leith, A., Ayers, D., Hicks, A., DEA Notebooks contributors 2021. Digital Earth Australia notebooks and tools repository. Geoscience Australia, Canberra. https://doi.org/10.26186/145234
@@ -0,0 +1,102 @@
1
+ # dea-tools Python package
2
+
3
+ The `dea-tools` Python package provides a collection of functions and algorithms for geospatial analysis using Open Data Cube, Xarray, and Digital Earth Australia.
4
+ It includes utilities for loading data, plotting, spatial and temporal analysis, and applying machine learning to satellite data.
5
+
6
+ The package is organised into the following modules:
7
+
8
+ * `dea_tools.datahandling`: Tools for loading and managing DEA data (e.g. combining products, handling CRSs, pansharpening)
9
+ * `dea_tools.plotting`: Plotting tools for DEA data (e.g. RGB composites, animations, interactive maps)
10
+ * `dea_tools.bandindices`: Functions to calculate remote sensing indices (e.g. NDVI, NDWI)
11
+ * `dea_tools.spatial`: Spatial analysis utilities (e.g. rasterisation, vectorisation, contours, image processing)
12
+ * `dea_tools.temporal`: Tools for temporal analysis (e.g. phenology, time-series statistics, multi-dimensional regression)
13
+ * `dea_tools.classification`: Machine learning utilities (e.g. training and applying models on satellite data)
14
+ * `dea_tools.dask`: Utilities for parallel processing with Dask (e.g. creating scalable Dask clusters)
15
+ * `dea_tools.landcover`: Tools for accessing and visualising DEA Land Cover data
16
+ * `dea_tools.coastal`: Coastal and intertidal analysis tools (e.g. tidal tagging, coastal change time series)
17
+ * `dea_tools.bom`: Accessing Bureau of Meteorology water data (e.g. gauge and discharge data)
18
+ * `dea_tools.waterbodies`: Accessing and analysing DEA Waterbodies data (e.g. loading waterbody time series)
19
+ * `dea_tools.maps`: Tools for interactive mapping (e.g. folium and ipyleaflet maps)
20
+ * `dea_tools.validation`: Tools for generating validation statistics (e.g. RMSE, R2, correlations)
21
+
22
+ ## API documentation
23
+
24
+ A rendered version of the `dea-tools` API is available on the DEA Knowledge Hub (https://knowledge.dea.ga.gov.au/notebooks/Tools/).
25
+
26
+ ## Installation
27
+
28
+ You can install `dea-tools` from PyPI with `pip` (https://pypi.org/project/dea-tools/).
29
+ By default `dea-tools` will be installed with [minimal dependencies](https://github.com/GeoscienceAustralia/dea-notebooks/blob/develop/pyproject.toml), which excludes `datacube` and other difficult to install packages.
30
+
31
+ ```console
32
+ pip install dea-tools
33
+ ```
34
+
35
+ To install with `datacube` dependencies:
36
+ ```console
37
+ pip install dea-tools[datacube]
38
+ ```
39
+
40
+ To install with additonal STAC-loading dependencies:
41
+ ```console
42
+ pip install dea-tools[stac]
43
+ ```
44
+
45
+ To install with additonal Jupyter-related dependencies:
46
+ ```console
47
+ pip install dea-tools[jupyter]
48
+ ```
49
+
50
+ To install with other packages used in DEA Notebooks examples:
51
+ ```console
52
+ pip install dea-tools[jupyter,dask_gateway,hdstats,notebooks]
53
+ ```
54
+
55
+ You can also install `dea-tools` with *all* optional dependencies. **Note:** some of these dependencies are difficult to install. If you encounter issues, you may need to try the [Conda](#with-conda) instructions below.
56
+ ```console
57
+ pip install dea-tools[all]
58
+ ```
59
+
60
+ ### With conda
61
+
62
+ If you encounter issues with the installation, try installing the package in a `conda` Python environment where [GDAL](https://pypi.org/project/GDAL/) and [pyproj](https://pypi.org/project/pyproj/) are already installed:
63
+
64
+ ```console
65
+ wget -O conda-environment.yml https://raw.githubusercontent.com/opendatacube/datacube-core/develop/conda-environment.yml
66
+
67
+ mamba env create -f conda-environment.yml
68
+ conda activate cubeenv
69
+
70
+ pip install dea-tools
71
+ ```
72
+
73
+ ### Working on DEA Sandbox or NCI
74
+
75
+ To work with this module on the DEA Sandbox or National Computational Infrastructure environments without installing it, you can add the `Tools` directory to the system path from within your `dea-notebooks` directory:
76
+
77
+ ```python
78
+ import sys
79
+ sys.path.insert(1, "../Tools/")
80
+ import dea_tools.datahandling # or some other submodule
81
+ ```
82
+
83
+ Alternatively, you can also do a local installation of `dea-tools`. To do this on the DEA Sandbox, run `pip` from the terminal from within your `dea-notebooks` directory:
84
+
85
+ ```bash
86
+ pip install -e .
87
+ ```
88
+
89
+ ## Importing functions in Python
90
+
91
+ One `dea-tools` is installed, you can import functions using:
92
+
93
+ ```python
94
+ from dea_tools.datahandling import load_ard
95
+ from dea_tools.plotting import rgb
96
+ ```
97
+
98
+ ## Citing DEA Tools
99
+
100
+ If you use any of the notebooks, code or tools in this repository in your work, please reference them using the following citation:
101
+
102
+ > Krause, C., Dunn, B., Bishop-Taylor, R., Adams, C., Burton, C., Alger, M., Chua, S., Phillips, C., Newey, V., Kouzoubov, K., Leith, A., Ayers, D., Hicks, A., DEA Notebooks contributors 2021. Digital Earth Australia notebooks and tools repository. Geoscience Australia, Canberra. https://doi.org/10.26186/145234
@@ -22,7 +22,6 @@ Last modified: May 2024
22
22
  import sys
23
23
  import dask
24
24
  import dask.array as da
25
- import hdstats
26
25
  import warnings
27
26
  import numpy as np
28
27
  import xarray as xr
@@ -434,8 +433,13 @@ def temporal_statistics(da, stats):
434
433
  temporal statistics
435
434
 
436
435
  """
436
+ # Attempt to import hdstats and raise an error if not available
437
+ try:
438
+ import hdstats
439
+ except ImportError:
440
+ raise ImportError("`hdstats` is required for `temporal_statistics`. Please install the `[hdstats]` dependency.")
437
441
 
438
- # if dask arrays then map the blocks
442
+ # If dask arrays then map the blocks
439
443
  if dask.is_dask_collection(da):
440
444
  if version.parse(xr.__version__) < version.parse("0.16.0"):
441
445
  raise TypeError(
@@ -0,0 +1,236 @@
1
+ [project]
2
+ name = "dea-tools"
3
+ dynamic = ["version"]
4
+ description = "Functions and algorithms for analysing Digital Earth Australia data."
5
+ authors = [
6
+ { name = "Geoscience Australia", email = "earth.observation@ga.gov.au" }
7
+ ]
8
+ readme = "README_tools.md"
9
+ license = "Apache-2.0"
10
+ keywords = [
11
+ "earth observation",
12
+ "satellite data",
13
+ "geospatial analysis",
14
+ "remote sensing",
15
+ "digital earth australia",
16
+ "datacube",
17
+ ]
18
+ classifiers = [
19
+ "Development Status :: 3 - Alpha",
20
+ "Intended Audience :: Science/Research",
21
+ "Topic :: Scientific/Engineering :: GIS",
22
+ "License :: OSI Approved :: Apache Software License",
23
+ "Programming Language :: Python",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Programming Language :: Python :: 3.13",
29
+ ]
30
+ requires-python = ">=3.10,<4.0"
31
+ dependencies = [
32
+ "aiohttp>=3.5.0",
33
+ # "ciso8601>=2.2.0", # blocks Python 3.13 installation on Windows
34
+ "dask>=2023.1.0",
35
+ "dask-ml>=2023.3.24",
36
+ # "eo-tides>=0.7.4", # requires notebook updates
37
+ "fiona>=1.10.0",
38
+ "folium>=0.16.0",
39
+ "geopandas>=0.10.0",
40
+ "geopy>=2.0.0",
41
+ "imageio>=2.20.0",
42
+ "joblib>=1.0.0",
43
+ "lxml>=5.0.0",
44
+ "matplotlib>=3.8.0",
45
+ "numba>=0.57.0",
46
+ "numpy>=1.26.0",
47
+ "odc-algo>=1.0.0",
48
+ "odc-geo[tiff]>=0.4.7",
49
+ "OWSLib>=0.26.0",
50
+ "packaging>=22.0",
51
+ "pandas>=2.2.0",
52
+ "pyproj>=3.7.0",
53
+ "pyTMD==2.1.6",
54
+ "pytz>=2022.1",
55
+ "rasterio>=1.3.11",
56
+ "rasterstats>=0.16.0",
57
+ "requests>=2.25.0",
58
+ "rioxarray>=0.10.0",
59
+ "seaborn>=0.10.0",
60
+ "scikit-image>=0.22.0",
61
+ "scikit-learn>=1.4.0",
62
+ "scipy>=1.14.1",
63
+ "shapely>=2.0.5",
64
+ "traitlets>=5.0.0",
65
+ "tqdm>=4.55.0",
66
+ "xarray>=2022.3.0",
67
+ ]
68
+
69
+ [project.urls]
70
+ Homepage = "https://github.com/GeoscienceAustralia/dea-notebooks"
71
+ Repository = "https://github.com/GeoscienceAustralia/dea-notebooks"
72
+
73
+ [project.optional-dependencies]
74
+ all = ["dea-tools[datacube,stac,jupyter,dask_gateway,hdstats,notebooks]"]
75
+ datacube = [
76
+ "datacube>=1.8.5",
77
+ "odc-ui>=0.2.1",
78
+ # "datacube-ows>=1.8.30", # has unwanted psycopg2 dependency
79
+ ]
80
+ stac = [
81
+ "odc-stac[botocore]>=0.3.0",
82
+ "pystac-client>=0.8.3",
83
+ "planetary_computer>=1.0.0",
84
+ ]
85
+ jupyter = [
86
+ "jupyter>=1.0.0",
87
+ "ipyleaflet>=0.17.0",
88
+ ]
89
+ dask_gateway = [
90
+ "dask_gateway>=2023.1.0",
91
+ ]
92
+ hdstats = [
93
+ "hdstats>=0.1.8.post1",
94
+ ]
95
+ notebooks = [
96
+ "cmocean>=3.0.0",
97
+ "affine>=2.3.1",
98
+ "statsmodels>=0.14.0",
99
+ "gcsfs>=2022.1.0",
100
+ "contextily>=1.3.0",
101
+ "bs4>=0.0.1", # needs to be updated to beautifulsoup4
102
+ "pydotplus>=2.0.0",
103
+ "opencv-python>=4.6.0.66",
104
+ ]
105
+
106
+ [dependency-groups]
107
+ dev = [
108
+ "pytest>=6.0.0",
109
+ "pytest-cov>=0.6",
110
+ "ruff>=0.1.0",
111
+ "deptry>=0.20.0",
112
+ ]
113
+
114
+ ##################################################
115
+ # Configuration required to build Python package #
116
+ ##################################################
117
+
118
+ [build-system]
119
+ requires = ["hatchling", "hatch-vcs"]
120
+ build-backend = "hatchling.build"
121
+
122
+ [tool.hatch.build]
123
+ sources = ["Tools"]
124
+ include = [ # only include DEA Tools in package, not notebooks
125
+ "Tools/dea_tools/**",
126
+ "LICENSE",
127
+ "pyproject.toml",
128
+ "README_tools.md",
129
+ ]
130
+
131
+ [tool.hatch.version]
132
+ source = "vcs"
133
+
134
+ [tool.hatch.version.raw-options]
135
+ local_scheme = "no-local-version"
136
+
137
+ ###############################################################
138
+ # Configuration required to apply code formatting and linting #
139
+ ###############################################################
140
+
141
+ [tool.ruff]
142
+ target-version = "py310"
143
+ line-length = 120
144
+ fix = false
145
+ lint.select = [
146
+ "I", # Import sorting
147
+ "W", # PyCodeStyle warnings
148
+ "F", # Pyflakes (unused vars, imports, etc.)
149
+ "E", # pycodestyle (spacing, etc.)
150
+ "B006", # Mutable default args
151
+ "B007", # Reusing loop variables
152
+ "C4", # Catch incorrect use of comprehensions, dict, list, etc
153
+ "ISC", # Correct use of string concatenation
154
+ "ICN", # Common import conventions
155
+ "RET", # Good return practices
156
+ "SIM", # Common simplification rules
157
+ "TID", # Some good import practices
158
+ "PTH", # Use pathlib instead of os.path
159
+ ]
160
+ lint.ignore = [
161
+ "E501", # Don't enforce line length
162
+ "SIM105", # contextlib.suppress
163
+ ]
164
+
165
+ [tool.ruff.lint.per-file-ignores]
166
+ "Tests/**" = [
167
+ "S101", # Allow `assert` in test files
168
+ ]
169
+
170
+ [tool.ruff.format]
171
+ preview = true
172
+
173
+ #############################################################
174
+ # Configuration required to run tests and generate coverage #
175
+ #############################################################
176
+
177
+ [tool.pytest.ini_options]
178
+ testpaths = ["Tests"]
179
+
180
+ [tool.coverage.report]
181
+ skip_empty = true
182
+ exclude_lines = [
183
+ "pragma: no cover",
184
+ "if TYPE_CHECKING:",
185
+ ]
186
+
187
+ [tool.coverage.run]
188
+ branch = true
189
+ source = ["Tools/dea_tools"]
190
+
191
+ ########################################################
192
+ # Configuration required to check package dependencies #
193
+ ########################################################
194
+
195
+ [tool.deptry]
196
+ exclude = ["venv", ".venv", ".pytest_cache", ".direnv", "Tests/*", ".git"]
197
+
198
+ [tool.deptry.package_module_name_map]
199
+ ipython = "IPython"
200
+ opencv-python = "cv2"
201
+
202
+ [tool.deptry.per_rule_ignores]
203
+ # Project should not contain missing dependencies
204
+ DEP001 = [
205
+ "ciso8601", # currently hard to install, candidate for removal
206
+ "datacube_ows", # currently hard to install, candidate for removal
207
+ "otps", # to fix with eo-tides refactor
208
+ "pyfes", # to fix with eo-tides refactor
209
+ "intertidal", # to fix with Sandbox upgrade
210
+ "osgeo", # ignore due to confusion with gdal package
211
+ "ipywidgets", # covered by jupyter metapackage
212
+ "IPython", # covered by jupyter metapackage
213
+ ]
214
+ # Project should not contain unused dependencies
215
+ DEP002 = [
216
+ "dea-tools", # ignore dea-tools being mistaken for dependency
217
+ "jupyter", # included for local environment creation
218
+ "pystac-client", # included for local STAC support
219
+ "odc-stac", # included for local STAC support
220
+ "planetary_computer", # included for STAC support
221
+ "eo-tides", # to fix with eo-tides refactor
222
+ "odc-ui", # ignore `odc.ui` not being recognised as `odc-ui`
223
+ "numba", # required to enforce minimum version of llvmlite
224
+ ]
225
+ # Project should not use transitive dependencies
226
+ DEP003 = [
227
+ "pyTMD", # to fix with eo-tides refactor
228
+ "ipywidgets", # covered by jupyter metapackage
229
+ "IPython", # covered by jupyter metapackage
230
+ ]
231
+
232
+ # To run code cov:
233
+ # `uv run pytest --cov --cov-config=pyproject.toml --cov-report=term`
234
+ # To run deptry:
235
+ # `uv run deptry Tools`
236
+ # `uv run deptry .`
@@ -1,7 +0,0 @@
1
- build/*
2
- *.egg-info/*
3
- dist/*
4
- *.pyc
5
-
6
- # setuptools_scm/versioning hacks
7
- dea_tools/__version__.py
@@ -1 +0,0 @@
1
- include README.rst LICENSE