Commit Graph

659 Commits

Author SHA1 Message Date
Tom Kralidis cfb41b2e07 map geometry queryables to GeoJSON schema 2021-09-13 13:34:20 -04:00
Tom Kralidis 774ff49f00 update translations (#760) (#762)
* update translations (#760)

* fix syntax

* update translations

* update docs

* fix typos
2021-09-01 09:02:28 -04:00
Tom Kralidis cf9bd223eb Update plugins.rst (#770) 2021-08-31 10:11:31 -04:00
Tom Kralidis 70edc3c0f2 update TinyDB q= support for multiple terms (#765) 2021-08-26 16:30:46 -04:00
Tom Kralidis 1ff9dfa3bb update id field passing to HTML template (#764) 2021-08-25 08:24:28 -04:00
Tom Kralidis 6fb64e6a46 fix JSON filter in HTML items/item templates (#761) (#763) 2021-08-25 07:22:53 -04:00
Tom Kralidis 6dcd10b10a test for item prev and next links on item queries (#752) (#757) 2021-08-25 06:34:39 -04:00
Alexandre Leroux 719201241a updates to French translation (#759) 2021-08-24 06:37:03 -04:00
paul van genuchten 995ab2f04d add translation system to pygeoapi (#725)
* adds translation keys to templates

* adds translation keys to templates

* suggestions from github pr 2
2021-08-22 20:42:10 -04:00
Tom Kralidis bc97ed480a add geometry to queryables (#755) 2021-08-22 08:28:56 -04:00
Tom Kralidis 9d920901b5 update OAProc execute handling (#754)
* fix OAProc default output to raw

* control outputs list from api machinery

* fix tests
2021-08-18 15:28:55 -04:00
Tom Kralidis 6ee727bf1d Create SECURITY.md (#749)
* Create SECURITY.md

* Update SECURITY.md

* Update SECURITY.md
2021-08-13 15:48:35 -04:00
Fabio Zeiser 0ac6962eab Fixes #750, rerieval of path attribute in starlette (#751) 2021-08-10 06:48:46 -04:00
Francesco Bartoli c5942f7a13 Fix time format in cite configuration (#748) 2021-08-02 07:27:48 -04:00
Tom Kralidis 6b0f137690 simplify OAProc parameter handling (#746) 2021-07-23 21:03:51 -04:00
Tom Kralidis 5359789f13 fix OARec test data (#745)
* fix OARec test data

* fix TinyDB bbox handling

* add missing OACov conformance test
2021-07-23 14:50:34 -04:00
Tom Kralidis 914756666c OARec bbox should be two arrays, not three (#744) 2021-07-23 13:39:39 -04:00
Benjamin Webb 3efa041c54 Patch SensorThings API Tests (#737) 2021-07-22 19:11:25 -04:00
Francesco Bartoli 0cf564080a Fix typo (#743) 2021-07-22 19:11:05 -04:00
Jo cf4517c1c2 - update the script that loads data to ES, to support data encoded with utf8 (#742) 2021-07-22 19:10:38 -04:00
Jo 3625c855ae - Switched to python3, when loading records to the ES docker (#741) 2021-07-22 19:10:06 -04:00
Jo f9c10a0808 Updating ES Dockerfile (#739)
* - updating ES dockerfile, by adding missing packages and switching to python3

* - joined commands to reduce layers on the docker image
- fixed formatting
- added elasticsearch-dsl

Co-authored-by: doublebyte1 <info@doublebyte.net>
2021-07-22 13:30:03 -04:00
Francesco Bartoli d75aa0ddbd Update Dockerfile (#738) 2021-07-22 11:14:52 -04:00
Tom Kralidis 00a08e05ba update OAProc content models (#735) 2021-07-22 15:13:09 +02:00
Francesco Bartoli cdc4f98090 Fix OAProc conformance classes (#736)
* Fix OAProc conformance classes

* Fix conformance test
2021-07-22 09:06:47 -04:00
Francesco Bartoli bb4cd0bf69 Add cql-json support for ES (#723)
Fix starlette event loop


Fix starlette event loop


Fix starlette event loop


Fix starlette event loop


Fix provider regression


Make method public


Make method public


Move function to the helpers utility


Add the CQL lifecycle for development


Add CQL docs


Fix flake8


Isolate import for starlette codepath
2021-07-21 21:00:14 -04:00
Tom Kralidis 0f38c764d6 update OAProc to latest specification (#732)
* update OAProc to latest specification

* fix flake8

* test
2021-07-21 12:18:08 -04:00
Tom Kralidis f01dfd38a7 fix response for non-existent collections (#722) (#730) 2021-07-20 09:41:59 +02:00
Tom Kralidis 65de735ef3 fix CI by pinning to pandas 1.2.5 (#729)
* pin pandas

* fix

* fix

* fix
2021-07-19 23:32:34 -04:00
Ari Pollak d4f2b74505 Make FileSystem tests a bit more detailed (#727) 2021-07-19 22:08:44 -04:00
Ari Pollak 598630bce1 Add missing ports to first docker-compose example (#726)
This was present in the second example but should also be needed for the first one.
2021-07-19 21:34:00 -04:00
Tom Kralidis 83ea3d3959 fix docs 2021-07-06 17:20:23 -04:00
Benjamin Webb 8f8d19c5f8 Sensorthings API Provider (#721)
* Create sensorthings.py

* Update plugin.py

* Add files via upload

* Update sensorthings.py

* Add files via upload

* Update sensorthings.py

* Update sensorthings.py

* Update sensorthings.py

* Update sensorthings.py

* Update sensorthings BRGM Endpoint

* Clean Examples

* Cleaned sensorthings config

* add bbox and datetime query params

Added optional intralinking between STA entities

* add pytest for sta provider

* add sta pytest to workflow

* improve versatility of intralink and uri

* Update Datastreams geometry provider

* Update iow.sta.pygeoapi.config.yml

* faster hits using sta $count

* fix flake8

* added sta provider for github actions

* type in main.yml

* Update main.yml

* Update main.yml

* rename tests/data/datastreams.json

* Update main.yml

* Update load_sta_data.py

* Update load_sta_data.py

* Update load_sta_data.py

* Update load_sta_data.py

* Update load_sta_data.py

* Fix sta pytest

* fix flake8

* Update docs

* Update test_sensorthings__provider.py

* Merge various fixes from sta-patch-1

* force sorting

* Move STA data to remote host

* Clarify use of the intralink field

* rename test_sensorthings_provider.py

* Add Readme.md and switch to docker-compose

* Sensorthings -> SensorThings
2021-07-06 17:04:45 -04:00
Tom Kralidis 89eff49ce0 add support for configuration schema and validation (#553) (#719)
* add support for configuration schema and validation (#553)

* rename types

* minor doc fix

* update i18n regexes

* make openapi click options required arguments
2021-07-06 17:01:05 -04:00
Tom Kralidis d6df7d4fef add ui parameter to OpenAPI def 2021-06-30 12:30:47 -04:00
Tom Kralidis 167281ee83 add support for OpenAPI rendering via ReDoc (#414) (#720)
* add support for OpenAPI rendering via ReDoc (#414)

* add support for OpenAPI rendering via ReDoc (#414)
2021-06-30 11:11:57 -04:00
Tom Kralidis 7ecac02693 add support for OpenAPI validation (#717) (#718)
* add support for OpenAPI validation (#717)

* update copyright years

* fix ES ref

* update CLI
2021-06-29 08:48:22 -04:00
Mikael Vaaltola 4ccb0e574d Fix SQLite provider for GPKG with multiple layers (#716)
Running SELECT AutoGPKGStart(); returns the number of layers in a GPKG
file.
Therefore, only 0 is an invalid value which should raise an error.
2021-06-22 19:44:37 -04:00
Kyle Onda 37b1e9553b add geometry representations for json-ld output format (#689)
* Update linked_data.py

* Update linked_data.py

Added schema:geoShape to geojsonld = false

* Update linked_data.py

* Update linked_data.py for rebasing

* Update linked_data.py

* Update configuration.rst

* Update linked_data.py for geosparql geometry

* Add files via upload

* Update test_api.py

* Update test_api.py

* Update linked_data.py logic

* Add pytest for more geometry types

* Update test_util.py

* rename geojson2geojsonld, separated geom2schemageo

* Add pytest for polygon and linestring

* Update expanation of uri_field

Co-authored-by: Benjamin Webb <40066515+webb-ben@users.noreply.github.com>
Co-authored-by: Benjamin Webb <bmwebb20@colby.edu>
2021-06-17 19:00:35 -04:00
Tom Kralidis 61e5ab68af Docker locale tz (#711)
* update locales and timezone

* tabs to spaces

* fix ref
2021-06-17 16:51:23 +02:00
Tom Kralidis 05c18e14ee STAC: lazy add datetime (#713) 2021-06-14 10:37:13 -04:00
Tom Kralidis 989dfb6d30 fix Coverage output and format exception MIME type (#712)
* fix Coverage output and format exception MIME type

* Minor tweaks, added test to assert that a text/html header (without 'f' query param) returns JSON for get_collection_coverage()

Co-authored-by: Sander Schaminee <sander.schaminee@geocat.net>
2021-06-10 19:47:21 -04:00
Tom Kralidis b914e13205 STAC: dynamically capture band tags (#710) 2021-06-09 17:13:19 -04:00
Tom Kralidis 1715509f39 add safeguard for formatting errors (#708) 2021-06-09 14:33:09 -04:00
Sander Schaminee 8f3e5c2ad7 Simplify API tests (#707) 2021-06-09 06:10:10 -04:00
Tom Kralidis 48efbdec53 various fixes (#706) 2021-06-09 06:09:32 -04:00
Sander Schaminee 023f24d26b Multilingual support (alternative) (#664)
* Created localization (l10n) module + tests. Added l10n support to API and plugins (wip).

* Big refactor:

* All routed API methods are now decorated by @pre_process (consistency) and no longer have a headers+format argument but a request argument (**kwargs also removed)
* The pre_process decorator turns an incoming Flask/Starlette request into a generic APIRequest instance
* The new APIRequest class extracts all relevant info (params, data, locale, etc.) from the request and exposes them as properties
* Removed a lot of boilerplate (i.e. format checking) and wrapped that into methods
* Updated server-specific API calls in each route method (pass entire request object, not headers and query params)

* Several improvements and fixes:

* Updated OpenAPI page with "l" query param
* Added example translations (metadata)
* Changed plugin signature: added explicit locale attribute (instead of **kwargs)
* Moved locale processing to get_plugin_locale() function in l10n module
* API should pass raw requested locale to plugins, locale should always be set
* Fixed API tests and added APIRequest tests
* Prepared utils.py for Jinja2 i18n extension
* Rebased on commit b40297a8 and fixed compatibility with #661 and #662

* Updated documentation for language support

* Rebased and fixed compatibility with PR #658:

* Fixed EDR provider signature (added locale)
* Fixed EDR API routes and query function (and improved parameter-name handling)
* Fixed EDR tests

* Translate entire config in render_j2_template for requested locale:

* Added new translate_dict function to l10n module (+ tests)
* Updated all render_j2_template calls with locale parameter
* Updated pygeoapi-test-config.yml with some language structs

* Minor improvements

* support both 'language' and 'languages' property in server config and provider definitions
* renamed and modified translate_dict() to more generic translate_struct() function (l10n module)
* remove Content-Language header from provider responses if provider has no language support and format is json(ld)
* updated tests

* Leave provider locale handling to API

* Moved code to determine locale from providers to API class (and remove for formatters and processes)
* Removed locale parameter from plugin __init__ signatures
* Removed locale parameter from load_plugin()
* Added **kwargs to provider implementations for get, query, get_metadata, get_coverage_domainset and get_coverage_rangetype method signatures
* Added language=<locale> to all API calls to provider get, query, get_metadata, get_coverage_domainset and get_coverage_rangetype methods

* Use 'lang' instead of 'l' as language query parameter

* Updated Open API
* Updated documentation
* Fixed tests

* Implemented requested PR changes:

* Added usage examples to the APIRequest docstring
* Removed language support from coverage functions
* Updated plugins.rst and language.rst to match new behavior
* Removed language struct from resource links in pygeoapi-config.yml
* Rebased on latest master (fixed test_api.py)

* Rebased and applied fixes:

* Data property in APIRequest now is an awaitable attribute (fixed for Starlette compatibility)
* Named references to 'l' parameter to 'lang'

* Final changes/improvements:

* Make sure that Content-Language is always set;
* Added more tests to ensure that the default language returned is the first configured language (if no language was requested by the user);
* Updated docs;
* Replaced re-occuring strings with constants in api.py;
* Fixed Flake8 checks.

* add missing async to starlette routes (#704)

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2021-06-08 18:46:35 -04:00
Tom Kralidis 4bc929ef87 add missing async to starlette routes (#704) 2021-06-05 15:49:36 +02:00
Tom Kralidis 46f84a4ed3 migrate to GitHub Actions (#616) (#703) 2021-06-01 17:15:30 -04:00
Tom Kralidis f2d064656f fix Flask blueprints (#702) 2021-05-31 18:30:30 -04:00