Commit Graph

1187 Commits

Author SHA1 Message Date
Tom Kralidis ea2fb87ff5 use typing.Union for pre-3.10 compat (#1626) 2024-04-12 16:38:04 -04:00
Tom Kralidis a26662e0e4 add l10n to link titles (#1624) (#1625) 2024-04-12 09:50:46 -04:00
dependabot[bot] 7796794b03 Bump pymongo from 3.10.1 to 4.6.3 (#1616)
* Bump pymongo from 3.10.1 to 4.6.3

Bumps [pymongo](https://github.com/mongodb/mongo-python-driver) from 3.10.1 to 4.6.3.
- [Release notes](https://github.com/mongodb/mongo-python-driver/releases)
- [Changelog](https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst)
- [Commits](https://github.com/mongodb/mongo-python-driver/compare/3.10.1...4.6.3)

---
updated-dependencies:
- dependency-name: pymongo
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* - replace map reduce by aggregation pipeline

* - fixed flake8 errors

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: doublebyte <doublebyte@hushmail.com>
2024-04-11 18:44:01 -04:00
Tom Kralidis 2bd97836c2 provide more process error output (#1620) (#1621) 2024-04-11 19:27:53 +03:00
Tom Kralidis 9d3d083d8f remove FutureWarning from Xarray providers (#1623) 2024-04-11 19:15:26 +03:00
Tom Kralidis 8a6f85465a minor Shapely functions doc updates 2024-04-11 07:16:29 -04:00
Emmanuel Jolaiya 41c3f6a284 Shapely functions as sample process (#1565)
* fixed bug with breadcrumb routes

* removed example files in commit

* feat:implemented shapely functions process

* Delete example-openapi.yml

* Delete example-config.yml

* fixed linting bug

* fixed flake8 errors

* added initial docs

* adding codeblocks to docs

* Added vscode to gitignore

* syncing with master

* reversed docs. Added success subscriber

* fixed bug in docs

* addressed pr reviews

* addressed pr review issues

* unstaged tilematrixset.html

* unstaged pre-commit and fixed typo in shapely

* unstaged .gitignore

* unstaged pygeoapi-config.yml
2024-04-11 07:09:55 -04:00
Benjamin Webb f51a8910d1 Fix indentation error (#1618) 2024-04-08 15:41:30 -04:00
Ricardo Garcia Silva 109d7c17f8 Removed duplicate running of pygeoapi in serve cli command (#1505) 2024-04-05 20:58:04 -04:00
Bernhard Mallinger 35bdcb6f02 Proposal to split api.py into different files (#1405)
* Move api to subdirectory

* Move processes api to own file

* Adapt processes view methods

* Move openapi definition to processes api

* Use processes api in flask

* Linter

* Fix import issues

* Allow calling refactored views from starlette

* Allow calling refactored views from django

* Linter

* Move edr api to own file

* Adapt edr api to new style

* Fix typo in django views

* Move maps api to own file

* Adapt maps api to new style

* Move edr openapi to edr api file

* Move maps openapi to maps api file

* Move stac views to own file

* Refactor stac views to new file

* Move stac openapi to stac api file

* Move tiles api to own file

* Adapt tiles api to new style

* Also move tilematrixset to tiles api

* Adapt tilesetmatrix views to new style

NOTE: I had to remove one tilematrixsets test because
it tested that an invalid format would produce an error.
This now happens by default for all views, but the actual
code is outside of the endpoint function.

* update features, records, coverages

* update release version

* switch back to dev

* backport of #1313

* backport of #1313 fix

* backport of #1585

* Flask: sanitize OGC schema pathing (#1593)

* update release version

* switch back to dev

* backport of #1596

* Port test_gzip_csv test

Note that apply_gzip is now called by the web framework adapters,
so to test it in general, we have to call it in the test manually

* Add empty conformance class list to stac api

* Fix queryables call in starlette

* fix ref

* Unify request validity checking

The default case is handled by the web framework adapters. If custom
format handling is required, the check in the adapter must be skipped.

* Fix imports in django views

* backport #1598

* Remove test about format handling in endpoint

This is now handled outside of the endpoint function

* add docstring to base process manager (#1603)

* backport of #1601

* Port api ogr tests to new style

* Move processes tests to own file

* Run api tests from new dir in CI

* Move edr tests to own file

* Move maps tests to own file

* Move tiles tests to own file

* Actually hide hidden layers in openapi

* 1600 allow providing default value in config (#1604)

* move coverages tests to own file

* move itemtypes to own file, move core into init test

* fix OpenAPI output

* update tests

* add missing descriptions to OpenAPI admin responses

* update tests

* fix tests autodiscovery

* remove unused logging in tests

* address PR comments

* test with xarray 2024.2.0

* remove unneeded file

* safeguard xarray error

* unpin xarray

* fix OpenAPI generation

* fix schema endpoint in Flask and Starlette

* Safely serialize configuration JSON (#1605)

* Safely serialize configuration JSON

Co-Authored-By: Tom Kralidis <tomkralidis@gmail.com>

* Revert "Safely serialize configuration JSON"

This reverts commit 36feb067ee6f87e61955852dc48994f075806370.

* Add test for datetime with Admin API

* Safely serialize configuration JSON

---------

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>

* backport #1611

* Also fix schema endpoint for django

Fix is analogous to e72d4ba3a5ba3b8621ca839e7814429beeeb8f01

* address additional PR comments

---------

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
Co-authored-by: Angelos Tzotsos <gcpp.kalxas@gmail.com>
Co-authored-by: Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com>
Co-authored-by: Benjamin Webb <40066515+webb-ben@users.noreply.github.com>
2024-04-05 06:06:25 -04:00
Tom Kralidis 36e75f8b72 safeguard STAC collection links (#1610) (#1611) 2024-04-03 12:24:02 -04:00
Benjamin Webb f94ad370e3 Safely serialize configuration JSON (#1605)
* Safely serialize configuration JSON

Co-Authored-By: Tom Kralidis <tomkralidis@gmail.com>

* Revert "Safely serialize configuration JSON"

This reverts commit 36feb067ee6f87e61955852dc48994f075806370.

* Add test for datetime with Admin API

* Safely serialize configuration JSON

---------

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2024-04-03 06:39:00 -04:00
Ricardo Garcia Silva 2abb943d32 1600 allow providing default value in config (#1604) 2024-03-22 17:47:39 -04:00
Tom Kralidis 421559a2a6 add docstring to base process manager (#1603) 2024-03-20 12:29:57 +01:00
Jo 44df078866 - fixed typo on parameter of url pattern for views.collection_item_tiles (#1601)
- updated django collection_item_tiles method to call the get_collection_tiles_data api method
2024-03-19 17:35:45 -04:00
Bernhard Mallinger e131cbf8da Implement subscriber support for dummy manager (#1598)
* Implement subscriber support for dummy manager

NOTE: In current main, the missing handling of this parameter always
leads to errors.
https://github.com/geopython/pygeoapi/issues/1597

* Update dummy.py

---------

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2024-03-18 22:20:52 -04:00
Mafaldarc 5c8f057db0 Revert pydantic method 'model_validate_json' to v1 version (#1596)
Fix bug when trying to process Elasticsearch CQL_JSON data on post_collection_items
Use method 'parse_raw' from v1 instead 'model_validate_json'
2024-03-15 11:42:59 +01:00
Angelos Tzotsos 6171597fb9 switch back to dev 2024-03-13 11:16:17 +02:00
Angelos Tzotsos 0ce2219fec update release version 2024-03-13 11:01:14 +02:00
Tom Kralidis ff4c4f6d46 Flask: sanitize OGC schema pathing (#1593) 2024-03-12 15:16:34 +02:00
Tom Kralidis d8a1b741ed OpenAPI: skip failing collections (#1577) (#1585) 2024-03-11 18:33:52 -04:00
Angelos Tzotsos d128d5273b switch back to dev 2024-03-11 13:46:23 +02:00
Bernhard Mallinger 94ae782b6c ogc api processes subscriber (#1313)
* Exclude None from `get_processor` return type annotation

An exception is raised in case of error, so it can't ever return None

* Add support for OGC API Processes Subscriber

The subscription URLs are passed to the manager, which
then has to call them appropriately.

By default, managers have the attribute `supports_subscribing`
set to `False` in order to not break the API for these. The
subscriptions are only passed to if this is set to `True`

* Add ogc api callback class to conformance

https://docs.ogc.org/is/18-062r2/18-062r2.html#toc67

* Make successUri mandatory in subscriber

It's mandatory in the standard.

Thx @ricardogsilva !

* Use snake case in python for fields which are camel case in the api

Thx @ricardogsilva !

* Add subscriber to method docstring

* Provide default value for subscriber for managers not supporting it

Thanks @ricardogsilva !

* Factor out notification call into methods

This increases reusability by other managers

Thanks @ricardogsilva !

* Add an example call for a process subscriber

* Change test urls to valid urls

* Third party imports in own block
2024-03-11 07:16:28 -04:00
Angelos Tzotsos ab4fe09192 update release version 2024-03-11 13:01:33 +02:00
Tom Kralidis 962eb6e73f restore stale-bot schedule 2024-03-10 17:47:21 -04:00
Tom Kralidis 625866c4e8 stale-bot initial live run 2024-03-10 17:20:08 -04:00
Angelos Tzotsos 329baff757 GDAL 3.8.4 (#1587)
* Preparing dependencies and workflows for upcoming UbuntuGIS upgrade to GDAL 3.8.4
* Update base Ubuntu image
2024-03-10 18:25:28 +02:00
Tom Kralidis c9406985c9 fix provider type handling (#1588) 2024-03-10 18:06:22 +02:00
Tom Kralidis 77a18e07c0 Stale bot hourly testing dry run (#1589)
* update stale-bot to run hourly while testing

* update operations per run
2024-03-10 10:38:39 -04:00
Francesco Bartoli e69a9744a2 Revert pydantic models to v1 version (#1584)
* Revert pydantic models to v1 version

Revert pydantic models to v1 version

Revert pydantic models to v1 version

Revert pydantic models to v1 version

* Add initial tests for models

Add initial tests for models

* Revert pydantic models to v1 version

Revert pydantic models to v1 version

Revert pydantic models to v1 version

Revert pydantic models to v1 version

* Add initial tests for models

Add initial tests for models

* Fix and replace methods from pydantic v2

* Add more tests for cql models
2024-03-10 08:58:21 -04:00
Tom Kralidis 54688969b0 update GitHub Actions/CI to Python 3.10 (#1543) (#1586) 2024-03-10 13:23:52 +02:00
Ricardo Garcia Silva 024844d244 Add stalebot config (#1582)
* Added initial stale bot CI workflow

* Added initial stale bot CI workflow

* Added permissions and exempt label to stale action

* Tweaked stale bot workflow file

---------

Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
2024-03-08 06:11:39 -05:00
Tom Kralidis 1e424174f5 implement RFC4 in issue / PR templates (#1580) (#1581)
* implement RFC4 in issue / PR templates (#1580)

* fix
2024-03-07 13:12:36 -05:00
Bernhard Mallinger c81d3f81f5 Mock server in WFS provider tests (#1534)
* Mock server in WFS provider tests

This commit mocks the layer in WFS tests and prepares return values
required to satisfy the tests. This reduces the test fidelity, but it
makes them stable and increases execution speed (literally 100x on my
machine, 66 sec to 0.6 sec).

Since the return value is mocked, it doesn't make sense to send
different parameters to the server, so some tests became obsolete.

The original tests are still there in another file, but are not supposed
to be run in CI.

* Mention wfs live tests in github CI

* Comment test file where all tests are skipped

pytest considers this to be a failure, but we still want the test file
to be mentioned here
2024-03-06 10:55:31 -05:00
Tom Kralidis 5accd7f190 OGC API - Processes CITE compliance (#1311)
* update OGC API - Processes CITE compliance
2024-03-06 17:37:12 +02:00
Bernhard Mallinger 8d377072b9 Allow retrieving extra properties in oracle provider (#1544)
* Implement extra_properties in oracle Provider

These can be used to configure additional database-computed fields
in the config file which are returned on `get` and `query` calls

* Allow mandating properties which are not part of the output

Previously, properties which were not requested for the output
were not part of `fields`, which means that they were not passed
in to the provider as filter properties for e.g. `query()`.

This commit adds them there and introduces a new variable
`filtered_fields`, which is used for limiting the output of queries.

There is also some minor refactoring, but the existing and also the
newly written tests should avoid regressions.

* Restore previous behavior for default arguments
2024-03-06 10:24:51 -05:00
Francesco Bartoli 34d595accf Update openapi.py (#1574) 2024-03-03 16:49:02 -05:00
Jo b6bf0a72b2 - updated emoji to something more readable (#1571) 2024-03-02 13:31:21 -05:00
Tom Kralidis 80b7a0c48c clean up API docs, move plugins to wiki (#1572) 2024-03-02 17:44:10 +00:00
Francesco Bartoli 4f97c5ebac Uncomment gdal (#1567)
* Uncomment gdal
* Add step to use UbuntuGIS unstable ppa
* Fix sudo privileges
* Pin gdal below 3.8.4
Pin gdal below 3.8.4
* Fix OGR tests which are intermittently giving inconsistent results
2024-03-02 13:59:08 +02:00
Angelos Tzotsos 11824d28ee Enable back UbuntuGIS to get GDAL 3.8.x. (#1570)
* Enable back UbuntuGIS to get GDAL 3.8.x.
* Update to latest Jammy base image.
* Add software-properties-common to Build dependencies so it gets removed on cleanup.
2024-03-01 18:35:59 +02:00
Jo 74f4772a63 Make tiling scheme parameter optional (#1566)
* - Remove the need to define a tiling scheme in the configuration, for providers that support only one scheme
- Support only WebMercatorQuad for  mvt-elastic tiles

* - updated documentation for MVT-elastic provider

* - remove the need of a tiling scheme option in MVT-tippecanoe provider

* - updated tiles documentation with support to tiling-schemes

* - fixed regression bug with coordinate order on vector tile preview

* - add working url for wmts-facade code snippet

* - fixed flake8 example
2024-03-01 11:03:50 -05:00
Tom Kralidis 8ecb00a6b7 update HTML collection page (#1568) (#1569) 2024-03-01 11:03:26 -05:00
Simon Seyock 5764d3b926 WMTS Provider (#1473)
* feat: add WMTSFacadeProvider

* feat: add tileset metadata to tile page

* feat: add jpeg format

* fix: minor adjustments

* fix: remove tms_facade

* chore: fix flake8 errors

* docs: add docs for publishing with the WMTS provider

* docs: spelling

* fix: adjust metadata_format for WMTSFacade

* fix: address review

* fix: use mimetype as link type
2024-03-01 08:42:38 -05:00
Peter Garnæs f092cf548e Django server: EDR sanity test (#1530)
* EDR queries without instance id works

Django URL's without instance IDs called a method requiring instance
IDs, resulting in a crash.

Instance ID defaults to None, which is also standard for the provider
that ultimately will be called.

Regression test added

* Use fixtures in django server tests

---------

Co-authored-by: Peter Garnæs <pga@dmi.dk>
2024-02-29 13:48:57 -05:00
Peter Garnæs 462b4f3566 EDR /locations and /locations/{locId} endpoints (#1487)
* Expose EDR locations queries to the provider interface

The EDR specification allows for locations queries to be performed:
https://docs.ogc.org/is/19-086r6/19-086r6.html#_60c4d31c-62f2-4dc7-9a3e-6a1a9127d29e

Providers should be allowed to implement these query types.

* Generate correct OpenAPI spec for EDR locations collections

* Imlement EDR locations query routing for providers in django

---------

Co-authored-by: Peter Garnæs <pga@dmi.dk>
2024-02-29 13:48:07 -05:00
Tom Kralidis 3ce68acdb8 keep 4326 bbox and crs for coverages (#1564) 2024-02-28 18:04:18 +02:00
Tom Kralidis 78c6e953bc fix OACov based collection output (#1561) 2024-02-28 07:01:34 -05:00
Aleksandar Zec f4c2ff970f #1545 fix: resolved issues on Breadcrumb routes for TMS endpoints (#1555) 2024-02-28 05:48:27 -05:00
Resad Hajdarpasic f472a5f8a6 fix Django EDR implementation on non-instance endpoints (#1528) (#1549)
* fix Django EDR implementation on non-instance endpoints (#1528)

* clean up code to follow PEP8 and fix docstring (#1528)

* remove trailing comma from view definition args (#1528)

---------

Co-authored-by: Resad Hajdarpasic <resad.hajdarpasic@planetsoft.eu>
2024-02-28 03:34:46 -05:00