Commit Graph

105 Commits

Author SHA1 Message Date
Paul van Genuchten be5efadc90 when title-field has a multilingual configuration, use it
resolves #921
2022-06-13 09:18:23 +02:00
Tom Kralidis 3ebdbded9a fix JSON MIME types 2022-05-13 13:48:15 +00:00
Tom Kralidis 356fe1280c add skip_geometry to remaining feature providers (#887)
* skip geometry for SQLite/GPKG backends (#886)

* simplify GKPG

* add for remaining providers, add to doc
2022-04-19 13:44:56 -04:00
Tom Kralidis 09ad6f8fce Hierarchical collections (#885)
* add support for hierarchical collections

* fix JSON rendering in docs

* fix JSON rendering in docs

* fix tests

* update docs

* update HTML templates with collections path

* fix template error

* add test
2022-04-16 18:26:55 -04:00
Tom Kralidis f17c6936a0 OACov: change coverage range-subset to properties, update conformance classes (#870)
* OACov: change coverage range-subset to properties, update conformance classes

* fix conformance tests
2022-03-10 16:23:49 -05:00
Tom Kralidis 5d0dbd0857 fix docs 2022-03-08 16:05:08 -05:00
Tom Kralidis 1c87e0005b move items startindex to offset 2022-03-08 14:51:53 -05:00
ychoquet bd2177674c Creation of a STAC HATEOAS Provider. (#857) 2022-02-23 17:27:43 -05:00
Tom Kralidis c0a1d56f99 add latex engine/url footer settings (#856) 2022-02-11 13:14:33 -05:00
Angelos Tzotsos e28d0cbd47 back to dev 2022-02-07 22:10:53 +02:00
Angelos Tzotsos 2989756a21 update release version 2022-02-07 22:05:13 +02:00
Tom Kralidis 3f8fa1506c fix OGC API doc refs (#852) 2022-02-06 09:14:52 -05:00
KoalaGeo 23fc76b6ff Update ogcapi-features.rst (#847) 2022-01-29 17:37:31 -05:00
Tom Kralidis 300be49a58 allow providers to specify custom filename for query output (#841) 2022-01-15 07:30:20 -05:00
Tom Kralidis 5d072f4efa OAProc updates (#840)
* update OAProc jobs as a top-level resource (#838)

* update config

* update copyright year
2022-01-04 08:43:39 -05:00
Tom Kralidis 30a626ba9d update copyright year 2022-01-01 09:15:32 -05:00
Tom Kralidis 05dfebd7e4 fix list formatting in docs 2021-12-08 21:59:26 -05:00
Tom Kralidis fca8974432 [OACov] rename rangeSubset to range-subset for coverage queries (#816) 2021-11-19 09:25:13 -05:00
Benjamin Webb 205ff3002c Add Gzip to response types (#795)
* Add gzip to API.py

* pytest for gzip

* fix pytest

* Update test_api.py

* Add gzip to server block of configuration files

* Update api.py to include gzip opts from config

Update logic behind gzip compression  such that compression will only happen when gzip in the Accept-Encoding request header and config.server.gzip is True. Use server charset for encoding/decoding and include charset in Content-Type when compressed.

* Update pytest to use gzip config options

Update pytest to test with (gzip in Accept-Encoding & server.gzip = False), (gzip in Accept-Encoding & server.gzip = True), (gzip not in Accept-Encoding & server.gzip = True)

* Better Content Negotiation (#7)

* Change content negotiation in _get_format()

* Add to pytest and force h to always be string

* Force F_JSON to default response

* Update test_api.py for utf-16 encoding

* better content negotiation pytest.

* Add comments to pytest

* Fix flake 8

* Improve docstring for gzip decorator function
2021-10-27 20:17:02 -04:00
Angelos Tzotsos 04250002d3 back to dev 2021-10-24 18:13:27 +03:00
Angelos Tzotsos 23991a97fc update release version 2021-10-24 17:33:20 +03:00
Tom Kralidis 16648ecb48 add queryable support for CSV and GeoJSON providers (#555) (#786) 2021-09-26 20:25:27 -04:00
Tom Kralidis 44624e8e87 docs: make CSV table more readable (#785) 2021-09-26 07:10:09 -04:00
Benjamin Webb a54fd6a908 Add postgres provider query parameters (#784)
* Add sortby, skip_geometry, and select_properties

* some pytest fixes

* Update main.yml

* Update main.yml

* fix geom in response feature

* more pytest fixes

* Update postgresql.py

* Update test_postgresql_provider.py

* Update test_postgresql_provider.py

* Add to docs, fix pytest

* fix for when when 'name' = None

* Update test_postgresql_provider.py

* Update test_postgresql_provider.py

* Remove optional comparator

* use secrets with default password

* Add secret to load postgres data
2021-09-25 07:03:38 -04:00
Sander Schaminee d2d5ce794a Language structs (dicts) must consist of valid locale keys only (#769) 2021-09-19 00:30:20 +02: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
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 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 00a08e05ba update OAProc content models (#735) 2021-07-22 15:13:09 +02: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
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 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
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
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 46f84a4ed3 migrate to GitHub Actions (#616) (#703) 2021-06-01 17:15:30 -04:00
Tom Kralidis 2744a24e6a fix ESRI Shapefile STAC publishing (#561) (#681) 2021-05-18 06:46:36 -04:00
Kyle Onda 589df6370a Support for PIDs and (non-Geo)JSON-LD (#676)
* Update api.py for uri_field

* Update linked_data.py

Update to meet the needs of https://github.com/internetofwater/geoconnex.us/issues/93

* Add uri_field to base.py provider

* Update index.html

Push uri-like field to front of list in collections/items

* Update api.py

Allow html files to handle uri_field

* Add trailing / to schema context

* Add uri_field to collections index page

* Add uri_field to collections item html page

* Update api.py

* Update configuration.rst

* fixed spelling

* Update configuration.rst

* Update configuration.rst

* Update configuration.rst

* Update sqlite.py

* Update linked_data.py

* Update api.py

* Revert 'id' cast to string

* Update configuration.rst

* Update linked_data.py

* Update api.py

* Update linked_data.py

* Update configuration.rst for json boolean

Co-authored-by: Benjamin Webb <40066515+webb-ben@users.noreply.github.com>
2021-04-27 19:44:19 -04:00
Angelos Tzotsos c55e1cf452 back to dev 2021-03-18 18:01:10 +02:00
Angelos Tzotsos 837847e85d update release version 2021-03-18 17:59:10 +02:00
Angelos Tzotsos 50fcfdf047 Back to dev 2021-03-16 18:40:48 +02:00
Angelos Tzotsos f978d0a1f6 update release version 2021-03-16 18:06:56 +02:00
Tom Kralidis 951a1fb486 implement OGC EDR API (#658)
* implement OGC EDR API
* add docs/tests
* fix tests
2021-03-15 17:37:40 +02:00
Tom Kralidis 2063c69872 add support for OpenAPI document as JSON (#657) 2021-03-12 16:47:01 -05:00
Tom Kralidis e0003b066b update queryables response 2021-02-25 22:26:25 +01:00
Tom Kralidis 9785c9afeb update docs 2021-02-21 19:45:22 -05:00