{"id":28507396,"url":"https://github.com/opendatacube/datacube-explorer","last_synced_at":"2026-02-10T07:10:23.851Z","repository":{"id":36968907,"uuid":"64436705","full_name":"opendatacube/datacube-explorer","owner":"opendatacube","description":"Web-based exploration of Open Data Cube collections","archived":false,"fork":false,"pushed_at":"2025-07-03T00:01:10.000Z","size":38208,"stargazers_count":58,"open_issues_count":39,"forks_count":33,"subscribers_count":12,"default_branch":"develop","last_synced_at":"2025-07-03T00:29:47.946Z","etag":null,"topics":["flask","gis","hacktoberfest","opendatacube"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opendatacube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-07-29T00:16:06.000Z","updated_at":"2025-07-02T23:55:23.000Z","dependencies_parsed_at":"2023-10-14T18:49:26.416Z","dependency_job_id":"19a1a938-b537-4f9f-8101-0d4952d9965e","html_url":"https://github.com/opendatacube/datacube-explorer","commit_stats":{"total_commits":2112,"total_committers":34,"mean_commits":62.11764705882353,"dds":"0.36363636363636365","last_synced_commit":"7a2e05f98a4a186b6c0b4a34fe91b0e705c6b384"},"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"purl":"pkg:github/opendatacube/datacube-explorer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendatacube%2Fdatacube-explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendatacube%2Fdatacube-explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendatacube%2Fdatacube-explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendatacube%2Fdatacube-explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opendatacube","download_url":"https://codeload.github.com/opendatacube/datacube-explorer/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendatacube%2Fdatacube-explorer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263239701,"owners_count":23435678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","gis","hacktoberfest","opendatacube"],"created_at":"2025-06-08T20:31:04.331Z","updated_at":"2026-02-10T07:10:23.802Z","avatar_url":"https://github.com/opendatacube.png","language":"JavaScript","funding_links":[],"categories":["Open Data Cube"],"sub_categories":["Testing your code"],"readme":"# Data Cube Explorer\n[![Linting](https://github.com/opendatacube/datacube-explorer/workflows/Linting/badge.svg)](https://github.com/opendatacube/datacube-explorer/actions?query=workflow%3ALinting)\n[![Tests](https://github.com/opendatacube/datacube-explorer/workflows/Tests/badge.svg)](https://github.com/opendatacube/datacube-explorer/actions?query=workflow%3ATests)\n[![Docker](https://github.com/opendatacube/datacube-explorer/workflows/Docker/badge.svg)](https://github.com/opendatacube/datacube-explorer/actions?query=workflow%3ADocker)\n[![Scan](https://github.com/opendatacube/datacube-explorer/workflows/Scan/badge.svg)](https://github.com/opendatacube/datacube-explorer/actions?query=workflow%3AScan)\n[![coverage](https://codecov.io/gh/opendatacube/datacube-explorer/branch/develop/graph/badge.svg)](https://codecov.io/gh/opendatacube/datacube-explorer)\n[![Doc](https://readthedocs.org/projects/datacube-explorer/badge/?version=latest)](http://datacube-explorer.readthedocs.org/en/latest/)\n\n![Explorer Screenshot](screenshot.png)\n\n## Usage (quick-start)\n\nAssuming you already have an Open Data Cube instance, Explorer will use\nits existing settings.\n\nInstall Explorer:\n\n    pip install datacube-explorer\n\nGenerate summaries for all of your products:\n\n    cubedash-gen --init --all\n\nRun Explorer locally:\n\n    cubedash-run\n\nIt will now be viewable on [http://localhost:8090](https://localhost:8090)\n\n## Developer Setup\n\nThese directions are for running from a local folder in development. But it will run from any typical Python WSGI server.\n\nFirstly, install the Open Data Cube. Use of a [Data Cube conda environment](https://datacube-core.readthedocs.io/en/latest/installation/setup/common_install.html)\nis recommended. You may need to also `conda install -c conda-forge postgis`\n\nTest that you can run `datacube system check`, and that it's connecting\nto the correct datacube instance.\n\n### Dependencies\n\nNow install the explorer dependencies:\n\n    # These two should come from conda if you're using it, not pypi\n    conda install fiona shapely\n\n    pip install -e .\n\n### Summary generation\n\nInitialise and create product summaries:\n\n    cubedash-gen --init --all\n\n(This can take a long time the first time, depending on your datacube size.)\n\nOther available options can be seen by running `cubedash-gen --help`.\n\n### Run\n\nA `cubedash-run` command is available to run Explorer locally:\n\n    $ cubedash-run\n        * Running on http://localhost:8080/ (Press CTRL+C to quit)\n\n(see `cubedash-run --help` for list of options)\n\nBut Explorer can be run using any typical Python WSGI server, for example [gunicorn](https://gunicorn.org/):\n\n    pip install gunicorn\n    gunicorn -b '127.0.0.1:8080' -w 4 cubedash:create_app()\n\nProducts will begin appearing one-by-one as the summaries are generated in the\nbackground.  If impatient, you can manually navigate to a product using\n`/\u003cproduct_name`. (Eg `/ls5_nbar_albers`)\n\n### Code Style\n\nAll code is formatted using [black](https://github.com/ambv/black), and checked\nwith [pyflakes](https://github.com/PyCQA/pyflakes).\n\nThey are included when installing the test dependencies:\n\n    pip install -e .[test]\n\nRun `make lint` to check your changes, and `make format` to format your code\nautomatically.\n\nYou may want to configure your editor to run black automatically on file save\n(see the Black page for directions), or install the pre-commit hook within Git:\n\n### Pre-commit setup\n\nA [pre-commit](https://pre-commit.com/) config is provided to automatically format\nand check your code changes. This allows you to immediately catch and fix\nissues before you raise a failing pull request (which run the same checks under\nTravis).\n\nInstall pre-commit from pip, and initialise it in your repo:\n\n    pip install pre-commit\n    pre-commit install\n\nYour code will now be formatted and validated before each commit. You can also\ninvoke it manually by running `pre-commit run`\n\n**Note**: If you use Conda, install from conda-forge (This is *required* because the pip\nversion uses virtualenvs which are incompatible with Conda's environments)\n\n    conda install pre_commit\n\n## FAQ\n\n\n### Can I use a different datacube environment?\n\nSet ODC's environment variable before running the server:\n\n    export ODC_ENVIRONMENT=staging\n\nYou can always see which environment/settings will be used by running `datacube system check`.\n\nSee the ODC documentation for [datacube configuration and environments](https://opendatacube.readthedocs.io/en/latest/installation/database/configuration.html)\n\n### How can I set different timezone\n\nDatacube-explorer default timezone is configured to: `Australia/Darwin`.\n\nTo configure the instance to a different timezone, the following configuration needs to be applied:\n\n- `app.config` variable `CUBEDASH_DEFAULT_TIMEZONE` (via environment variable `CUBEDASH_SETTINGS`, which points to a `.env.py` file)\n\n### Can I add custom scripts or text to the page (such as analytics)?\n\nCreate one of the following `*.env.html` files:\n\n- Global include: for `\u003cscript\u003e` and other tags at the bottom of every page.\n\n      cubedash/templates/include-global.env.html\n\n- Footer text include. For human text such as Copyright statements.\n\n      echo \"Server \u003cstrong\u003estaging-1.test\u003c/strong\u003e\" \u003e cubedash/templates/include-footer.env.html\n\n(`*.env.html` is the naming convention used for environment-specific templates: they are ignored by\nGit)\n\n### How can I configure the deployment?\n\nrefer to [deployment instructions](https://datacube-explorer.readthedocs.io/en/latest/deploying.html) and [app-config](https://datacube-explorer.readthedocs.io/en/latest/config.html)\n\n### How do I modify the CSS/Javascript?\n\nThe CSS is compiled from [Sass](https://sass-lang.com/), and the Javascript is compiled from\n[Typescript](https://www.typescriptlang.org/).\n\nInstall [npm](https://www.npmjs.com/get-npm), and then install them both:\n\n    npm install -g sass typescript\n\nYou can now run `make static` to rebuild all the static files, or\nindividually with `make style` or `make js`.\n\nAlternatively, if using [PyCharm](https://www.jetbrains.com/pycharm), open a\nSass file and you will be prompted to enable a `File Watcher` to\ncompile automatically.\n\nPyCharm will also compile the Typescript automatically by ticking\nthe \"Recompile on changes\" option in `Languages \u0026 Frameworks -\u003e\nTypescript`.\n\n### How do I run the integration tests?\n\nThe integration tests run against a real PostgreSQL database, which is\nautomatically started and stopped using Docker. This requires Docker to\nbe available, but no further database setup is required.\n\nInstall the test dependencies: `pip install -e .[test]`\n\nThe run the tests with: `pytest integration_tests`\n\n### How do I add test data for the automated tests?\n\nMost of the automated tests for Datacube Explorer require sample data to run. This comprises\ndefinitions of ODC *Metadata Types*, *Products* and *Datasets*.\n\nThese are contained within YAML files in the [`integration_tests/data`](https://github.com/opendatacube/datacube-explorer/tree/develop/integration_tests/data) directory.\n\nTest data is loaded using a pytest fixture called `auto_odc_db`, which is activated per\ntest module, and will automatically populate the database using files referenced in module\nglobal variables. Activate and use it similar to the following example:\n\n\n    pytestmark = pytest.mark.usefixtures(\"auto_odc_db\")\n\n    METADATA_TYPES = [\"metadata/qga_eo.yaml\"]\n    PRODUCTS = [\"products/ga_s2_ard.odc-product.yaml\"]\n    DATASETS = [\"s2a_ard_granule.yaml.gz\"]\n\n\nTo add sample datasets required for the test case, create a `.yaml` file\nwith the product name and place all the sample datasets split by `---` in the yaml.\n\nIf the sample datasets file is large, compress it with `gzip \u003cdataset_file\u003e.yaml` and reference\nthat file instead.\n\n## Roles for production deployments\n\nThe [roles](cubedash/summary/roles) directory contains sql files for creating\nPostgres roles for Explorer. These are suitable for running each Explorer\ntask with minimum needed security permissions.\n\nThree roles are created:\n\n- **explorer-viewer**: A read-only user of datacube and Explorer. Suitable for the web interface and cli (`cubedash-view`) commands.\n- **explorer-generator**: Suitable for generating and updating summaries (ie. Running `cubedash-gen`)\n- **explorer-owner**: For creating and updating the schema. (ie. Running `cubedash-gen --init`)\n\nNote that these roles extend the built-in datacube role `agdc_user` (using postgres) or `odc_user` (using postgis).\nIf you created your datacube without permissions, a stand-alone creator of the appropriate\nrole is available as a prerequisite in the same [roles](cubedash/summary/roles)\ndirectory.\n\n## Docker for Development and running tests\n\nYou need to have Docker and Docker Compose installed on your system.\n\nTo create your environment, run `make up` or `docker-compose up`.\n\nYou need an ODC database, so you'll need to refer to the [ODC docs](https://datacube-core.readthedocs.io/en/latest/) for help on indexing, but you can create the database by running `make initdb` or `docker-compose exec explorer datacube system init`. (This is not enough, you still need to add a product and index datasets.)\n\nWhen you have some ODC data indexed, you can run `make index` to create the Explorer indexes.\n\nOnce Explorer indexes have been created, you can browse the running application at [http://localhost:5000](http://localhost:5000).\n\nYou can run tests by first creating a test database `make create-test-db-docker` and then running tests with `make test-docker`.\n\nAnd you can run a single test in Docker using a command like this: `docker-compose --file docker-compose.yml run explorer pytest integration_tests/test_dataset_listing.py`\n\n\n## Docker-compose for Development and running tests\n### Testing with app.config\nedit `.docker/settings_docker.py` and setup application config. Then `docker-compose -f docker-compose.yml -f docker-compose.override.yml up` to bring up explorer docker with database, explorer with settings\n\n\n## STAC API Extensions\n\nThe STAC endpoint implements the [filter](https://github.com/stac-api-extensions/filter), [fields](https://github.com/stac-api-extensions/fields), and [sort](https://github.com/stac-api-extensions/sort) extensions, all of which are bound to the STAC API - Item Search (`/search`) endpoint. All support both GET and POST request syntax.\n\nFields contained in the item properties must be prefixed with `properties.`, ex `properties.dea:dataset_maturity`.\n\nThe implementation of `fields` differs somewhat from the suggested include/exclude semantics in that it does not permit for invalid STAC entities, so the `id`, `type`, `geometry`, `bbox`, `links`, `assets`, `properties.datetime`, `collection`, and `stac_version` fields will always be included, regardless of user input.\n\nThe `sort` and `filter` implementations will recognise any syntactically valid version of a property name, which is the say, the STAC, eo3, and search field (as defined by the metadata type) variants of the name, with or without the `item.` or `properties.` prefixes. If a property does not exist for an item, `sort` will ignore it while `filter` will treat it as `NULL`.\n\nThe `filter` extension supports both `cql2-text` and `cql2-json` for both GET and POST requesets, and uses [pygeofilter](https://github.com/geopython/pygeofilter) to parse the cql and convert it to a sqlalchemy filter expression. `filter-crs` only accepts http://www.opengis.net/def/crs/OGC/1.3/CRS84 as a valid value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendatacube%2Fdatacube-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopendatacube%2Fdatacube-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendatacube%2Fdatacube-explorer/lists"}