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 @@

Data Sources

No Data

{% endif %} - \ No newline at end of file + diff --git a/datacube_ows/templates/index.html b/datacube_ows/templates/index.html index 870d8ce33..5a3b82e77 100644 --- a/datacube_ows/templates/index.html +++ b/datacube_ows/templates/index.html @@ -115,4 +115,4 @@
WCS (OGC Web Coverage Service)
- \ No newline at end of file + diff --git a/datacube_ows/templates/ping.html b/datacube_ows/templates/ping.html index b01a330d9..a7af26f0c 100644 --- a/datacube_ows/templates/ping.html +++ b/datacube_ows/templates/ping.html @@ -8,4 +8,4 @@

PONG!!

Database: {{ status }}

- \ No newline at end of file + diff --git a/datacube_ows/templates/test_client.html b/datacube_ows/templates/test_client.html index 941e1d540..6176d6553 100644 --- a/datacube_ows/templates/test_client.html +++ b/datacube_ows/templates/test_client.html @@ -26,7 +26,7 @@ var end = new Date(2006, 3, 1); var mymap = L.map('mapid').setView([-35.0, 148.75], 12); - mbUrl = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png'; + mbUrl = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png'; osm = L.tileLayer(mbUrl, {id: 'mapbox.light', attribution: ""}); cube = L.tileLayer.wms( "{{ url_for('wms_impl') }}", @@ -86,4 +86,3 @@ - diff --git a/datacube_ows/templates/wcs_desc_coverage.xml b/datacube_ows/templates/wcs_desc_coverage.xml index 249731ce8..cc860da01 100644 --- a/datacube_ows/templates/wcs_desc_coverage.xml +++ b/datacube_ows/templates/wcs_desc_coverage.xml @@ -114,4 +114,4 @@ {% endfor %} - \ No newline at end of file + diff --git a/datacube_ows/tile_matrix_sets.py b/datacube_ows/tile_matrix_sets.py index e5e66ff53..e24064376 100644 --- a/datacube_ows/tile_matrix_sets.py +++ b/datacube_ows/tile_matrix_sets.py @@ -125,4 +125,3 @@ def wms_bbox_coords(self, tile_matrix, row, col): return ( mins[0], maxs[1], maxs[0], mins[1] ) - diff --git a/datacube_ows/update_ranges_impl.py b/datacube_ows/update_ranges_impl.py index ec7cb6ef7..f264c6c9f 100755 --- a/datacube_ows/update_ranges_impl.py +++ b/datacube_ows/update_ranges_impl.py @@ -177,5 +177,3 @@ def run_sql(dc, path, **params): else: conn.execute(sql) conn.close() - - diff --git a/docker-compose.cleandb.yaml b/docker-compose.cleandb.yaml index a4d34ee08..4b9e6b776 100644 --- a/docker-compose.cleandb.yaml +++ b/docker-compose.cleandb.yaml @@ -16,4 +16,4 @@ services: ports: - 8000:8000 environment: - DB_PORT: 5432 \ No newline at end of file + DB_PORT: 5432 diff --git a/docker/database/Dockerfile b/docker/database/Dockerfile index c864e760d..cc3af5d2d 100644 --- a/docker/database/Dockerfile +++ b/docker/database/Dockerfile @@ -1,2 +1,2 @@ FROM kartoza/postgis:13-3.1 -COPY s2_dump.sql /docker-entrypoint-initdb.d/ \ No newline at end of file +COPY s2_dump.sql /docker-entrypoint-initdb.d/ diff --git a/docker/database/dump.sql b/docker/database/dump.sql index b6f1c9de5..1c6f67233 100644 --- a/docker/database/dump.sql +++ b/docker/database/dump.sql @@ -1462,4 +1462,3 @@ REFRESH MATERIALIZED VIEW public.space_time_view; -- -- PostgreSQL database dump complete -- - diff --git a/docker/database/eo3_sentinel2_ard.sql b/docker/database/eo3_sentinel2_ard.sql index 488f27f3c..5a0243678 100644 --- a/docker/database/eo3_sentinel2_ard.sql +++ b/docker/database/eo3_sentinel2_ard.sql @@ -33,7 +33,7 @@ CREATE EXTENSION IF NOT EXISTS pg_cron WITH SCHEMA public; -- --- Name: EXTENSION pg_cron; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION pg_cron; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION pg_cron IS 'Job scheduler for PostgreSQL'; @@ -63,7 +63,7 @@ CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public; -- --- Name: EXTENSION hstore; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION hstore; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key, value) pairs'; @@ -77,7 +77,7 @@ CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public; -- --- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis IS 'PostGIS geometry and geography spatial types and functions'; @@ -91,7 +91,7 @@ CREATE EXTENSION IF NOT EXISTS pgrouting WITH SCHEMA public; -- --- Name: EXTENSION pgrouting; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION pgrouting; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION pgrouting IS 'pgRouting Extension'; @@ -105,7 +105,7 @@ CREATE EXTENSION IF NOT EXISTS postgis_raster WITH SCHEMA public; -- --- Name: EXTENSION postgis_raster; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION postgis_raster; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis_raster IS 'PostGIS raster types and functions'; @@ -119,7 +119,7 @@ CREATE EXTENSION IF NOT EXISTS postgis_topology WITH SCHEMA topology; -- --- Name: EXTENSION postgis_topology; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION postgis_topology; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis_topology IS 'PostGIS topology spatial types and functions'; @@ -6669,4 +6669,3 @@ ALTER DEFAULT PRIVILEGES FOR ROLE opendatacubeusername IN SCHEMA public GRANT SE -- -- PostgreSQL database dump complete -- - diff --git a/docker/database/s2_dump.sql b/docker/database/s2_dump.sql index 0a736b640..d20840b02 100644 --- a/docker/database/s2_dump.sql +++ b/docker/database/s2_dump.sql @@ -76,7 +76,7 @@ CREATE EXTENSION IF NOT EXISTS fuzzystrmatch WITH SCHEMA public; -- --- Name: EXTENSION fuzzystrmatch; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION fuzzystrmatch; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION fuzzystrmatch IS 'determine similarities and distance between strings'; @@ -90,7 +90,7 @@ CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public; -- --- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis IS 'PostGIS geometry and geography spatial types and functions'; @@ -104,7 +104,7 @@ CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder WITH SCHEMA tiger; -- --- Name: EXTENSION postgis_tiger_geocoder; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION postgis_tiger_geocoder; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis_tiger_geocoder IS 'PostGIS tiger geocoder and reverse geocoder'; @@ -118,7 +118,7 @@ CREATE EXTENSION IF NOT EXISTS postgis_topology WITH SCHEMA topology; -- --- Name: EXTENSION postgis_topology; Type: COMMENT; Schema: -; Owner: +-- Name: EXTENSION postgis_topology; Type: COMMENT; Schema: -; Owner: -- COMMENT ON EXTENSION postgis_topology IS 'PostGIS topology spatial types and functions'; @@ -1247,4 +1247,3 @@ REFRESH MATERIALIZED VIEW public.space_time_view; -- -- PostgreSQL database dump complete -- - diff --git a/docker/ows/wait-for-db b/docker/ows/wait-for-db index 0a4dee09a..732e49707 100755 --- a/docker/ows/wait-for-db +++ b/docker/ows/wait-for-db @@ -8,4 +8,4 @@ until pg_isready --dbname=$DB_DATABASE --host=$DB_HOSTNAME --port=$DB_PORT --use sleep 2 done -exec "$@" \ No newline at end of file +exec "$@" diff --git a/docker/pyspy/Dockerfile b/docker/pyspy/Dockerfile index 1d31609fc..114fff797 100644 --- a/docker/pyspy/Dockerfile +++ b/docker/pyspy/Dockerfile @@ -3,4 +3,4 @@ FROM python:3.6 RUN pip install py-spy WORKDIR /profiles ENTRYPOINT [ "py-spy" ] -CMD [] \ No newline at end of file +CMD [] diff --git a/docs/cfg_colourramp_styles.rst b/docs/cfg_colourramp_styles.rst index 583e82d0c..ed76c7b96 100644 --- a/docs/cfg_colourramp_styles.rst +++ b/docs/cfg_colourramp_styles.rst @@ -593,4 +593,4 @@ E.g. :: }, # The feature info label. "feature_info_label": "ndvi_delta", - } \ No newline at end of file + } diff --git a/docs/cfg_functions.rst b/docs/cfg_functions.rst index decaaa686..e6d2f2f68 100644 --- a/docs/cfg_functions.rst +++ b/docs/cfg_functions.rst @@ -124,7 +124,7 @@ True. #. datacube_ows.band_utils.pre_scaled_band Pre-scale a band with a scale factor and offset. - + (The scaling function is ``data[band] * scale + offset``) #. datacube_ows.band_utils.pre_scaled_sum_bands diff --git a/docs/cfg_layers.rst b/docs/cfg_layers.rst index 9a0af50e3..2252b8a9a 100644 --- a/docs/cfg_layers.rst +++ b/docs/cfg_layers.rst @@ -1242,4 +1242,4 @@ To lookup a layer by name use the "layer" element in the inherits section: Note that a layer can only inherit by name from a parent layer that has already been parsed by the config parser - i.e. it must appear earlier in the layer hierarchy. This restriction -can be avoided using direct inheritance. \ No newline at end of file +can be avoided using direct inheritance. diff --git a/docs/cfg_style_api.rst b/docs/cfg_style_api.rst index a4a76e8bb..4fcba26f0 100644 --- a/docs/cfg_style_api.rst +++ b/docs/cfg_style_api.rst @@ -244,4 +244,3 @@ PIL Image object will display the image in JupyterHub, Notebooks, etc. # Write out as PNG: with open("filename.png", "wb") as fp: image.save(fp) - diff --git a/docs/environment_variables.rst b/docs/environment_variables.rst index d75f79f31..4347de13f 100644 --- a/docs/environment_variables.rst +++ b/docs/environment_variables.rst @@ -129,4 +129,4 @@ OWS_CFG_COUNTAINER_FOLDER: path the OWS_CFG_FOLDER will mount to inside docker container PYTHONPATH: - PYTHONPATH to ows config file \ No newline at end of file + PYTHONPATH to ows config file diff --git a/docs/performance.rst b/docs/performance.rst index cdbfde837..1b013aa0d 100644 --- a/docs/performance.rst +++ b/docs/performance.rst @@ -53,4 +53,4 @@ Get Datacube-ows docker process id: :: Run py-spy: :: $COMPOSE_CHAIN run pyspy record -f speedscope -o profile.json \ - --pid $OWS_PID --subprocesses \ No newline at end of file + --pid $OWS_PID --subprocesses diff --git a/integration_tests/cfg/translations/de/LC_MESSAGES/ows_cfg.po b/integration_tests/cfg/translations/de/LC_MESSAGES/ows_cfg.po index 38900decb..4677bba88 100644 --- a/integration_tests/cfg/translations/de/LC_MESSAGES/ows_cfg.po +++ b/integration_tests/cfg/translations/de/LC_MESSAGES/ows_cfg.po @@ -29,4 +29,3 @@ msgstr "Surface reflectance (Sentinel-2)" msgid "style.s2_l2a.simple_rgb.title" msgstr "Simple RGB" - diff --git a/integration_tests/cfg/translations/en/LC_MESSAGES/ows_cfg.po b/integration_tests/cfg/translations/en/LC_MESSAGES/ows_cfg.po index 16be0be30..20623e7ed 100644 --- a/integration_tests/cfg/translations/en/LC_MESSAGES/ows_cfg.po +++ b/integration_tests/cfg/translations/en/LC_MESSAGES/ows_cfg.po @@ -28,4 +28,3 @@ msgstr "Surface reflectance (Sentinel-2)" msgid "style.s2_l2a.simple_rgb.title" msgstr "Simple RGB" - diff --git a/integration_tests/test_cfg_parser.py b/integration_tests/test_cfg_parser.py index 47d82321e..71b50a735 100644 --- a/integration_tests/test_cfg_parser.py +++ b/integration_tests/test_cfg_parser.py @@ -244,4 +244,3 @@ def test_cfg_parser_compile_bad_cfg(runner): "-d", f"{this_dir}/cfg/test_translations", "en"]) assert result.exit_code == 1 - diff --git a/integration_tests/test_cube_pool.py b/integration_tests/test_cube_pool.py index aa6179fc9..9122eaa58 100644 --- a/integration_tests/test_cube_pool.py +++ b/integration_tests/test_cube_pool.py @@ -9,4 +9,3 @@ def test_basic_cube_pool(): assert dc_1 == dc_2 dc_unalloc = Datacube(app="test") assert dc_1 != dc_unalloc - diff --git a/integration_tests/test_layers.py b/integration_tests/test_layers.py index 74e9be572..9fdf29fba 100644 --- a/integration_tests/test_layers.py +++ b/integration_tests/test_layers.py @@ -112,4 +112,3 @@ def test_metadata_read(monkeypatch, product_name): assert "Over-ridden" not in styl.title finally: OWSConfig._instance = cached_cfg - diff --git a/integration_tests/test_mv_index.py b/integration_tests/test_mv_index.py index 1943b5413..46532d21a 100644 --- a/integration_tests/test_mv_index.py +++ b/integration_tests/test_mv_index.py @@ -111,7 +111,7 @@ def test_extent_and_spatial(): small_geom = box( small_bbox[0], small_bbox[1], small_bbox[2], small_bbox[3], "EPSG:4326" ) - + with cube() as dc: all_ext = mv_search( dc.index, MVSelectOpts.EXTENT, geom=layer_ext_geom, products=lyr.products diff --git a/license-headers.md b/license-headers.md index f609edb8c..c8ff838e9 100644 --- a/license-headers.md +++ b/license-headers.md @@ -21,5 +21,5 @@ Change the sections on `python` files, to remove the `headerStartLine` and Run the tool: ```bash -python3 ./licenseheaders.py --tmpl license-template.txt --years 2017-2020 --ext py +python3 ./licenseheaders.py --tmpl license-template.txt --years 2017-2020 --ext py ``` diff --git a/tests/cfg/README.txt b/tests/cfg/README.txt index 5d1d0561b..64a850c3a 100644 --- a/tests/cfg/README.txt +++ b/tests/cfg/README.txt @@ -1 +1 @@ -Pseudo-config files to test the config framework. \ No newline at end of file +Pseudo-config files to test the config framework. diff --git a/tests/cfg/infinite_1.json b/tests/cfg/infinite_1.json index 3f1c6b09b..e1ad88158 100644 --- a/tests/cfg/infinite_1.json +++ b/tests/cfg/infinite_1.json @@ -1,4 +1,4 @@ { "include": "infinite_1.json", "type": "json" -} \ No newline at end of file +} diff --git a/tests/cfg/infinite_2b.json b/tests/cfg/infinite_2b.json index 229796a35..248077615 100644 --- a/tests/cfg/infinite_2b.json +++ b/tests/cfg/infinite_2b.json @@ -5,5 +5,3 @@ "type": "json" } } - - diff --git a/tests/cfg/minimal_cfg.py b/tests/cfg/minimal_cfg.py index b7b1630a2..771410883 100644 --- a/tests/cfg/minimal_cfg.py +++ b/tests/cfg/minimal_cfg.py @@ -54,7 +54,3 @@ "layers": [], } - - - - diff --git a/tests/cfg/nested.py b/tests/cfg/nested.py index fb312b20b..964aed695 100644 --- a/tests/cfg/nested.py +++ b/tests/cfg/nested.py @@ -107,5 +107,3 @@ "type": "python" } } - - diff --git a/tests/cfg/nested_2.json b/tests/cfg/nested_2.json index 3ca557c3d..163fc5419 100644 --- a/tests/cfg/nested_2.json +++ b/tests/cfg/nested_2.json @@ -6,4 +6,4 @@ "include": "simple.json", "type": "json" } -] \ No newline at end of file +] diff --git a/tests/cfg/nested_3.json b/tests/cfg/nested_3.json index 269d4e57c..61dab6a8d 100644 --- a/tests/cfg/nested_3.json +++ b/tests/cfg/nested_3.json @@ -21,5 +21,3 @@ } ] } - - diff --git a/tests/cfg/nested_4.json b/tests/cfg/nested_4.json index b2d3baf84..c452e0df3 100644 --- a/tests/cfg/nested_4.json +++ b/tests/cfg/nested_4.json @@ -21,4 +21,3 @@ } ] } - diff --git a/tests/conftest.py b/tests/conftest.py index d1abe8f3b..8b6a6a5e8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1151,4 +1151,4 @@ def xyt_dummydata(): "green": dummy_da(700, "green", xyt_coords, dtype="int16"), "blue": dummy_da(1500, "blue", xyt_coords, dtype="int16"), "nir": dummy_da(2000, "nir", xyt_coords, dtype="int16"), - }) \ No newline at end of file + }) diff --git a/tests/msg/README.txt b/tests/msg/README.txt index 93b723cf5..f1184c19b 100644 --- a/tests/msg/README.txt +++ b/tests/msg/README.txt @@ -1 +1 @@ -Pseudo-message files to test the message file parser. \ No newline at end of file +Pseudo-message files to test the message file parser. diff --git a/tests/msg/double_msgid.po b/tests/msg/double_msgid.po index 880d5f431..7e3058b28 100644 --- a/tests/msg/double_msgid.po +++ b/tests/msg/double_msgid.po @@ -14,4 +14,3 @@ msgstr "" #. Error: msgid where msgstr expected. msgid "bang.whirl.splat" msgid "ding.dang.dong" - diff --git a/tests/msg/double_msgstr.po b/tests/msg/double_msgstr.po index f404e995b..56ff28c65 100644 --- a/tests/msg/double_msgstr.po +++ b/tests/msg/double_msgstr.po @@ -15,4 +15,3 @@ msgstr "" msgid "bang.whirl.splat" msgstr "Single line msgstr" msgstr "Another single line msgstr" - diff --git a/tests/msg/good.po b/tests/msg/good.po index fec8e0156..c9ee93609 100644 --- a/tests/msg/good.po +++ b/tests/msg/good.po @@ -10,4 +10,3 @@ msgstr "" "\n" "A multi-line string that continues\n" "Across line-breaks.\n" - diff --git a/tests/msg/missing_msgid.po b/tests/msg/missing_msgid.po index 4207279e7..70cc71455 100644 --- a/tests/msg/missing_msgid.po +++ b/tests/msg/missing_msgid.po @@ -13,4 +13,3 @@ msgstr "" #. Error: msgstr with no msgid. msgstr "Single line msgstr" - diff --git a/tests/msg/multiline_msgid.po b/tests/msg/multiline_msgid.po index 8cc36c2c6..c36ab20ec 100644 --- a/tests/msg/multiline_msgid.po +++ b/tests/msg/multiline_msgid.po @@ -15,4 +15,3 @@ msgstr "" msgid "" "To tic-tac-toe, or not to tic-tac-toe,\n" msgstr "That is the question." - diff --git a/tests/msg/untagged_string.po b/tests/msg/untagged_string.po index ad6283ea2..5664bc488 100644 --- a/tests/msg/untagged_string.po +++ b/tests/msg/untagged_string.po @@ -13,4 +13,3 @@ msgstr "" #. Error: String not part of a continuation. "" - diff --git a/tests/test_cfg_global.py b/tests/test_cfg_global.py index 1c7be2444..36e8d3f59 100644 --- a/tests/test_cfg_global.py +++ b/tests/test_cfg_global.py @@ -261,4 +261,3 @@ def test_bad_integers_in_wms_section(minimal_global_raw_cfg, minimal_dc): cfg = OWSConfig(cfg=minimal_global_raw_cfg) assert "caps_cache_maxage in wms section cannot be negative" in str(e.value) assert "-100" in str(e.value) - diff --git a/tests/test_cfg_inclusion.py b/tests/test_cfg_inclusion.py index 304d77a42..5826253fd 100644 --- a/tests/test_cfg_inclusion.py +++ b/tests/test_cfg_inclusion.py @@ -290,4 +290,3 @@ def test_cfg_json_mixed(monkeypatch): assert cfg["test"] == 9364 assert cfg["subtest"]["test_py"]["test"] == 123 assert cfg["subtest"]["test_json"]["test"] == 1234 - diff --git a/tests/test_legend_generator.py b/tests/test_legend_generator.py index a2c0159f9..ae9f9cb61 100644 --- a/tests/test_legend_generator.py +++ b/tests/test_legend_generator.py @@ -77,4 +77,4 @@ def test_parse_colorramp_legend_beginend(): "end": "2.0" }) assert legend.begin == Decimal("0.0") - assert legend.end == Decimal("2.0") \ No newline at end of file + assert legend.end == Decimal("2.0") diff --git a/tests/test_ogc_utils.py b/tests/test_ogc_utils.py index a5d26230b..59060eb34 100644 --- a/tests/test_ogc_utils.py +++ b/tests/test_ogc_utils.py @@ -367,4 +367,3 @@ def timed_func(x): assert "timed_func" in FakeLogger._instance.slot assert "args" in FakeLogger._instance.slot assert "7" in FakeLogger._instance.slot - diff --git a/tests/test_pyproj.py b/tests/test_pyproj.py index 2879dcd45..d6771120f 100644 --- a/tests/test_pyproj.py +++ b/tests/test_pyproj.py @@ -24,4 +24,3 @@ def test_pyproj_crs(): assert crs is not None except: assert False - diff --git a/tests/test_qprof.py b/tests/test_qprof.py index 7dce1e0e3..c76716a06 100644 --- a/tests/test_qprof.py +++ b/tests/test_qprof.py @@ -34,4 +34,3 @@ def test_qpf_info(): qp["foo"] = "splunge" prof = qp.profile() assert prof["info"]["foo"] == "splunge" - diff --git a/tests/test_resource_limits.py b/tests/test_resource_limits.py index 0277d9b63..c0720fbbe 100644 --- a/tests/test_resource_limits.py +++ b/tests/test_resource_limits.py @@ -41,4 +41,4 @@ def test_degree_to_metres(): (0.005, 0.005) ) assert xres > 1.0 - assert yres > 1.0 \ No newline at end of file + assert yres > 1.0 diff --git a/tests/test_style_api.py b/tests/test_style_api.py index 15aa25703..c78892016 100644 --- a/tests/test_style_api.py +++ b/tests/test_style_api.py @@ -1039,4 +1039,3 @@ def test_plot_image_with_style_cfg(dummy_raw_data, simple_rgb_style_cfg): def test_style_count_dates(simple_rgb_style_cfg): style = StandaloneStyle(simple_rgb_style_cfg) assert style.count_dates([None, None, None, None]) == 4 - diff --git a/tests/test_styles.py b/tests/test_styles.py index 82be5ead3..5a7055da7 100644 --- a/tests/test_styles.py +++ b/tests/test_styles.py @@ -529,7 +529,7 @@ def fake_make_mask(data, **kwargs): with patch('datacube_ows.config_utils.make_mask', new_callable=lambda: fake_make_mask) as fmm: style_def = datacube_ows.styles.StyleDef(product_layer_alpha_map, style_cfg_map_alpha_1) - + result = style_def.transform_data(ds, damap) alpha_channel = result["alpha"].values assert (alpha_channel == 0).all() diff --git a/tests/translations/de/LC_MESSAGES/ows_cfg.po b/tests/translations/de/LC_MESSAGES/ows_cfg.po index 05aefe14f..b3528e18b 100644 --- a/tests/translations/de/LC_MESSAGES/ows_cfg.po +++ b/tests/translations/de/LC_MESSAGES/ows_cfg.po @@ -525,4 +525,3 @@ msgid "style.fc_albers_combined.simple_fc.abstract" msgstr "" "Fractional cover representation, with green vegetation in green, dead " "vegetation in blue, and bare soil in red" - diff --git a/tests/translations/en/LC_MESSAGES/ows_cfg.po b/tests/translations/en/LC_MESSAGES/ows_cfg.po index 235f99b9d..38be7c02e 100644 --- a/tests/translations/en/LC_MESSAGES/ows_cfg.po +++ b/tests/translations/en/LC_MESSAGES/ows_cfg.po @@ -525,4 +525,3 @@ msgid "style.fc_albers_combined.simple_fc.abstract" msgstr "" "Fractional cover representation, with green vegetation in green, dead " "vegetation in blue, and bare soil in red" - diff --git a/tests/utils.py b/tests/utils.py index f2f91233c..55426eaec 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -89,4 +89,3 @@ def dim1_da_time(name, vals, dates, coords, attrs=None): name=name, ) return output - diff --git a/wms_xsds/capabilities_extensions.xsd b/wms_xsds/capabilities_extensions.xsd index 219fb6fb3..1a655f145 100644 --- a/wms_xsds/capabilities_extensions.xsd +++ b/wms_xsds/capabilities_extensions.xsd @@ -77,4 +77,4 @@ - \ No newline at end of file + diff --git a/wms_xsds/capabilities_extensions_local.xsd b/wms_xsds/capabilities_extensions_local.xsd index 4fff6d11c..a0eb9573b 100644 --- a/wms_xsds/capabilities_extensions_local.xsd +++ b/wms_xsds/capabilities_extensions_local.xsd @@ -77,4 +77,4 @@ - \ No newline at end of file + diff --git a/wms_xsds/exceptions_1_3_0.xsd b/wms_xsds/exceptions_1_3_0.xsd index 9d62e5ccb..f5293e55a 100644 --- a/wms_xsds/exceptions_1_3_0.xsd +++ b/wms_xsds/exceptions_1_3_0.xsd @@ -1,6 +1,6 @@ - +