diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index 336f322d59..0000000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,86 +0,0 @@ -name: lint - -on: - pull_request: - paths: - - '**' - - push: - paths: - - '**' - - '!.github/**' - - '.github/workflows/lint.yaml' - - '!docker/**' - - '!docs/**' - - '!contrib/**' - -jobs: - pylint: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10"] - name: Pylint - steps: - - name: checkout git - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup conda - uses: s-weigand/setup-conda@v1 - with: - update-conda: true - python-version: ${{ matrix.python-version }} - conda-channels: anaconda, conda-forge - - name: run pylint - run: | - sudo apt-get remove python3-openssl - pip install --upgrade -e '.[test]' - pip install pylint>3.2 - pylint -j 2 --reports no datacube - - - mypy: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10"] - name: MyPy - steps: - - name: checkout git - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup conda - uses: s-weigand/setup-conda@v1 - with: - update-conda: true - python-version: ${{ matrix.python-version }} - conda-channels: anaconda, conda-forge - - name: run mypy - run: | - sudo apt-get remove python3-openssl - pip install --upgrade -e '.[types]' - mypy datacube - - - pycodestyle: - name: pycodestyle - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10"] - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup conda - uses: s-weigand/setup-conda@v1 - with: - update-conda: true - python-version: ${{ matrix.python-version }} - conda-channels: anaconda, conda-forge - - name: Run pycodestyle - run: | - sudo apt-get remove python3-openssl - pip install --upgrade -e '.[test]' - pycodestyle tests integration_tests examples --max-line-length 120 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 093255c3e8..0000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,182 +0,0 @@ -name: build - -on: - pull_request: - paths: - - '**' - - push: - paths: - - '**' - - '!docs/**' - - '!contrib/**' - - workflow_dispatch: - -env: - DOCKER_USER: gadockersvc - DOCKER_IMAGE: opendatacube/datacube-tests:latest1.9 - # NB Restore standard image name when merge into develop - # DOCKER_IMAGE: opendatacube/datacube-tests:latest - - -jobs: - main: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Config - id: cfg - run: | - push_test_pypi=no - push_pypi=no - - if [[ "${GITHUB_REF}" =~ refs/tags/.* ]]; then - echo "push_test_pypi=yes" >> $GITHUB_OUTPUT - echo "push_pypi=yes" >> $GITHUB_OUTPUT - fi - - - uses: dorny/paths-filter@v3 - id: changes - if: | - github.event_name == 'push' - with: - filters: | - docker: - - 'docker/**' - - name: Pull Docker - if: steps.changes.outputs.docker == 'false' - run: | - docker pull "${{ env.DOCKER_IMAGE }}" - - - name: Set up Docker Buildx - if: steps.changes.outputs.docker == 'true' - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - if: steps.changes.outputs.docker == 'true' - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: DockerHub Login - id: login - if: | - github.event_name == 'push' - && github.ref == 'refs/heads/develop' - uses: docker/login-action@v3 - with: - username: ${{ env.DOCKER_USER }} - password: ${{ secrets.GADOCKERSVC_PASSWORD }} - - - name: Build Docker - uses: docker/build-push-action@v6 - with: - file: docker/Dockerfile - context: . - tags: ${{ env.DOCKER_IMAGE }} - load: true - - - name: Verify and Run Tests - run: | - echo "Verify that twine is installed" - docker run --rm ${{ env.DOCKER_IMAGE }} twine --version - - echo "Run tests" - cat < .container-xl { - background-color: white; -} - -.navbar-brand { - width: 140px; - padding-left: 20px; -} - -.navbar-brand img { - width: 140px; - height: auto; -} - -#navbar-main-elements > .nav-item { - text-transform: uppercase; - margin: 20px 20px 0px 20px; - padding-bottom: 20px; -} - -#navbar-main-elements .nav-link { - font-weight: 500; - font-size: 0.8rem; -} - -#navbar-main-elements > .active { - border-bottom: 3px solid #1C54A1; -} - -#navbar-icon-links i { - color: #96b2dc!important; - transition: 0.2s; -} - -#navbar-icon-links i:hover { - color: #2155a1!important; -} - -/* LEFT SIDEBAR */ -.bd-sidebar { - border-right: 3px solid rgb(28 55 90 / 10%); - height: calc(100vh - var(--pst-header-height) - 60px); -} - -.bd-sidenav li { - padding-left: 10px; - font-weight: 400; -} - -.bd-sidebar .nav .active > a { - font-weight: 500; - color: var(--pst-color-sidebar-link-active); -} - -.bd-links { - max-height: calc(100% - 65px); -} - -#bd-docs-nav::-webkit-scrollbar { - width: 8px; - } - - #bd-docs-nav::-webkit-scrollbar-track { - background-color: #d0d2d49c; -} - -#bd-docs-nav::-webkit-scrollbar-thumb { - background: #1c375a; - border-radius: 2px; -} - -/* MAIN CONTENT */ -.bd-content > div { - background-color: white; - padding: 40px; -} - -.bd-container { - padding-top: var(--pst-header-height); -} - -.section p { - line-height: 1.8rem; -} - -.bd-content h1, h2, h3, h4, h5 { - font-weight: 300; -} - -.bd-content h2 { - margin-top: 30px; - margin-bottom: 8px; -} - -.bd-content .section:not(:first-child) h1 { - margin-top: 30px; -} - -dt:target, span.highlighted { - background-color: #92b0dc36; -} - -.viewcode-link { - margin-top: 3px; -} - -/* Hide the in-content nav */ -.bd-content .toctree-wrapper { - display: none; -} - - -/* RIGHT NAV COLUMN */ -.section-nav .toc-h1 { - margin-bottom: 20px; -} - -.section-nav .toc-h2 { - margin-left: 20px; - margin-top: 10px; - text-transform: uppercase; -} - -.section-nav .toc-h3 { - font-size: 0.95rem; -} - -.editthispage a { - color: var(--pst-color-headerlink); -} - - -/* SEARCH BOX */ -.form-control { - font-size: 0.9rem; - font-weight: 300; -} - -.bd-search input { - border-bottom: none; -} - -.bd-search .icon { - top: 23px; -} - -.fas { - font-weight: 600; -} - - -/* HOME PAGE */ -#open-data-cube-manual .img-fluid { - width: 31%; - padding: 2%; -} - -.footer .container { - max-width: 100%; - font-size: 0.9rem; -} - -html[data-theme="dark"] { - --pst-color-text-base: var(--pst-color-text-muted); - --pst-color-sidebar-link-active: var(--pst-color-link); -} - -html[data-theme="dark"] .container-xl { - background-color: #3B3B3B; -} - -html[data-theme="dark"] .editthispage a { - color: var(--pst-color-link); -} - -html[data-theme="dark"] .bd-sidebar { - border-right: 3px solid #ffffff1a; -} - -html[data-theme="dark"] .navbar-light>.container-xl { - background-color: var(--pst-color-surface); -} diff --git a/docs/_templates/odc-footer.html b/docs/_templates/footer_center.html similarity index 100% rename from docs/_templates/odc-footer.html rename to docs/_templates/footer_center.html diff --git a/docs/about-core-concepts/index.rst b/docs/about-core-concepts/index.rst index 1c0686a383..9a5c27822e 100644 --- a/docs/about-core-concepts/index.rst +++ b/docs/about-core-concepts/index.rst @@ -1,6 +1,6 @@ -********************* -About & Core Concepts -********************* +******** +Overview +******** Overview ======== diff --git a/docs/api/core-classes/datacube.rst b/docs/api/core-classes/datacube.rst index 4d0fde0f72..2e059331f0 100644 --- a/docs/api/core-classes/datacube.rst +++ b/docs/api/core-classes/datacube.rst @@ -5,5 +5,4 @@ Datacube Class .. currentmodule:: datacube .. autoclass:: Datacube - :members: diff --git a/docs/api/index.rst b/docs/api/index.rst index f31863bd22..2ea90f9856 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -1,6 +1,6 @@ -************* -API Reference -************* +*** +API +*** The following pages provide a full API reference for the ``datacube`` python library. diff --git a/docs/conf.py b/docs/conf.py index 8d1be50783..fe0effd75d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,8 +5,6 @@ import os import sys -from bs4 import BeautifulSoup as bs # noqa: N813 - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -37,7 +35,8 @@ 'autodocsumm', 'nbsphinx', 'sphinx.ext.napoleon', - 'sphinx.ext.autosectionlabel' + 'sphinx.ext.autosectionlabel', + 'IPython.sphinxext.ipython_console_highlighting', # Highlights notebook cells ] # Add any paths that contain templates here, relative to this directory. @@ -106,21 +105,19 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -if on_rtd: - html_theme = 'pydata_sphinx_theme' -else: - html_theme = 'pydata_sphinx_theme' +html_theme = 'pydata_sphinx_theme' html_theme_options = { - "navigation_depth": 1, + "navigation_depth": 2, # defaults to 4 + "show_toc_level": 2, + # "header_links_before_dropdown": 3, + # "navbar_align": "left", "show_prev_next": False, "collapse_navigation": True, "use_edit_page_button": True, - "footer_items": ["odc-footer"], - "page_sidebar_items": [ + # "footer_items": ["odc-footer"], + "secondary_sidebar_items": [ "page-toc", - "autoclass_page_toc", - "autosummary_page_toc", "edit-this-page" ], "icon_links": [ @@ -173,88 +170,6 @@ numfig = True -def custom_page_funcs(app, pagename, templatename, context, doctree): - - def get_autosummary_toc(): - soup = bs(context["body"], "html.parser") - - class_sections = soup.find(class_='class') - if class_sections != None: - return "" - - matches = soup.find_all('dl') - if matches == None or len(matches) == 0: - return "" - - out = { - 'title': '', - 'menu_items': [] - } - - # remove the class dt - pyclass = matches.pop(0) - pyclass = pyclass.find('dt') - if pyclass != None: - out['title'] = pyclass.get('id') - - for match in matches: - match_dt = match.find('dt') - link = match.find(class_="headerlink") - if link != None: - out['menu_items'].append({ - 'title': match_dt.get('id'), - 'link': link['href'] - }) - - return out - - def get_class_toc(): - soup = bs(context["body"], "html.parser") - - class_sections = soup.find_all(class_='autosummary') - if class_sections == None or len(class_sections) == 0: - return "" - - out = { - 'title': '', - 'menu_items': [] - } - class_title = soup.find(class_='class') - if class_title == None: - return "" - - pyclass = class_title.find('dt') - if pyclass != None: - out['title'] = pyclass.get('id') - - for section in class_sections: - out_section = { - 'title': '', - 'menu_items': [] - } - out_section['title'] = section.find_previous_sibling('p').text.replace(':', '') - matches = section.find_all('tr') - for match in matches: - link = match.find(class_="internal") - - if link != None: - title = link['title'] - if title != None: - title = title.replace(out['title'], '') - out_section['menu_items'].append({ - 'title': title, - 'link': link['href'] - }) - if len(out_section['menu_items']) > 0: - out['menu_items'].append(out_section) - - # print(out) - return out - - context['get_class_toc'] = get_class_toc - context['get_autosummary_toc'] = get_autosummary_toc - - def setup(app): # Fix bug where code isn't being highlighted app.add_css_file('pygments.css') @@ -264,8 +179,6 @@ def setup(app): objname='configuration value', indextemplate='pair: %s; configuration value') - app.connect("html-page-context", custom_page_funcs) - # Clean up generated documentation files that RTD seems to be having trouble with if on_rtd: diff --git a/docs/data-access-analysis/index.rst b/docs/data-access-analysis/index.rst index 662e4041e7..55678631e0 100644 --- a/docs/data-access-analysis/index.rst +++ b/docs/data-access-analysis/index.rst @@ -1,6 +1,6 @@ -********************** -Data Access & Analysis -********************** +******** +Analysis +******** For users looking to access data from the Open Data Cube the simplest way to get started is to access a sandbox environment for your Open Data Cube of interest. Once you have access to a sandbox environment you'll be able to start searching, loading and analysing data. diff --git a/docs/index.rst b/docs/index.rst index d69a018917..c42d96fed2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,6 +30,29 @@ For more information see the following sections: :doc:`about/index` * This section contains information on the project's development. +:html_theme.sidebar_secondary.remove: + +%%%%%%%%%%%%%%%%%%%%%%%%%%% +Open Data Cube Manual +%%%%%%%%%%%%%%%%%%%%%%%%%%% + +The Open Data Cube provides an integrated gridded data +analysis environment for decades of analysis ready Earth observation satellite +and related data from multiple sources. + + +.. image:: _static/UsingODC.png + :target: data-access-analysis/index.html + :class: img-fluid + +.. image:: _static/ManagingODC.png + :target: installation/index.html + :class: img-fluid + +.. image:: _static/PythonAPI.png + :target: api/index.html + :class: img-fluid + .. toctree:: :maxdepth: 5 diff --git a/docs/installation/database/configuration.rst b/docs/installation/database/configuration.rst index c2e9b19fbb..d5d34b969e 100644 --- a/docs/installation/database/configuration.rst +++ b/docs/installation/database/configuration.rst @@ -341,5 +341,8 @@ remaining configuration options only apply to the ``postgres`` and Need to know more? ================== + This default config is only used after exhausting the default search path. If you have + provided your own search path via any of the above methods and none of the paths exist, then an error is raised. + A full description of the ODC configuration engine can be found in :doc:`passing-configuration`. diff --git a/docs/installation/index.rst b/docs/installation/index.rst index 0d17e478ce..c016f04733 100644 --- a/docs/installation/index.rst +++ b/docs/installation/index.rst @@ -1,6 +1,6 @@ -****************************************** -Installing and managing the Open Data Cube -****************************************** +***** +Setup +***** This section contains information on setting up and managing the Open Data Cube. diff --git a/docs/requirements.txt b/docs/requirements.txt index e4b611677d..e8931cd2d4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,24 +1,32 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --extra=doc,s3 --output-file=docs/requirements.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile --extra doc --extra s3 --output-file docs/requirements.txt setup.py +accessible-pygments==0.0.5 + # via pydata-sphinx-theme affine==2.4.0 # via # datacube (setup.py) + # odc-geo # rasterio alabaster==1.0.0 # via sphinx +alembic==1.14.0 + # via datacube (setup.py) +antimeridian==0.3.11 + # via datacube (setup.py) +asttokens==3.0.0 + # via stack-data attrs==24.2.0 # via # datacube (setup.py) # jsonschema # rasterio + # referencing autodocsumm==0.2.14 # via datacube (setup.py) babel==2.16.0 - # via sphinx + # via + # pydata-sphinx-theme + # sphinx beautifulsoup4==4.12.3 # via # datacube (setup.py) @@ -26,30 +34,30 @@ beautifulsoup4==4.12.3 # pydata-sphinx-theme bleach==6.2.0 # via nbconvert -boto3==1.35.70 +boto3==1.35.72 # via datacube (setup.py) -botocore==1.35.70 +botocore==1.35.72 # via - # boto3 # datacube (setup.py) + # boto3 # s3transfer cachetools==5.5.0 - # via datacube (setup.py) + # via + # datacube (setup.py) + # odc-geo certifi==2024.8.30 # via # pyproj # rasterio # requests -cftime==1.6.4 - # via netcdf4 charset-normalizer==3.4.0 # via requests click==8.1.7 # via + # datacube (setup.py) # click-plugins # cligj # dask - # datacube (setup.py) # distributed # rasterio # sphinx-click @@ -59,17 +67,21 @@ cligj==0.7.2 # via rasterio cloudpickle==3.1.0 # via - # dask # datacube (setup.py) + # dask # distributed commonmark==0.9.1 # via recommonmark -dask[array]==2024.10.0 +dask==2024.10.0 # via # datacube (setup.py) # distributed +decorator==5.1.1 + # via ipython defusedxml==0.7.1 # via nbconvert +deprecat==2.1.3 + # via datacube (setup.py) distributed==2024.10.0 # via datacube (setup.py) docutils==0.21.2 @@ -79,18 +91,22 @@ docutils==0.21.2 # recommonmark # sphinx # sphinx-click -fastjsonschema==2.20.0 +executing==2.1.0 + # via stack-data +fastjsonschema==2.21.1 # via nbformat fsspec==2024.10.0 # via dask geoalchemy2==0.16.0 # via datacube (setup.py) -greenlet==3.1.1 - # via sqlalchemy idna==3.10 # via requests imagesize==1.4.1 # via sphinx +ipython==8.30.0 + # via datacube (setup.py) +jedi==0.19.2 + # via ipython jinja2==3.1.4 # via # distributed @@ -105,6 +121,8 @@ jsonschema==4.23.0 # via # datacube (setup.py) # nbformat +jsonschema-specifications==2024.10.1 + # via jsonschema jupyter-client==8.6.3 # via nbclient jupyter-core==5.7.2 @@ -121,15 +139,20 @@ locket==1.0.0 # via # distributed # partd +mako==1.3.6 + # via alembic markupsafe==3.0.2 # via # jinja2 + # mako # nbconvert +matplotlib-inline==0.1.7 + # via ipython mistune==3.0.2 # via nbconvert msgpack==1.1.0 # via distributed -nbclient==0.10.0 +nbclient==0.10.1 # via nbconvert nbconvert==7.16.4 # via nbsphinx @@ -140,27 +163,25 @@ nbformat==5.10.4 # nbsphinx nbsphinx==0.9.5 # via datacube (setup.py) -netcdf4==1.7.2 - # via datacube (setup.py) numpy==2.1.3 # via - # cftime - # dask # datacube (setup.py) - # netcdf4 + # antimeridian + # dask + # odc-geo # pandas # rasterio # shapely - # snuggs # xarray +odc-geo==0.4.8 + # via datacube (setup.py) packaging==24.2 # via - # dask # datacube (setup.py) + # dask # distributed # geoalchemy2 # nbconvert - # pydata-sphinx-theme # sphinx # xarray pandas==2.2.3 @@ -169,59 +190,77 @@ pandas==2.2.3 # xarray pandocfilters==1.5.1 # via nbconvert +parso==0.8.4 + # via jedi partd==1.4.2 # via dask +pexpect==4.9.0 + # via ipython platformdirs==4.3.6 # via jupyter-core +prompt-toolkit==3.0.48 + # via ipython psutil==6.1.0 # via distributed -#psycopg2==2.9.5 - # via datacube (setup.py) -pydata-sphinx-theme==0.9.0 +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.3 + # via stack-data +pydata-sphinx-theme==0.16.0 # via datacube (setup.py) pygments==2.18.0 # via + # accessible-pygments + # ipython # nbconvert + # pydata-sphinx-theme # sphinx pyparsing==3.2.0 - # via snuggs + # via rasterio pyproj==3.7.0 - # via datacube (setup.py) + # via + # datacube (setup.py) + # odc-geo python-dateutil==2.9.0.post0 # via - # botocore # datacube (setup.py) + # botocore # jupyter-client # pandas pytz==2024.2 - # via - # babel - # pandas + # via pandas pyyaml==6.0.2 # via - # dask # datacube (setup.py) + # dask # distributed pyzmq==26.2.0 # via jupyter-client -rasterio==1.4.2 +rasterio==1.4.3 # via datacube (setup.py) recommonmark==0.7.1 # via datacube (setup.py) +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications requests==2.32.3 # via sphinx +rpds-py==0.22.0 + # via + # jsonschema + # referencing ruamel-yaml==0.18.6 # via datacube (setup.py) -ruamel-yaml-clib==0.2.12 - # via ruamel-yaml s3transfer==0.10.4 # via boto3 shapely==2.0.6 - # via datacube (setup.py) -six==1.16.0 # via - # bleach - # python-dateutil + # datacube (setup.py) + # antimeridian + # odc-geo +six==1.16.0 + # via python-dateutil snowballstemmer==2.2.0 # via sphinx sortedcontainers==2.4.0 @@ -230,8 +269,8 @@ soupsieve==2.6 # via beautifulsoup4 sphinx==8.1.3 # via - # autodocsumm # datacube (setup.py) + # autodocsumm # nbsphinx # pydata-sphinx-theme # recommonmark @@ -256,15 +295,18 @@ sphinxcontrib-serializinghtml==2.0.0 sqlalchemy==2.0.36 # via # datacube (setup.py) + # alembic # geoalchemy2 +stack-data==0.6.3 + # via ipython tblib==3.0.0 # via distributed tinycss2==1.4.0 # via nbconvert toolz==1.0.0 # via - # dask # datacube (setup.py) + # dask # distributed # partd tornado==6.4.2 @@ -273,25 +315,35 @@ tornado==6.4.2 # jupyter-client traitlets==5.14.3 # via + # ipython # jupyter-client # jupyter-core + # matplotlib-inline # nbclient # nbconvert # nbformat # nbsphinx +typing-extensions==4.12.2 + # via + # alembic + # pydata-sphinx-theme + # sqlalchemy +tzdata==2024.2 + # via pandas urllib3==2.2.3 # via # botocore # distributed # requests +wcwidth==0.2.13 + # via prompt-toolkit webencodings==0.5.1 # via # bleach # tinycss2 +wrapt==1.17.0 + # via deprecat xarray==2024.11.0 # via datacube (setup.py) zict==3.0.0 # via distributed - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index a706022eb3..d9725fedb5 --- a/setup.py +++ b/setup.py @@ -35,10 +35,11 @@ 'sphinx-click', 'recommonmark', 'autodocsumm', + 'ipython', 'beautifulsoup4', 'nbsphinx', 'ipython', - 'pydata-sphinx-theme==0.9.0', + 'pydata-sphinx-theme', ] extras_require = {