Commit Graph

1033 Commits

Author SHA1 Message Date
Tom Kralidis 148e4e8eee fix ref 2023-08-29 11:37:07 -04:00
Mathieu Tachon aa42cc6b60 Get bbox query parameter interactively (#1339)
* Update script to allow to get bbox query parameter interactively

* Remove unnecessary line

* Remove '?' prefix for bbox

* Switch back to leaflet version 1.3.1
2023-08-29 07:25:44 -04:00
Tom Kralidis fbd920903d fix ordered properties in ES provider (#1338) 2023-08-24 22:19:50 -04:00
Krishna Lodha cba55630c0 Minorfix/mongo db doc (#1319)
* updated mongoDB

* Updated mongo section
2023-08-18 16:45:32 -04:00
Krishna Lodha db4e8196c6 updated mongo to 6.0.7 (#1318) 2023-08-18 16:45:13 -04:00
Ricardo Garcia Silva 7c5e7cf224 Add pycharm-related rule to .gitignore (#1315)
* Added pycharm-related rule to .gitignore

* added blank line at end of .gitignore

---------

Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
2023-08-18 16:44:44 -04:00
totycro 42f833485b Fix display of job parameters (#1321)
Here we have JS code which parses the parameters
as json, so they must not be escaped.

I've noticed that right now, quotes are escaped as &#34;
which makes it invalid json and you get a JS error

It's not 100% clear to me what caused this, but probably
a jinja update or this change: 997a83530e

The implementation uses tojson from jinja which already has an
`indent` parameter, but for some reason it didn't indent it,
so this still uses indention in JS.
2023-08-18 16:44:16 -04:00
totycro 3d93c28353 Pagination issue (#1333)
* Fix for Django build, changes to documentation, and dev dependencies updated

* remove example configuration files

* Added readthedocs configuration file

* added section on building the documentation

* renamed docs/requirements-docs.txt to docs/requirements.txt

* renamed requirements file in readthedocs configuration

* Added documentation requirements installation to GitHub build workflow

* fixed pagination next page response

* fixed line too long

* Update get_collection_items test to accomodate last page fix

Note that this feature can't be tested with the CSV provider
because it uses the number of current items as numberMatched,
which doesn't seem correct but is an independent issue.
https://github.com/geopython/pygeoapi/blob/c7c07855e5cfa95b88d6d0d11f5c23111e38da95/pygeoapi/provider/csv_.py#L173

---------

Co-authored-by: Juan Pablo Duque <juan-pablo-duque@hotmail.com>
Co-authored-by: Juan Duque <juanpablo.duque@polimi.it>
2023-08-16 10:34:29 -04:00
Alexander Pilz c7c07855e5 Echo process (#1332)
* Echo process

Added an testbale echo process which supports the pause parameter

* Formatting

Changes to conform to flake8 formatting

* Updated link entry
2023-08-15 10:38:02 -04:00
Benjamin Webb 6981d3b11f Add reference to CGS pygeoapi plugins (#1314) 2023-07-05 14:44:20 -04:00
totycro dda4d121e2 Make sure that PostgreSQLProvider.get_fields returns valid json schem… (#1312)
* Make sure that PostgreSQLProvider.get_fields returns valid json schema types

* Log warnings when postgres provider encounters unknown types

* Update postgresql.py

---------

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2023-07-04 07:44:17 -04:00
ǝɹʇʇɐʃǝ◖ xıʃǝɟ fe0d0ed0bc Moved debian directory to salsa.debian.org. (#1296) 2023-07-04 14:05:18 +03:00
Tom Kralidis f88a671315 update main copyright statement (#1303) (#1307) 2023-07-03 18:08:53 +02:00
Tom Kralidis 458223106e ensure collection links are optional (#1292) (#1310) 2023-07-03 10:07:56 -04:00
Tom Kralidis c9b8e7020a add OPTIONS definitions for supported endpoints in OpenAPI (#1305) (#1309)
* add OPTIONS definitions for supported endpoints in OpenAPI (#1305)

* fix
2023-07-03 09:35:36 -04:00
Tom Kralidis 21de48d787 ERDDAP and OpenAPI fixes (#1308) 2023-07-03 09:25:48 -04:00
Ricardo Garcia Silva 2def8e5e47 Do not require links in process metadata (#1284)
* Move get_manager to base module

* Process manager now knows about existing processes

* Guard API from manager.get_job() errors

* Guard API from job-related errors

* moved process-related exceptions to pygeoapi.process.base

* manager is now responsible for instantiating a processor

* Guard API from manager.get_job() errors

* Guard API from job-related errors

* made process description links optional

* removed duplicated exception class

* Removed process.exceptions module, which got accidentally reintroduced after a rebase

---------

Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
2023-07-03 06:32:35 -04:00
Ricardo Garcia Silva 44768fc488 Guard against invalid job id throwing error (#1281)
* Process manager now knows about existing processes

* Move get_manager to base module

* Process manager now knows about existing processes

* Guard API from manager.get_job() errors

* Guard API from job-related errors

* fix flak8-related issue on tests

* moved process-related exceptions to pygeoapi.process.base

---------

Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
2023-07-02 12:47:23 +02:00
Tom Kralidis ba7fc15be7 fix reference to OGC API - Tiles schema (#1299) (#1300) 2023-07-02 11:45:29 +02:00
Ricardo Garcia Silva 40e82424f3 Process manager instantiates processor (#1278)
* Process manager now knows about existing processes

* Move get_manager to base module

* manager is now responsible for instantiating a processor

* manager.execute_process now accepts process_id instead of processor instance

* Add license to test file

* fix email address typo

---------

Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
2023-07-02 04:51:34 -04:00
Ricardo Garcia Silva 862e83da1f Process manager now knows about existing processes (#1277)
* Process manager now knows about existing processes

* get processes from the process manager rather than the config

* Move get_manager to base module

---------

Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
2023-07-01 10:53:46 -04:00
Jo f47979335b - removed empty key section, which is causing yaml errors: (#1275)
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.elastic_search.environment contains an invalid type, it should be an object, or
an array
(pygeoapi)

Co-authored-by: doublebyte1 <info@doublebyte.net>
2023-07-01 09:07:11 -04:00
totycro d7b112f62b Avoid internal server error when no format requested in get_collection_item (#1274)
Previously, request.format was assumed to always be defined when
generating `prev` and `next` links.

This commit changes this by using json as default format. This supports
the use case of curl nicely, but we could also choose e.g. html.

This branch is not yet tested because I didn't manage to find/produce test
data for single items which have next/previous links.

Fixes https://github.com/geopython/pygeoapi/issues/1272
2023-07-01 09:06:36 -04:00
Just van den Broecke 6a871e8591 #1297 pin pydantic to less than 2.0 (#1298) 2023-07-01 14:52:50 +02:00
Tom Kralidis 5afa360019 Update requirements.txt 2023-07-01 04:49:35 -04:00
totycro f6a055e8e1 Improve tinydb locking (#1273)
* Update tinydb manager test to current api

* Add tinydb parallel tests to CI

* Use filelock library to help make tinydb threadsafe

The tests for parallel access sometimes failed with the previous
implementation. I'm currently not 100% sure why, but it might have
to do with the fact that the file is already created in the TinyDB
constructor which was not protected by a lock.

Also not protecting the reads can read to invalid reads in the case
when a read and a write happen simultaneously and the read catches
partially written data.

This implementation allows for fewer concurrency but is quite simple,
so we should be able to be confident about its safety.

Also the TinyDB manager is not intended for high performance and its
IO operations are orders of magnitude faster than requests over the
network or process executions anyway.
2023-07-01 04:48:06 -04:00
Benjamin Webb aaaa174fcd Fix ref in docs (#1294)
- Remove typos from OGC API - Features table
- Fix link relations in docs
2023-07-01 04:47:20 -04:00
Jo d96e78871c - Added TileMatrixSet definition (from OGC NA) to the tilesets response: (#1290)
See: https://docs.ogc.org/is/20-057/20-057.html#toc34
2023-06-27 17:48:12 +02:00
Jo 1cb4b872cf Fixing error when retrieving the TMS in vector tiles that do not provide tilejson metadata (#1288)
* - look for metadata.json, only when we are using the tilejson format; in other cases, this file is missing and that is going to make pygeoapi fail

* - updated configuration examples in documentation, to use "default" as metadata for vector tiles ("raw" does not work)
- added metadata format configuration for the pg_tileserv provider example
2023-06-27 05:17:47 +02:00
Tom Kralidis 97a77b11bb update TinyDBCatalogue test metadata loader to latest OWSLib (#1291) 2023-06-27 02:13:04 +03:00
Tom Kralidis f436f0553f raise error on empty wildcarded indices (#1276) 2023-06-21 16:27:23 -04:00
Jo 3b5330782f Added conformance classes for OGC API - Common - part 1 (#1271) 2023-06-20 23:00:42 -04:00
Tom Kralidis 3566290ac4 Rename readthedocs.yml to .readthedocs.yaml (#1267)
* Rename readthedocs.yml to .readthedocs.yml

* Rename .readthedocs.yml to .readthedocs.yaml
2023-06-16 07:54:20 +02:00
Mathieu Tachon 1ff847d3eb fix(starlette_app): rename app -> APP in uvicorn.run call (#1260) 2023-06-15 23:11:42 -04:00
Tom Kralidis 0237e4cbbd fix tile link relations (#1262) (#1264) 2023-06-15 08:18:55 +02:00
Jo eb89c08ad0 Added conformance class for Mapbox Vector Tiles (#1263)
* - Added conformance class for Mapbox Vector Tiles

* - updated number of conformance classes on tests

---------

Co-authored-by: doublebyte1 <info@doublebyte.net>
2023-06-14 18:55:40 -04:00
Ricardo Garcia Silva 893e5064be Remove usage of flask path parameters in process-related routes (#1257)
Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
2023-06-07 21:56:08 -04:00
Benjamin Webb 7ccfded868 Return numberMatched if in STA response (#1259)
Attempt to return `@iot.count` in included in response. Including the query param `'$count' = 'true'` is costly on the SensorThings API endpoint when accessing the Observations entity. Some STA endpoints are including the count as a default.
2023-06-06 17:42:58 -04:00
Paul Tomasula 10d33c4207 Case-insensitive headers for execute_process (#1256)
* Address case-insensitive for headers in execute_process

Headers fields are general case insensitive. I found my client was sending the prefer field as lower case, resulting in my processes being run synchronously. This commit changes the default value of the dict.get command for 'Prefer' to try looking up 'prefer' if it cannot find the capital version of the field in the headers dictionary.

* Address flake8 issues

Tweaks to style to address flake8 flagged issues.
2023-05-30 11:51:24 -04:00
totycro 32d50f982b Fix api tests in docker (#1255)
The tests have recently been rewritten to use `url_for`, which was
changed in flask 2.2.0, so the tests don't pass in previous versions
https://flask.palletsprojects.com/en/2.3.x/api/#flask.Flask.url_for

However the python3-flask package for ubuntu only features the ancient
version 2.0.1-2ubuntu1.

Therefore this commit switches flask the install to pip, where recent
verions are available

References https://github.com/geopython/pygeoapi/issues/1111
2023-05-26 20:42:03 -04:00
Angelos Tzotsos 953b6fa74d switch back to dev 2023-05-18 21:20:54 +03:00
Tom Kralidis 7587e7f5e6 fix docs warning and RTD settings (#1250) 2023-05-18 13:54:39 -04:00
Angelos Tzotsos 5dfdea3568 update release version 2023-05-18 19:06:12 +03:00
Benjamin Webb c45fb78223 Remove duplicate CRS configuration in docs (#1249)
- Deduplicate crs configuration in docs
- Move advanced provider configuration to end of example
2023-05-18 09:07:54 -04:00
Sarah Jordan dcfdfdf799 Time Querying in EDR Provider (#1247)
* update time handling for edr provider

* add logging for time parsing

* fix time handling errors

Convert times to np.datetime64 to allow greater than/less than comparison. If slicing over time, separate xarray sel into temporal and spatial component (cannot use method='nearest' for time slices).

* fix temporal query dictionary

* fix time error handling

* fix list handling for single timestep

* single timestep handling

* spatial-only query amendment

* code clean-up

* convert datetime

* move code to methods

for reuse between position and cube. #1239

* formatting fixes

#1239

* time query test

#1239

* clean-up

* move time querying tests to api testing

* Update test_api.py

* update time key

* modify test values

* updates for desired query behavior

#1239

* Update xarray_edr.py

* sanitize datetime_ parameter with Z

OpenAPI document provides RFC 3339 compliant examples (exclusively specify UTC as the timezone with a trailing Z; want to avoid confusion between allowed datetime query and the documentation. #1239

* requested changes from @webb-ben and @tomkralidis

#1247
2023-05-17 21:19:10 -04:00
Benjamin Webb dea6ffc48e Create separate tag for jobs in OAS (#1246)
Move paths for `/jobs**` from server tag to separate tag when generating OpenAPI document
2023-05-16 21:01:45 -04:00
Tom Kralidis 6aa8ca67a7 increase JSON minification (#1245) 2023-05-12 18:05:54 +02:00
Ricardo Garcia Silva a3b850fa6a fix importlib_metadata issue for early versions (#1242) 2023-05-05 14:21:48 -04:00
Ricardo Garcia Silva e06ff73e57 custom cli commands (#1234)
* Implemented discovery of third-party cli commands

* Updated authors

* Added python3-importlib-metadata to debian control file

* Replaced ellipsis with a pass statement

---------

Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2023-05-04 07:35:32 -04:00
Sarah Jordan fddefc4ec5 move functions for speed (#1238) 2023-05-03 21:10:36 -04:00