Skip to content

Conversation

cbur24
Copy link
Contributor

@cbur24 cbur24 commented Jul 1, 2025

Notebook and accompanying plugin code and config that shows a simple example of creating a custom odc-stats plugin. The overall goal of the notebook is to provide guidance to EO scientists on how to translate their analysis code to odc-stats.

The notebook represents the limit of my understanding of odc-stats, so could do with input from others who may know a lot more than I do and can provide clarifications or edits to either the analysis or descriptions. There is also no descriptions of how and when to use fuser functions.

Aims:

  1. Demystify the use of odc-stats by demonstrating development of a minimal odc-stats plugin.
  2. Provide example code for running odc-stats functions within a local machine, thus demonstrating how to develop and test the development of an odc-stats "plugin".

This notebook was tested on the following odc libraries.

odc-algo 0.2.5.dev7+gadb1856
odc-cloud 0.2.5
odc-dscache 0.2.3
odc-geo 0.4.8
odc-io 0.2.2
odc-stac 0.3.10
odc-stats 1.0.78.dev6+gc38367b.d20250630
odc-ui 0.2.1
datacube 1.8.19

emmaai and others added 14 commits June 19, 2025 15:25
* update to 1.9 and use odc.geo; most tests passing

* expect dataset sources as list

* update test

* set XYSCALE=None explicitly to use odc-geo warp

* update reqs

* tests requirement with odc>1.9

* change time to timezone aware

* relocate loading from odc-algo

* delete cached stage periodically

* rename docker image workflow yaml

* update basics with pass

* update tflite runtime name

* add back stats and install newest numexpr

* switch from ubuntu to debian

* remove odc-stats

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix plugin import

* upgrade to odc>1.9

* update integration test

* add indexing test (#191)

Co-authored-by: Emma Ai <emma.ai@ga.gov.au>

* [pre-commit.ci] pre-commit autoupdate (#193)

updates:
- [github.com/adrienverge/yamllint.git: v1.37.0 → v1.37.1](https://github.com/adrienverge/yamllint.git/compare/v1.37.0...v1.37.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* update dependencies in test

* remove dask client from unit test

* update odc-algo hash

* update env variable with datacube>1.9

* remove pin on sqlalchemy

* lower pin numexpr

* update dependencies version

* remove expr_eval

* install numexpr from pypi

* fix typos

* update dependencies in test

* more typos

* save and retrieve info on fused product from properties explicitly

* always some typos

* update typing to 3.10

* unhacking lineage and metadata assemble

---------

Co-authored-by: Ariana Barzinpour <ariana.barzinpour@ga.gov.au>
Co-authored-by: Emma Ai <emma.ai@ga.gov.au>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates:
- [github.com/PyCQA/flake8: 7.2.0 → 7.3.0](PyCQA/flake8@7.2.0...7.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add cloud probability plugin

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix linting

* rm unneeded package

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update version

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

Attention: Patch coverage is 83.01486% with 80 lines in your changes missing coverage. Please review.

Please upload report for BASE (develop_1.8@7f34c86). Learn more about missing BASE report.

Files with missing lines Patch % Lines
odc/stats/io.py 68.42% 48 Missing ⚠️
odc/stats/model.py 73.80% 11 Missing ⚠️
odc/stats/_gjson.py 45.45% 6 Missing ⚠️
odc/stats/tasks.py 73.68% 5 Missing ⚠️
odc/stats/proc.py 66.66% 3 Missing ⚠️
odc/stats/_grouper.py 96.00% 2 Missing ⚠️
odc/stats/_text.py 91.66% 1 Missing ⚠️
odc/stats/plugins/lc_ml_treelite.py 80.00% 1 Missing ⚠️
odc/stats/plugins/lc_tf_urban.py 80.00% 1 Missing ⚠️
tests/__init__.py 50.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@              Coverage Diff               @@
##             develop_1.8     #197   +/-   ##
==============================================
  Coverage               ?   81.50%           
==============================================
  Files                  ?       53           
  Lines                  ?     4824           
  Branches               ?        0           
==============================================
  Hits                   ?     3932           
  Misses                 ?      892           
  Partials               ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cbur24 cbur24 closed this Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants