diff --git a/.coveragerc b/.coveragerc index f01d56fcc..e1172a98b 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,4 +3,4 @@ data_file = /tmp/.coverage [xml] -output = /tmp/coverage.xml \ No newline at end of file +output = /tmp/coverage.xml diff --git a/.dockerignore b/.dockerignore index ac899de76..aef8b076e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,3 @@ datacube_wms/wms_cfg_local.py .pytest_cache -*/__pycache__ \ No newline at end of file +*/__pycache__ diff --git a/.env_ows_root b/.env_ows_root index a38980af8..bc3ccc514 100644 --- a/.env_ows_root +++ b/.env_ows_root @@ -21,4 +21,4 @@ FLASK_DEBUG= prometheus_multiproc_dir=/tmp PYTHONPATH=/env/config DATACUBE_OWS_CFG=ows_refactored.ows_root_cfg.ows_cfg -SENTRY_DSN= \ No newline at end of file +SENTRY_DSN= diff --git a/.env_simple b/.env_simple index 68f6b52ce..5d4fe003f 100644 --- a/.env_simple +++ b/.env_simple @@ -21,4 +21,4 @@ FLASK_DEBUG= prometheus_multiproc_dir=/tmp PYTHONPATH=/env DATACUBE_OWS_CFG=config.ows_test_cfg.ows_cfg -SENTRY_DSN= \ No newline at end of file +SENTRY_DSN= diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md index be9afe380..b1fbc3ac2 100644 --- a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md @@ -25,4 +25,4 @@ assignees: '' ### datacube product metadata (datacube product show product_name) - \ No newline at end of file + diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8841fedec..52a7a672e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -49,4 +49,4 @@ jobs: # tag and push images docker tag ${ORG}/${IMAGE}:latest ${ORG}/${IMAGE}:${tag} docker push ${ORG}/${IMAGE}:latest - docker push ${ORG}/${IMAGE}:${tag} \ No newline at end of file + docker push ${ORG}/${IMAGE}:${tag} diff --git a/.github/workflows/dockerfile-lint.yml b/.github/workflows/dockerfile-lint.yml index aebe7448f..ae31aa2e6 100644 --- a/.github/workflows/dockerfile-lint.yml +++ b/.github/workflows/dockerfile-lint.yml @@ -31,4 +31,4 @@ jobs: uses: hadolint/hadolint-action@v1.5.0 with: dockerfile: Dockerfile - ignore: DL3008 DL3002 DL3013 DL3059 SC2102 \ No newline at end of file + ignore: DL3008 DL3002 DL3013 DL3059 SC2102 diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 34dae2fb3..5fe86eb0d 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -46,4 +46,4 @@ jobs: if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master with: - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/pyspellcheck.yaml b/.github/workflows/pyspellcheck.yaml index d2255e860..0b782ebb4 100644 --- a/.github/workflows/pyspellcheck.yaml +++ b/.github/workflows/pyspellcheck.yaml @@ -29,4 +29,4 @@ jobs: # Spellcheck - uses: actions/checkout@v2 - uses: igsekor/pyspelling-any@v0.0.2 - name: Spellcheck \ No newline at end of file + name: Spellcheck diff --git a/.github/workflows/pyspy-profiling.yaml b/.github/workflows/pyspy-profiling.yaml index 261d8e3d2..3e37177bb 100644 --- a/.github/workflows/pyspy-profiling.yaml +++ b/.github/workflows/pyspy-profiling.yaml @@ -75,4 +75,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: profile.json - path: ./artifacts/profile.json \ No newline at end of file + path: ./artifacts/profile.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 065a77aeb..3fa13e358 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,4 +69,4 @@ jobs: uses: codecov/codecov-action@v3 with: directory: ./artifacts/ - fail_ci_if_error: false \ No newline at end of file + fail_ci_if_error: false diff --git a/.yamllint b/.yamllint index df87adf48..cb062f375 100644 --- a/.yamllint +++ b/.yamllint @@ -28,7 +28,3 @@ rules: colons: disable comments: disable comments-indentation: disable - - - - diff --git a/Dockerfile b/Dockerfile index 1e9088993..c97431f45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ COPY --from=builder /usr/local/bin/flask /usr/local/bin/flask # gunicorn cli COPY --from=builder /usr/local/bin/gunicorn /usr/local/bin/gunicorn # pybabel cli -COPY --from=builder /usr/local/bin/pybabel /usr/local/bin/pybabel +COPY --from=builder /usr/local/bin/pybabel /usr/local/bin/pybabel # make folders for testing and keep code in image RUN mkdir -p /code # Copy source code and install it diff --git a/LICENSE b/LICENSE index ce056cb61..124c400c7 100644 --- a/LICENSE +++ b/LICENSE @@ -12,4 +12,3 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - diff --git a/SECURITY.md b/SECURITY.md index 3c6825fc1..df92e090e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -7,7 +7,7 @@ included in the normal release cycle. ## Reporting a Vulnerability -Security vulnerabilities can be reported as regular Github issues. If there -are concerns about early public disclosure, security vulnerabilities can be +Security vulnerabilities can be reported as regular Github issues. If there +are concerns about early public disclosure, security vulnerabilities can be reported to Paul Haesler, either by direct message on the opendatacube Slack, or by email to `paul (dot) haesler (at) ga (dot) gov (dot) au`. diff --git a/complementary_config_test/.env_complementary_config_dea_dev b/complementary_config_test/.env_complementary_config_dea_dev index 357ca023b..b3ff91537 100644 --- a/complementary_config_test/.env_complementary_config_dea_dev +++ b/complementary_config_test/.env_complementary_config_dea_dev @@ -19,4 +19,4 @@ PYDEV_DEBUG= FLASK_ENV=development prometheus_multiproc_dir=/tmp PYTHONPATH=/env/config -DATACUBE_OWS_CFG=ows_refactored.ows_root_cfg.ows_cfg \ No newline at end of file +DATACUBE_OWS_CFG=ows_refactored.ows_root_cfg.ows_cfg diff --git a/datacube_ows/config_toolkit.py b/datacube_ows/config_toolkit.py index f7c8f905e..31ad9c956 100644 --- a/datacube_ows/config_toolkit.py +++ b/datacube_ows/config_toolkit.py @@ -49,5 +49,3 @@ def deepupdate(target: MutableMapping[str, Any], src: MutableMapping[str, Any]) except TypeError: # Non-iterable - Use child's version target[k] = src[k] - - diff --git a/datacube_ows/data.py b/datacube_ows/data.py index 0dadb3486..39170f5e8 100644 --- a/datacube_ows/data.py +++ b/datacube_ows/data.py @@ -646,7 +646,7 @@ def get_s3_browser_uris(datasets, pt=None, s3url="", s3bucket=""): def convert(uri): uri_format = "http://{bucket}.s3-website-ap-southeast-2.amazonaws.com/?prefix={prefix}" uri_format_prod = str(s3url) + "/?prefix={prefix}" - result = regex.match(uri) + result = regex.match(uri) if result is not None: if result.group("bucket") == str(s3bucket): new_uri = uri_format_prod.format(prefix=result.group("prefix")) diff --git a/datacube_ows/ogc.py b/datacube_ows/ogc.py index 64d04505c..941065538 100644 --- a/datacube_ows/ogc.py +++ b/datacube_ows/ogc.py @@ -253,4 +253,3 @@ def log_time_and_request_response(response): ip = 'Not found' _LOG.info("ip: %s request: %s returned status: %d and took: %d ms", ip, request.url, response.status_code, time_taken) return response - diff --git a/datacube_ows/ogc_utils.py b/datacube_ows/ogc_utils.py index 27b2c7626..d39dcc490 100644 --- a/datacube_ows/ogc_utils.py +++ b/datacube_ows/ogc_utils.py @@ -554,7 +554,7 @@ def xarray_image_as_png(img_data, loop_over=None, animate=False, frame_duration= for coord in img_data.coords[loop_over].values ] images = [] - + for t_slice in time_slices_array: im = Image.fromarray(t_slice, "RGBA") images.append(im) @@ -568,7 +568,7 @@ def xarray_image_as_png(img_data, loop_over=None, animate=False, frame_duration= pillow_data = render_frame(img_data.transpose(xcoord, ycoord), width, height) if not loop_over and animate: return pillow_data - + # Change PNG rendering to Pillow im_final = Image.fromarray(pillow_data, "RGBA") im_final.save(img_io, "PNG") diff --git a/datacube_ows/ows_configuration.py b/datacube_ows/ows_configuration.py index 039f904fa..7d4797587 100644 --- a/datacube_ows/ows_configuration.py +++ b/datacube_ows/ows_configuration.py @@ -1198,7 +1198,7 @@ def export_metadata(self): header_comment=f"""# Translations for datacube-ows metadata instance: # {self.title} # -# {self.contact_info.organisation} {now.isoformat()} +# {self.contact_info.organisation} {now.isoformat()} #""", project=self.title, version=f"{now.isoformat()}", @@ -1417,4 +1417,3 @@ def get_config(refresh=False, called_from_update_ranges=False): except ODCInitException: pass return cfg - diff --git a/datacube_ows/sql/extent_views/create/030_rename_old_space_time_view.sql b/datacube_ows/sql/extent_views/create/030_rename_old_space_time_view.sql index 980c6e2e5..af6170759 100644 --- a/datacube_ows/sql/extent_views/create/030_rename_old_space_time_view.sql +++ b/datacube_ows/sql/extent_views/create/030_rename_old_space_time_view.sql @@ -1,4 +1,4 @@ -- Renaming old spacetime view (OWS down) ALTER MATERIALIZED VIEW IF EXISTS space_time_view -RENAME TO space_time_view_old \ No newline at end of file +RENAME TO space_time_view_old diff --git a/datacube_ows/sql/extent_views/create/040_drop_old_space_time_view.sql b/datacube_ows/sql/extent_views/create/040_drop_old_space_time_view.sql index 58b6ec888..08fd0cae2 100644 --- a/datacube_ows/sql/extent_views/create/040_drop_old_space_time_view.sql +++ b/datacube_ows/sql/extent_views/create/040_drop_old_space_time_view.sql @@ -1,3 +1,3 @@ -- Dropping OLD spacetime view (and indexes) -DROP MATERIALIZED VIEW IF EXISTS space_time_view_old \ No newline at end of file +DROP MATERIALIZED VIEW IF EXISTS space_time_view_old diff --git a/datacube_ows/sql/extent_views/create/041_drop_old_time_view.sql b/datacube_ows/sql/extent_views/create/041_drop_old_time_view.sql index 310724737..bb6b1fc7f 100644 --- a/datacube_ows/sql/extent_views/create/041_drop_old_time_view.sql +++ b/datacube_ows/sql/extent_views/create/041_drop_old_time_view.sql @@ -1,3 +1,3 @@ -- Dropping OLD time view -DROP MATERIALIZED VIEW IF EXISTS time_view \ No newline at end of file +DROP MATERIALIZED VIEW IF EXISTS time_view diff --git a/datacube_ows/sql/extent_views/create/042_drop_old_space_view.sql b/datacube_ows/sql/extent_views/create/042_drop_old_space_view.sql index d52cb64e0..0e1cf8525 100644 --- a/datacube_ows/sql/extent_views/create/042_drop_old_space_view.sql +++ b/datacube_ows/sql/extent_views/create/042_drop_old_space_view.sql @@ -1,3 +1,3 @@ -- Dropping OLD space view -DROP MATERIALIZED VIEW IF EXISTS space_view \ No newline at end of file +DROP MATERIALIZED VIEW IF EXISTS space_view diff --git a/datacube_ows/sql/extent_views/create/060_grant.sql b/datacube_ows/sql/extent_views/create/060_grant.sql index 12b40ff7b..dda7822ee 100644 --- a/datacube_ows/sql/extent_views/create/060_grant.sql +++ b/datacube_ows/sql/extent_views/create/060_grant.sql @@ -1,4 +1,3 @@ -- Granting read permission to public GRANT SELECT ON space_time_view TO public; - diff --git a/datacube_ows/sql/use_space_time.sql b/datacube_ows/sql/use_space_time.sql index ef1275241..9687315da 100644 --- a/datacube_ows/sql/use_space_time.sql +++ b/datacube_ows/sql/use_space_time.sql @@ -2,10 +2,10 @@ --- from indexed materialized views select dataset_type_ref, ST_Extent(spatial_extent) as bbox, array_agg(temporal_extent) from space_time_view group by dataset_type_ref; ------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------QUERY PLAN---------------------------------------------------------------- +-----------------------------------------------------------QUERY PLAN---------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------- --HashAggregate (cost=316452.75..316453.50 rows=50 width=99) (actual time=9850.712..10340.107 rows=74 loops=1) -- Group Key: dataset_type_ref -- -> Seq Scan on space_time_view (cost=0.00..255246.00 rows=8160900 width=128) (actual time=0.009..2750.915 rows=8160900 loops=1) -- Planning Time: 0.502 ms --- Execution Time: 10364.716 ms \ No newline at end of file +-- Execution Time: 10364.716 ms diff --git a/datacube_ows/sql/wms_schema/create/003_create_subproduct_rng.sql b/datacube_ows/sql/wms_schema/create/003_create_subproduct_rng.sql index 2fd6bcbc0..a11b7e688 100644 --- a/datacube_ows/sql/wms_schema/create/003_create_subproduct_rng.sql +++ b/datacube_ows/sql/wms_schema/create/003_create_subproduct_rng.sql @@ -14,4 +14,3 @@ create table if not exists wms.sub_product_ranges ( bboxes jsonb not null, constraint pk_sub_product_ranges primary key (product_id, sub_product_id) ); - diff --git a/datacube_ows/styles/api/base.py b/datacube_ows/styles/api/base.py index ef09640e9..c1d660dfe 100644 --- a/datacube_ows/styles/api/base.py +++ b/datacube_ows/styles/api/base.py @@ -195,4 +195,3 @@ def plot_image_with_style_cfg(cfg, data, x="x", y="y", size=10, aspect=None, val :param valid_data_mask: (optional) An xarray DataArray mask, with dimensions and coordinates matching data. """ plot_image(apply_ows_style_cfg(cfg, data, valid_data_mask=valid_data_mask), x=x, y=y, size=size, aspect=aspect) - diff --git a/datacube_ows/styles/expression.py b/datacube_ows/styles/expression.py index bfe97e9d3..719941c09 100644 --- a/datacube_ows/styles/expression.py +++ b/datacube_ows/styles/expression.py @@ -124,4 +124,3 @@ def var_name(self, key): def __call__(self, data: "xarray.Dataset") -> Any: evaluator: ExpressionEvaluator = self.eval_cls(data) return evaluator.transform(self.tree) - diff --git a/datacube_ows/templates/html_feature_info.html b/datacube_ows/templates/html_feature_info.html index a69572c68..c89f77219 100644 --- a/datacube_ows/templates/html_feature_info.html +++ b/datacube_ows/templates/html_feature_info.html @@ -60,4 +60,4 @@
No Data
{% endif %}