From 17b8642730ae4c4bed9b7a9ac47b4d05b4987c8f Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Mon, 13 Nov 2023 09:09:47 +1100 Subject: [PATCH 1/5] Remove all imports from __future__ --- datacube_ows/data.py | 2 -- datacube_ows/legend_generator.py | 2 -- datacube_ows/ogc_exceptions.py | 2 -- datacube_ows/startup_utils.py | 2 -- datacube_ows/utils.py | 2 -- datacube_ows/wcs1.py | 2 -- datacube_ows/wcs1_utils.py | 2 -- datacube_ows/wcs2_utils.py | 2 -- datacube_ows/wms.py | 2 -- datacube_ows/wms_utils.py | 2 -- datacube_ows/wmts.py | 2 -- 11 files changed, 22 deletions(-) diff --git a/datacube_ows/data.py b/datacube_ows/data.py index 3c2a46166..e52343e6a 100644 --- a/datacube_ows/data.py +++ b/datacube_ows/data.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import - import json import logging import re diff --git a/datacube_ows/legend_generator.py b/datacube_ows/legend_generator.py index 7dc8b5df6..ce6c4beed 100644 --- a/datacube_ows/legend_generator.py +++ b/datacube_ows/legend_generator.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import - import io import logging diff --git a/datacube_ows/ogc_exceptions.py b/datacube_ows/ogc_exceptions.py index eb253dc5f..963e01dc4 100644 --- a/datacube_ows/ogc_exceptions.py +++ b/datacube_ows/ogc_exceptions.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import, division, print_function - import traceback as tb from flask import render_template diff --git a/datacube_ows/startup_utils.py b/datacube_ows/startup_utils.py index b9e9673e0..e68016141 100644 --- a/datacube_ows/startup_utils.py +++ b/datacube_ows/startup_utils.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import, division, print_function - import logging import os import warnings diff --git a/datacube_ows/utils.py b/datacube_ows/utils.py index 4110c4758..5a3cdc05a 100644 --- a/datacube_ows/utils.py +++ b/datacube_ows/utils.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import, division, print_function - import datetime import logging from functools import wraps diff --git a/datacube_ows/wcs1.py b/datacube_ows/wcs1.py index 6295c41b0..31184fa3d 100644 --- a/datacube_ows/wcs1.py +++ b/datacube_ows/wcs1.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import, division, print_function - from flask import render_template from datacube_ows.data import json_response diff --git a/datacube_ows/wcs1_utils.py b/datacube_ows/wcs1_utils.py index 4663d0e66..4a95df4a2 100644 --- a/datacube_ows/wcs1_utils.py +++ b/datacube_ows/wcs1_utils.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import, division, print_function - import numpy import pytz import xarray diff --git a/datacube_ows/wcs2_utils.py b/datacube_ows/wcs2_utils.py index b80bbb993..7fab81911 100644 --- a/datacube_ows/wcs2_utils.py +++ b/datacube_ows/wcs2_utils.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import, division, print_function - import collections import logging diff --git a/datacube_ows/wms.py b/datacube_ows/wms.py index 52e62a2c6..c00b21d61 100644 --- a/datacube_ows/wms.py +++ b/datacube_ows/wms.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import, division, print_function - from flask import render_template from datacube_ows.data import feature_info, get_map diff --git a/datacube_ows/wms_utils.py b/datacube_ows/wms_utils.py index 8d20c4076..b4aaaf052 100644 --- a/datacube_ows/wms_utils.py +++ b/datacube_ows/wms_utils.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import, division, print_function - import math from datetime import datetime diff --git a/datacube_ows/wmts.py b/datacube_ows/wmts.py index 9c34d0750..7c944ae0b 100644 --- a/datacube_ows/wmts.py +++ b/datacube_ows/wmts.py @@ -3,8 +3,6 @@ # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import, division, print_function - import logging from flask import render_template From aba16384f087794ba67efa3fa70a2b402f972bab Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Mon, 13 Nov 2023 09:17:42 +1100 Subject: [PATCH 2/5] Update all license file-headers. --- cfg_parser.py | 2 +- datacube_ows/__init__.py | 2 +- datacube_ows/band_utils.py | 2 +- datacube_ows/cfg_parser_impl.py | 2 +- datacube_ows/config_toolkit.py | 2 +- datacube_ows/config_utils.py | 2 +- datacube_ows/cube_pool.py | 2 +- datacube_ows/data.py | 2 +- datacube_ows/gunicorn_config.py | 2 +- datacube_ows/legend_generator.py | 2 +- datacube_ows/legend_utils.py | 2 +- datacube_ows/mv_index.py | 2 +- datacube_ows/ogc.py | 2 +- datacube_ows/ogc_exceptions.py | 2 +- datacube_ows/ogc_utils.py | 2 +- datacube_ows/ows_cfg_example.py | 2 +- datacube_ows/ows_configuration.py | 2 +- datacube_ows/product_ranges.py | 2 +- datacube_ows/protocol_versions.py | 2 +- datacube_ows/query_profiler.py | 2 +- datacube_ows/resource_limits.py | 5 +++++ datacube_ows/startup_utils.py | 2 +- datacube_ows/styles/__init__.py | 2 +- datacube_ows/styles/api/__init__.py | 2 +- datacube_ows/styles/api/base.py | 2 +- datacube_ows/styles/base.py | 2 +- datacube_ows/styles/colormap.py | 2 +- datacube_ows/styles/component.py | 2 +- datacube_ows/styles/expression.py | 2 +- datacube_ows/styles/hybrid.py | 2 +- datacube_ows/styles/ramp.py | 2 +- datacube_ows/tile_matrix_sets.py | 2 +- datacube_ows/update_ranges_impl.py | 2 +- datacube_ows/utils.py | 2 +- datacube_ows/wcs1.py | 2 +- datacube_ows/wcs1_utils.py | 2 +- datacube_ows/wcs2.py | 2 +- datacube_ows/wcs2_utils.py | 2 +- datacube_ows/wcs_scaler.py | 2 +- datacube_ows/wcs_utils.py | 2 +- datacube_ows/wms.py | 2 +- datacube_ows/wms_utils.py | 2 +- datacube_ows/wmts.py | 2 +- datacube_ows/wsgi.py | 2 +- docker-compose.yaml | 2 +- docs/conf.py | 15 ++++----------- integration_tests/__init__.py | 2 +- integration_tests/cfg/__init__.py | 2 +- integration_tests/cfg/ows_test_cfg.py | 2 +- integration_tests/cfg/ows_test_cfg_bad.py | 2 +- integration_tests/cfg/ows_test_cfg_no_i18n.py | 2 +- integration_tests/conftest.py | 3 +-- integration_tests/test_cfg_parser.py | 2 +- integration_tests/test_cube_pool.py | 5 +++++ integration_tests/test_i18n.py | 5 +++++ integration_tests/test_layers.py | 2 +- integration_tests/test_mv_index.py | 2 +- integration_tests/test_routes.py | 2 +- integration_tests/test_update_ranges.py | 2 +- integration_tests/test_version.py | 2 +- integration_tests/test_wcs_server.py | 2 +- integration_tests/test_wms_server.py | 2 +- integration_tests/test_wmts_server.py | 2 +- integration_tests/utils.py | 2 +- setup.py | 2 +- tests/__init__.py | 2 +- tests/cfg/__init__.py | 2 +- tests/cfg/broken_nested.py | 2 +- tests/cfg/minimal_cfg.py | 2 +- tests/cfg/mixed_nested.py | 2 +- tests/cfg/nested.py | 2 +- tests/cfg/simple.py | 2 +- tests/conftest.py | 2 +- tests/test_band_utils.py | 2 +- tests/test_cfg_bandidx.py | 2 +- tests/test_cfg_cache_ctrl.py | 2 +- tests/test_cfg_global.py | 2 +- tests/test_cfg_inclusion.py | 2 +- tests/test_cfg_layer.py | 2 +- tests/test_cfg_metadata_types.py | 2 +- tests/test_cfg_tile_matrix_set.py | 2 +- tests/test_cfg_wcs.py | 2 +- tests/test_config_toolkit.py | 2 +- tests/test_data.py | 2 +- tests/test_legend_generator.py | 2 +- tests/test_mpl_cmaps.py | 2 +- tests/test_multidate_handler.py | 2 +- tests/test_mv_selopts.py | 2 +- tests/test_no_db_routes.py | 2 +- tests/test_ogc_utils.py | 2 +- tests/test_ows_configuration.py | 2 +- tests/test_protocol_versions.py | 5 +++++ tests/test_pyproj.py | 2 +- tests/test_qprof.py | 2 +- tests/test_resource_limits.py | 5 +++++ tests/test_startup.py | 2 +- tests/test_style_api.py | 2 +- tests/test_styles.py | 2 +- tests/test_time_res_method.py | 2 +- tests/test_utils.py | 2 +- tests/test_wcs2_utils.py | 2 +- tests/test_wcs_scaler.py | 2 +- tests/test_wms_utils.py | 2 +- tests/utils.py | 2 +- update_ranges.py | 2 +- 105 files changed, 128 insertions(+), 111 deletions(-) diff --git a/cfg_parser.py b/cfg_parser.py index cb6d91d3b..3818ba7c3 100644 --- a/cfg_parser.py +++ b/cfg_parser.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datacube_ows.cfg_parser_impl import main from datacube_ows.startup_utils import initialise_debugging diff --git a/datacube_ows/__init__.py b/datacube_ows/__init__.py index d4d3d1fef..38d244581 100644 --- a/datacube_ows/__init__.py +++ b/datacube_ows/__init__.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 try: from ._version import version as __version__ diff --git a/datacube_ows/band_utils.py b/datacube_ows/band_utils.py index b048945b6..97d27af75 100644 --- a/datacube_ows/band_utils.py +++ b/datacube_ows/band_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from __future__ import division diff --git a/datacube_ows/cfg_parser_impl.py b/datacube_ows/cfg_parser_impl.py index bb422a90f..a2fdcc22f 100755 --- a/datacube_ows/cfg_parser_impl.py +++ b/datacube_ows/cfg_parser_impl.py @@ -2,7 +2,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import json diff --git a/datacube_ows/config_toolkit.py b/datacube_ows/config_toolkit.py index 31ad9c956..dc5ff6339 100644 --- a/datacube_ows/config_toolkit.py +++ b/datacube_ows/config_toolkit.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from copy import deepcopy from typing import Any, MutableMapping diff --git a/datacube_ows/config_utils.py b/datacube_ows/config_utils.py index be9f3b91c..8a331a554 100644 --- a/datacube_ows/config_utils.py +++ b/datacube_ows/config_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import json import logging diff --git a/datacube_ows/cube_pool.py b/datacube_ows/cube_pool.py index a8dc44fba..c46f6f122 100644 --- a/datacube_ows/cube_pool.py +++ b/datacube_ows/cube_pool.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import logging from contextlib import contextmanager diff --git a/datacube_ows/data.py b/datacube_ows/data.py index e52343e6a..b03d87074 100644 --- a/datacube_ows/data.py +++ b/datacube_ows/data.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import json import logging diff --git a/datacube_ows/gunicorn_config.py b/datacube_ows/gunicorn_config.py index fa5d33913..4ddb23235 100644 --- a/datacube_ows/gunicorn_config.py +++ b/datacube_ows/gunicorn_config.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 """Gunicorn config for Prometheus internal metrics """ diff --git a/datacube_ows/legend_generator.py b/datacube_ows/legend_generator.py index ce6c4beed..e352c9a14 100644 --- a/datacube_ows/legend_generator.py +++ b/datacube_ows/legend_generator.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import io import logging diff --git a/datacube_ows/legend_utils.py b/datacube_ows/legend_utils.py index 93fe2334d..0d43abb63 100644 --- a/datacube_ows/legend_utils.py +++ b/datacube_ows/legend_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import io import logging diff --git a/datacube_ows/mv_index.py b/datacube_ows/mv_index.py index 8a593068d..790d2ffe2 100644 --- a/datacube_ows/mv_index.py +++ b/datacube_ows/mv_index.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime import json diff --git a/datacube_ows/ogc.py b/datacube_ows/ogc.py index 2b35e2a93..b4e6bd81d 100644 --- a/datacube_ows/ogc.py +++ b/datacube_ows/ogc.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import sys import traceback diff --git a/datacube_ows/ogc_exceptions.py b/datacube_ows/ogc_exceptions.py index 963e01dc4..094d2beb7 100644 --- a/datacube_ows/ogc_exceptions.py +++ b/datacube_ows/ogc_exceptions.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import traceback as tb diff --git a/datacube_ows/ogc_utils.py b/datacube_ows/ogc_utils.py index aaadf658c..3d6458d20 100644 --- a/datacube_ows/ogc_utils.py +++ b/datacube_ows/ogc_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime import logging diff --git a/datacube_ows/ows_cfg_example.py b/datacube_ows/ows_cfg_example.py index 93655689b..4cd14e80e 100644 --- a/datacube_ows/ows_cfg_example.py +++ b/datacube_ows/ows_cfg_example.py @@ -2,7 +2,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 diff --git a/datacube_ows/ows_configuration.py b/datacube_ows/ows_configuration.py index fc9083555..06d8988c3 100644 --- a/datacube_ows/ows_configuration.py +++ b/datacube_ows/ows_configuration.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 # diff --git a/datacube_ows/product_ranges.py b/datacube_ows/product_ranges.py index 1249f0642..f38b83d35 100644 --- a/datacube_ows/product_ranges.py +++ b/datacube_ows/product_ranges.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 #pylint: skip-file diff --git a/datacube_ows/protocol_versions.py b/datacube_ows/protocol_versions.py index 2b93a8732..014c2fa28 100644 --- a/datacube_ows/protocol_versions.py +++ b/datacube_ows/protocol_versions.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import re diff --git a/datacube_ows/query_profiler.py b/datacube_ows/query_profiler.py index c9205b139..6cdbde486 100644 --- a/datacube_ows/query_profiler.py +++ b/datacube_ows/query_profiler.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from time import time diff --git a/datacube_ows/resource_limits.py b/datacube_ows/resource_limits.py index d0fd7ac54..5eefea635 100644 --- a/datacube_ows/resource_limits.py +++ b/datacube_ows/resource_limits.py @@ -1,3 +1,8 @@ +# This file is part of datacube-ows, part of the Open Data Cube project. +# See https://opendatacube.org for more information. +# +# Copyright (c) 2017-2023 OWS Contributors +# SPDX-License-Identifier: Apache-2.0 import math from typing import Any, Iterable, List, Mapping, Optional, Tuple, Union, cast diff --git a/datacube_ows/startup_utils.py b/datacube_ows/startup_utils.py index e68016141..8e4944a03 100644 --- a/datacube_ows/startup_utils.py +++ b/datacube_ows/startup_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import logging import os diff --git a/datacube_ows/styles/__init__.py b/datacube_ows/styles/__init__.py index 36db0f293..9d2ce7bc6 100644 --- a/datacube_ows/styles/__init__.py +++ b/datacube_ows/styles/__init__.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datacube_ows.styles.base import StyleDefBase # noqa: F401 from datacube_ows.styles.colormap import ColorMapStyleDef # noqa: F401 diff --git a/datacube_ows/styles/api/__init__.py b/datacube_ows/styles/api/__init__.py index 17f8910d8..7267194e7 100644 --- a/datacube_ows/styles/api/__init__.py +++ b/datacube_ows/styles/api/__init__.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datacube_ows.styles.api.base import ( # noqa: F401 isort:skip diff --git a/datacube_ows/styles/api/base.py b/datacube_ows/styles/api/base.py index c1d660dfe..12384313c 100644 --- a/datacube_ows/styles/api/base.py +++ b/datacube_ows/styles/api/base.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import xarray diff --git a/datacube_ows/styles/base.py b/datacube_ows/styles/base.py index 766db0e16..b5e713130 100644 --- a/datacube_ows/styles/base.py +++ b/datacube_ows/styles/base.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import io import logging diff --git a/datacube_ows/styles/colormap.py b/datacube_ows/styles/colormap.py index 3a1dc568e..dd2a82eb4 100644 --- a/datacube_ows/styles/colormap.py +++ b/datacube_ows/styles/colormap.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import io import logging diff --git a/datacube_ows/styles/component.py b/datacube_ows/styles/component.py index bf6efc4a4..1ea88a21f 100644 --- a/datacube_ows/styles/component.py +++ b/datacube_ows/styles/component.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from typing import (Any, Callable, Hashable, List, MutableMapping, Optional, Union, cast) diff --git a/datacube_ows/styles/expression.py b/datacube_ows/styles/expression.py index 719941c09..dee244226 100644 --- a/datacube_ows/styles/expression.py +++ b/datacube_ows/styles/expression.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from typing import Any, Type, cast diff --git a/datacube_ows/styles/hybrid.py b/datacube_ows/styles/hybrid.py index 5f714dc2b..9020dd783 100644 --- a/datacube_ows/styles/hybrid.py +++ b/datacube_ows/styles/hybrid.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from typing import Optional, Union, cast diff --git a/datacube_ows/styles/ramp.py b/datacube_ows/styles/ramp.py index 77aca93f1..bdacd8cec 100644 --- a/datacube_ows/styles/ramp.py +++ b/datacube_ows/styles/ramp.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import io import logging diff --git a/datacube_ows/tile_matrix_sets.py b/datacube_ows/tile_matrix_sets.py index e24064376..f322432fc 100644 --- a/datacube_ows/tile_matrix_sets.py +++ b/datacube_ows/tile_matrix_sets.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datacube_ows.config_utils import OWSConfigEntry from datacube_ows.ogc_utils import ConfigException diff --git a/datacube_ows/update_ranges_impl.py b/datacube_ows/update_ranges_impl.py index a706441e8..a449d4a1c 100755 --- a/datacube_ows/update_ranges_impl.py +++ b/datacube_ows/update_ranges_impl.py @@ -2,7 +2,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/datacube_ows/utils.py b/datacube_ows/utils.py index 5a3cdc05a..f83829872 100644 --- a/datacube_ows/utils.py +++ b/datacube_ows/utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime import logging diff --git a/datacube_ows/wcs1.py b/datacube_ows/wcs1.py index 31184fa3d..9db8fe4ca 100644 --- a/datacube_ows/wcs1.py +++ b/datacube_ows/wcs1.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from flask import render_template diff --git a/datacube_ows/wcs1_utils.py b/datacube_ows/wcs1_utils.py index 4a95df4a2..c8b5a6d03 100644 --- a/datacube_ows/wcs1_utils.py +++ b/datacube_ows/wcs1_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import numpy import pytz diff --git a/datacube_ows/wcs2.py b/datacube_ows/wcs2.py index 7c55f5542..2c4ddeb37 100644 --- a/datacube_ows/wcs2.py +++ b/datacube_ows/wcs2.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/datacube_ows/wcs2_utils.py b/datacube_ows/wcs2_utils.py index 7fab81911..41bdb20d6 100644 --- a/datacube_ows/wcs2_utils.py +++ b/datacube_ows/wcs2_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import collections import logging diff --git a/datacube_ows/wcs_scaler.py b/datacube_ows/wcs_scaler.py index 50c931ba4..ddfebe39b 100644 --- a/datacube_ows/wcs_scaler.py +++ b/datacube_ows/wcs_scaler.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from affine import Affine from datacube.utils import geometry diff --git a/datacube_ows/wcs_utils.py b/datacube_ows/wcs_utils.py index 649cc4e21..3ada02eb7 100644 --- a/datacube_ows/wcs_utils.py +++ b/datacube_ows/wcs_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datacube_ows.ogc_exceptions import WCS1Exception, WCS2Exception diff --git a/datacube_ows/wms.py b/datacube_ows/wms.py index c00b21d61..3ce5b3eae 100644 --- a/datacube_ows/wms.py +++ b/datacube_ows/wms.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from flask import render_template diff --git a/datacube_ows/wms_utils.py b/datacube_ows/wms_utils.py index b4aaaf052..5bc97a65b 100644 --- a/datacube_ows/wms_utils.py +++ b/datacube_ows/wms_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import math from datetime import datetime diff --git a/datacube_ows/wmts.py b/datacube_ows/wmts.py index 7c944ae0b..da3edefb9 100644 --- a/datacube_ows/wmts.py +++ b/datacube_ows/wmts.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/datacube_ows/wsgi.py b/datacube_ows/wsgi.py index 6feb50179..6c7623918 100644 --- a/datacube_ows/wsgi.py +++ b/datacube_ows/wsgi.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 #pylint: skip-file diff --git a/docker-compose.yaml b/docker-compose.yaml index 7c263e346..1c89eed34 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,7 +11,7 @@ services: - opendatacube/ows:_builder image: opendatacube/ows:latest # Uncomment for use with non-dockerised postgres (for docker-compose 1.x) - # network_mode: host + network_mode: host environment: # Defaults are defined in .env file AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} diff --git a/docs/conf.py b/docs/conf.py index 1fe783622..6b461f468 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,17 +1,10 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# This file is part of datacube-ows, part of the Open Data Cube project. +# See https://opendatacube.org for more information. # -# datacube_ows documentation build configuration file, created by -# sphinx-quickstart on Tue Jul 9 22:26:36 2013. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. +# Copyright (c) 2017-2023 OWS Contributors +# SPDX-License-Identifier: Apache-2.0 import os import sys diff --git a/integration_tests/__init__.py b/integration_tests/__init__.py index 644dbe42f..bdebc4f4a 100644 --- a/integration_tests/__init__.py +++ b/integration_tests/__init__.py @@ -1,5 +1,5 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 diff --git a/integration_tests/cfg/__init__.py b/integration_tests/cfg/__init__.py index 644dbe42f..bdebc4f4a 100644 --- a/integration_tests/cfg/__init__.py +++ b/integration_tests/cfg/__init__.py @@ -1,5 +1,5 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 diff --git a/integration_tests/cfg/ows_test_cfg.py b/integration_tests/cfg/ows_test_cfg.py index 835da0efe..a85441e25 100644 --- a/integration_tests/cfg/ows_test_cfg.py +++ b/integration_tests/cfg/ows_test_cfg.py @@ -2,7 +2,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/integration_tests/cfg/ows_test_cfg_bad.py b/integration_tests/cfg/ows_test_cfg_bad.py index ba67cba0e..38088fe45 100644 --- a/integration_tests/cfg/ows_test_cfg_bad.py +++ b/integration_tests/cfg/ows_test_cfg_bad.py @@ -2,7 +2,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 diff --git a/integration_tests/cfg/ows_test_cfg_no_i18n.py b/integration_tests/cfg/ows_test_cfg_no_i18n.py index 85f36bb5e..597aff074 100644 --- a/integration_tests/cfg/ows_test_cfg_no_i18n.py +++ b/integration_tests/cfg/ows_test_cfg_no_i18n.py @@ -2,7 +2,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 diff --git a/integration_tests/conftest.py b/integration_tests/conftest.py index 253db7f3e..682b51ae0 100644 --- a/integration_tests/conftest.py +++ b/integration_tests/conftest.py @@ -1,8 +1,7 @@ -# isort: skip_file # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/integration_tests/test_cfg_parser.py b/integration_tests/test_cfg_parser.py index 71b50a735..d98788459 100644 --- a/integration_tests/test_cfg_parser.py +++ b/integration_tests/test_cfg_parser.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/integration_tests/test_cube_pool.py b/integration_tests/test_cube_pool.py index 9122eaa58..054c2ec70 100644 --- a/integration_tests/test_cube_pool.py +++ b/integration_tests/test_cube_pool.py @@ -1,3 +1,8 @@ +# This file is part of datacube-ows, part of the Open Data Cube project. +# See https://opendatacube.org for more information. +# +# Copyright (c) 2017-2023 OWS Contributors +# SPDX-License-Identifier: Apache-2.0 from datacube import Datacube from datacube_ows.cube_pool import get_cube diff --git a/integration_tests/test_i18n.py b/integration_tests/test_i18n.py index 05dcc4ccf..35edb778a 100644 --- a/integration_tests/test_i18n.py +++ b/integration_tests/test_i18n.py @@ -1,3 +1,8 @@ +# This file is part of datacube-ows, part of the Open Data Cube project. +# See https://opendatacube.org for more information. +# +# Copyright (c) 2017-2023 OWS Contributors +# SPDX-License-Identifier: Apache-2.0 import requests diff --git a/integration_tests/test_layers.py b/integration_tests/test_layers.py index 9fdf29fba..1a1e5c2e4 100644 --- a/integration_tests/test_layers.py +++ b/integration_tests/test_layers.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/integration_tests/test_mv_index.py b/integration_tests/test_mv_index.py index 46532d21a..4ae9d71a0 100644 --- a/integration_tests/test_mv_index.py +++ b/integration_tests/test_mv_index.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import pytest from datacube.utils.geometry import box diff --git a/integration_tests/test_routes.py b/integration_tests/test_routes.py index 61f02e57d..84fb75b29 100644 --- a/integration_tests/test_routes.py +++ b/integration_tests/test_routes.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 """Run with DB to simulate actual function """ diff --git a/integration_tests/test_update_ranges.py b/integration_tests/test_update_ranges.py index 790804c1e..35bdb9ac8 100644 --- a/integration_tests/test_update_ranges.py +++ b/integration_tests/test_update_ranges.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 """Test update ranges on DB using Click testing https://click.palletsprojects.com/en/7.x/testing/ diff --git a/integration_tests/test_version.py b/integration_tests/test_version.py index 09c67631f..dc63df857 100644 --- a/integration_tests/test_version.py +++ b/integration_tests/test_version.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 """Test update ranges on DB using Click testing https://click.palletsprojects.com/en/7.x/testing/ diff --git a/integration_tests/test_wcs_server.py b/integration_tests/test_wcs_server.py index 1aad02953..2a3bb8edc 100644 --- a/integration_tests/test_wcs_server.py +++ b/integration_tests/test_wcs_server.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from urllib import request diff --git a/integration_tests/test_wms_server.py b/integration_tests/test_wms_server.py index 3f952f2f6..a75e8a259 100644 --- a/integration_tests/test_wms_server.py +++ b/integration_tests/test_wms_server.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from urllib import request diff --git a/integration_tests/test_wmts_server.py b/integration_tests/test_wmts_server.py index f10b7a313..5b17af940 100644 --- a/integration_tests/test_wmts_server.py +++ b/integration_tests/test_wmts_server.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from urllib import request diff --git a/integration_tests/utils.py b/integration_tests/utils.py index 8c2189ab9..145d6e33a 100644 --- a/integration_tests/utils.py +++ b/integration_tests/utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import enum diff --git a/setup.py b/setup.py index 5f1ba31cc..4d932061f 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from setuptools import find_packages, setup diff --git a/tests/__init__.py b/tests/__init__.py index 24d6a7461..f39503754 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -2,5 +2,5 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/cfg/__init__.py b/tests/cfg/__init__.py index 24d6a7461..f39503754 100644 --- a/tests/cfg/__init__.py +++ b/tests/cfg/__init__.py @@ -2,5 +2,5 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/cfg/broken_nested.py b/tests/cfg/broken_nested.py index db7081d0b..188d687e7 100644 --- a/tests/cfg/broken_nested.py +++ b/tests/cfg/broken_nested.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 mixed_3 = { diff --git a/tests/cfg/minimal_cfg.py b/tests/cfg/minimal_cfg.py index 771410883..8abe45790 100644 --- a/tests/cfg/minimal_cfg.py +++ b/tests/cfg/minimal_cfg.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 ows_cfg = { "global": { diff --git a/tests/cfg/mixed_nested.py b/tests/cfg/mixed_nested.py index 9f238b31f..995ab2776 100644 --- a/tests/cfg/mixed_nested.py +++ b/tests/cfg/mixed_nested.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 mixed_1 = { "include": "tests/cfg/simple.json", diff --git a/tests/cfg/nested.py b/tests/cfg/nested.py index 964aed695..3e874b1f7 100644 --- a/tests/cfg/nested.py +++ b/tests/cfg/nested.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/cfg/simple.py b/tests/cfg/simple.py index 0e53a3ebd..91e234212 100644 --- a/tests/cfg/simple.py +++ b/tests/cfg/simple.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/conftest.py b/tests/conftest.py index fcdf2e94a..b7ae3a85f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime from unittest.mock import MagicMock diff --git a/tests/test_band_utils.py b/tests/test_band_utils.py index 3f6975e2b..4c5f60118 100644 --- a/tests/test_band_utils.py +++ b/tests/test_band_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 """Test band math utilities """ diff --git a/tests/test_cfg_bandidx.py b/tests/test_cfg_bandidx.py index 31a67a553..be311491c 100644 --- a/tests/test_cfg_bandidx.py +++ b/tests/test_cfg_bandidx.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from unittest.mock import MagicMock diff --git a/tests/test_cfg_cache_ctrl.py b/tests/test_cfg_cache_ctrl.py index b16847ce6..21fa6d4b0 100644 --- a/tests/test_cfg_cache_ctrl.py +++ b/tests/test_cfg_cache_ctrl.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from unittest.mock import MagicMock diff --git a/tests/test_cfg_global.py b/tests/test_cfg_global.py index 36e8d3f59..4ef73f19d 100644 --- a/tests/test_cfg_global.py +++ b/tests/test_cfg_global.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/tests/test_cfg_inclusion.py b/tests/test_cfg_inclusion.py index 5826253fd..10feeb061 100644 --- a/tests/test_cfg_inclusion.py +++ b/tests/test_cfg_inclusion.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import os import sys diff --git a/tests/test_cfg_layer.py b/tests/test_cfg_layer.py index 2e201f1d3..87e0e951d 100644 --- a/tests/test_cfg_layer.py +++ b/tests/test_cfg_layer.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime import math diff --git a/tests/test_cfg_metadata_types.py b/tests/test_cfg_metadata_types.py index 777255361..34f62d7d1 100644 --- a/tests/test_cfg_metadata_types.py +++ b/tests/test_cfg_metadata_types.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from unittest.mock import MagicMock diff --git a/tests/test_cfg_tile_matrix_set.py b/tests/test_cfg_tile_matrix_set.py index 3736ebc25..5e641dc8e 100644 --- a/tests/test_cfg_tile_matrix_set.py +++ b/tests/test_cfg_tile_matrix_set.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from unittest.mock import MagicMock diff --git a/tests/test_cfg_wcs.py b/tests/test_cfg_wcs.py index 877c2b2dd..396e02bc0 100644 --- a/tests/test_cfg_wcs.py +++ b/tests/test_cfg_wcs.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from unittest.mock import patch diff --git a/tests/test_config_toolkit.py b/tests/test_config_toolkit.py index 21d097425..9c19955b8 100644 --- a/tests/test_config_toolkit.py +++ b/tests/test_config_toolkit.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datacube_ows.config_toolkit import deepinherit diff --git a/tests/test_data.py b/tests/test_data.py index 2f7d3da74..b503ef795 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime from unittest.mock import MagicMock diff --git a/tests/test_legend_generator.py b/tests/test_legend_generator.py index ae9f9cb61..663324b36 100644 --- a/tests/test_legend_generator.py +++ b/tests/test_legend_generator.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from decimal import Decimal from unittest.mock import MagicMock diff --git a/tests/test_mpl_cmaps.py b/tests/test_mpl_cmaps.py index 9bd96a4cf..80e6eecfa 100644 --- a/tests/test_mpl_cmaps.py +++ b/tests/test_mpl_cmaps.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 """ Test creation of colour maps from matplotlib diff --git a/tests/test_multidate_handler.py b/tests/test_multidate_handler.py index 9d192a874..fc6b6b3e6 100644 --- a/tests/test_multidate_handler.py +++ b/tests/test_multidate_handler.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import numpy as np import pandas as pd diff --git a/tests/test_mv_selopts.py b/tests/test_mv_selopts.py index 5bc89e7e8..6192189d9 100644 --- a/tests/test_mv_selopts.py +++ b/tests/test_mv_selopts.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datacube_ows.mv_index import MVSelectOpts diff --git a/tests/test_no_db_routes.py b/tests/test_no_db_routes.py index 294cd7088..bf55d1560 100644 --- a/tests/test_no_db_routes.py +++ b/tests/test_no_db_routes.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 """Run with no DB to simulate connection failure """ diff --git a/tests/test_ogc_utils.py b/tests/test_ogc_utils.py index 28d32dca5..0ddf3af14 100644 --- a/tests/test_ogc_utils.py +++ b/tests/test_ogc_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime from unittest.mock import MagicMock diff --git a/tests/test_ows_configuration.py b/tests/test_ows_configuration.py index d49f8f62c..24373a743 100644 --- a/tests/test_ows_configuration.py +++ b/tests/test_ows_configuration.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from unittest.mock import MagicMock diff --git a/tests/test_protocol_versions.py b/tests/test_protocol_versions.py index f07855eb0..542757222 100644 --- a/tests/test_protocol_versions.py +++ b/tests/test_protocol_versions.py @@ -1,3 +1,8 @@ +# This file is part of datacube-ows, part of the Open Data Cube project. +# See https://opendatacube.org for more information. +# +# Copyright (c) 2017-2023 OWS Contributors +# SPDX-License-Identifier: Apache-2.0 import pytest import datacube_ows.protocol_versions diff --git a/tests/test_pyproj.py b/tests/test_pyproj.py index d6771120f..98f1eaacb 100644 --- a/tests/test_pyproj.py +++ b/tests/test_pyproj.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from pyproj import CRS diff --git a/tests/test_qprof.py b/tests/test_qprof.py index c76716a06..a26be503f 100644 --- a/tests/test_qprof.py +++ b/tests/test_qprof.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datacube_ows.query_profiler import QueryProfiler diff --git a/tests/test_resource_limits.py b/tests/test_resource_limits.py index c0720fbbe..7bc1755ff 100644 --- a/tests/test_resource_limits.py +++ b/tests/test_resource_limits.py @@ -1,3 +1,8 @@ +# This file is part of datacube-ows, part of the Open Data Cube project. +# See https://opendatacube.org for more information. +# +# Copyright (c) 2017-2023 OWS Contributors +# SPDX-License-Identifier: Apache-2.0 import pytest from datacube.utils import geometry as geom diff --git a/tests/test_startup.py b/tests/test_startup.py index 77c08c740..3fa7975ef 100644 --- a/tests/test_startup.py +++ b/tests/test_startup.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/test_style_api.py b/tests/test_style_api.py index c78892016..461eb9384 100644 --- a/tests/test_style_api.py +++ b/tests/test_style_api.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from decimal import Decimal diff --git a/tests/test_styles.py b/tests/test_styles.py index 5a7055da7..bb5d1f659 100644 --- a/tests/test_styles.py +++ b/tests/test_styles.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime from unittest.mock import MagicMock, patch diff --git a/tests/test_time_res_method.py b/tests/test_time_res_method.py index 2f30cfb38..70d6c9878 100644 --- a/tests/test_time_res_method.py +++ b/tests/test_time_res_method.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datetime import datetime diff --git a/tests/test_utils.py b/tests/test_utils.py index 45a19286c..5b3422761 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2022 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime from unittest.mock import MagicMock diff --git a/tests/test_wcs2_utils.py b/tests/test_wcs2_utils.py index 6e67ea545..a3029d8ad 100644 --- a/tests/test_wcs2_utils.py +++ b/tests/test_wcs2_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from unittest.mock import MagicMock diff --git a/tests/test_wcs_scaler.py b/tests/test_wcs_scaler.py index 1b4e9f559..72b6d86eb 100644 --- a/tests/test_wcs_scaler.py +++ b/tests/test_wcs_scaler.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime diff --git a/tests/test_wms_utils.py b/tests/test_wms_utils.py index 159e6b25a..ca1d9812c 100644 --- a/tests/test_wms_utils.py +++ b/tests/test_wms_utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime from unittest.mock import MagicMock diff --git a/tests/utils.py b/tests/utils.py index 55426eaec..a3c6ffeae 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import datetime diff --git a/update_ranges.py b/update_ranges.py index edcad2471..f994f52e1 100644 --- a/update_ranges.py +++ b/update_ranges.py @@ -1,7 +1,7 @@ # This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # -# Copyright (c) 2017-2021 OWS Contributors +# Copyright (c) 2017-2023 OWS Contributors # SPDX-License-Identifier: Apache-2.0 from datacube_ows.update_ranges_impl import main From 628cd4917b9eeaa88fa3adef260b34a664a4e772 Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Mon, 13 Nov 2023 10:38:55 +1100 Subject: [PATCH 3/5] Attempt simple fix for non-UTC-indexed data. --- datacube_ows/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacube_ows/data.py b/datacube_ows/data.py index b03d87074..407985b72 100644 --- a/datacube_ows/data.py +++ b/datacube_ows/data.py @@ -843,7 +843,7 @@ def feature_info(args): if params.product.time_resolution.is_summary(): date_info["time"] = ds.time.begin.strftime("%Y-%m-%d") else: - date_info["time"] = dataset_center_time(ds).strftime("%Y-%m-%d %H:%M:%S UTC") + date_info["time"] = dataset_center_time(ds).strftime("%Y-%m-%d %H:%M:%S %Z") # Collect raw band values for pixel and derived bands from styles date_info["bands"] = _make_band_dict(params.product, pixel_ds) derived_band_dict = _make_derived_band_dict(pixel_ds, params.product.style_index) From 7e0182477bcc35c76b81fab368d7a8a863503257 Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Mon, 13 Nov 2023 10:48:51 +1100 Subject: [PATCH 4/5] Revert accidental commit of local dev environment. --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 1c89eed34..7c263e346 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,7 +11,7 @@ services: - opendatacube/ows:_builder image: opendatacube/ows:latest # Uncomment for use with non-dockerised postgres (for docker-compose 1.x) - network_mode: host + # network_mode: host environment: # Defaults are defined in .env file AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} From 96fd7c2fc83655b085739c3c4e509e759e33d157 Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Tue, 14 Nov 2023 15:35:15 +1100 Subject: [PATCH 5/5] Convert indexed times to UTC before performing solar day calculations in update_ranges. --- datacube_ows/product_ranges.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datacube_ows/product_ranges.py b/datacube_ows/product_ranges.py index f38b83d35..088759003 100644 --- a/datacube_ows/product_ranges.py +++ b/datacube_ows/product_ranges.py @@ -7,7 +7,7 @@ #pylint: skip-file import math -from datetime import datetime +from datetime import datetime, timezone import datacube from psycopg2.extras import Json @@ -199,6 +199,7 @@ def create_range_entry(dc, product, crses, time_resolution): for result in results: dt1, dt2, lon = result dt = dt1 + (dt2 - dt1) / 2 + dt = dt.astimezone(timezone.utc) solar_day = datacube.api.query._convert_to_solar_time(dt, lon).date() dates.add(solar_day)