Skip to content

Commit ad8c5c9

Browse files
authored
Merge pull request #10 from geopython/master
sync with codebase
2 parents 6a360e0 + 11b9480 commit ad8c5c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1512
-15464
lines changed

.github/workflows/docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build documentation ⚙️
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'docs/**'
9+
pull_request:
10+
branches:
11+
- master
12+
paths:
13+
- 'docs/**'
14+
release:
15+
types:
16+
- released
17+
18+
jobs:
19+
main:
20+
runs-on: ubuntu-22.04
21+
strategy:
22+
matrix:
23+
include:
24+
- python-version: '3.10'
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions/setup-python@v2
28+
name: Setup Python ${{ matrix.python-version }}
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
- name: Install requirements 📦
32+
run: |
33+
pip3 install -r requirements.txt
34+
pip3 install -r docs/requirements.txt
35+
- name: build docs 🏗️
36+
run: cd docs && make html

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ on:
44
push:
55
paths-ignore:
66
- '**.md'
7+
- 'docs/**'
78
pull_request:
89
branches:
910
- master
1011
paths-ignore:
1112
- '!**.md'
13+
- 'docs/**'
1214
release:
1315
types:
1416
- released
@@ -65,7 +67,7 @@ jobs:
6567
with:
6668
mongodb-version: 4.4
6769
- name: Install and run SensorThingsAPI
68-
uses: cgs-earth/sensorthings-action@v0.0.2
70+
uses: cgs-earth/sensorthings-action@v0.1.0
6971
- name: Install sqlite and gpkg dependencies
7072
uses: awalsh128/cache-apt-pkgs-action@latest
7173
with:
@@ -90,7 +92,6 @@ jobs:
9092
pip3 install -r requirements-dev.txt
9193
pip3 install -r requirements-provider.txt
9294
pip3 install -r requirements-django.txt
93-
pip3 install -r docs/requirements.txt
9495
python3 setup.py install
9596
pip3 install --upgrade numpy elasticsearch
9697
pip3 install --upgrade numpy "sqlalchemy<2"
@@ -103,6 +104,7 @@ jobs:
103104
python3 tests/load_mongo_data.py tests/data/ne_110m_populated_places_simple.geojson
104105
gunzip < tests/data/hotosm_bdi_waterways.sql.gz | psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test
105106
psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test -f tests/data/dummy_data.sql
107+
psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test -f tests/data/dummy_types_data.sql
106108
docker ps
107109
python3 tests/load_oracle_data.py
108110
- name: run unit tests ⚙️
@@ -139,8 +141,6 @@ jobs:
139141
pytest tests/test_util.py
140142
pytest tests/test_xarray_netcdf_provider.py
141143
pytest tests/test_xarray_zarr_provider.py
142-
- name: build docs 🏗️
143-
run: cd docs && make html
144144
- name: failed tests 🚩
145145
if: ${{ failure() }}
146146
run: |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#
3535
# =================================================================
3636

37-
FROM ubuntu:jammy-20240227
37+
FROM ubuntu:jammy-20240627.1
3838

3939
LABEL maintainer="Just van den Broecke <[email protected]>"
4040

docker/default.config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ resources:
342342
keywords:
343343
- Portugal
344344
- POI
345-
- Point of Interrest
345+
- Point of Interest
346346
- Madeira
347347
- Azores
348348
- OSM

docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ case ${entry_cmd} in
7171
test)
7272
for test_py in $(ls tests/test_*.py)
7373
do
74-
# Skip tests requireing backend server or libs installed
74+
# Skip tests requiring backend server or libs installed
7575
case ${test_py} in
7676
tests/test_elasticsearch__provider.py)
7777
;&

docs/source/admin-api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Access control
1818
--------------
1919

2020
It should be made clear that authentication and authorization is beyond the responsibility of pygeoapi. This means that
21-
if a pygeoapi user enables the Admin API, they must provide access control explicity via another service.
21+
if a pygeoapi user enables the Admin API, they must provide access control explicitly via another service.
2222

2323
pygeoapi hot reloading in gunicorn
2424
----------------------------------

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def __getattr__(cls, name):
112112
# built documents.
113113
#
114114
# The short X.Y version.
115-
version = '0.17.dev0'
115+
version = '0.18.dev0'
116116
# The full version, including alpha/beta/rc tags.
117117
release = version
118118

docs/source/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ The ``logging`` section provides directives for logging messages which are usefu
8383
logging:
8484
level: ERROR # the logging level (see https://docs.python.org/3/library/logging.html#logging-levels)
8585
logfile: /path/to/pygeoapi.log # the full file path to the logfile
86-
logformat: # example for miliseconds:'[%(asctime)s.%(msecs)03d] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s'
87-
dateformat: # example for miliseconds:'%Y-%m-%dT%H:%M:%S'
86+
logformat: # example for milliseconds:'[%(asctime)s.%(msecs)03d] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s'
87+
dateformat: # example for milliseconds:'%Y-%m-%dT%H:%M:%S'
8888
8989
.. note::
9090
If ``level`` is defined and ``logfile`` is undefined, logging messages are output to the server's ``stdout``.

docs/source/data-publishing/ogcapi-coverages.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,41 @@ Data access examples
100100
--------------------
101101

102102
* list all collections
103+
103104
* http://localhost:5000/collections
105+
104106
* overview of dataset
107+
105108
* http://localhost:5000/collections/foo
109+
106110
* schema of dataset
111+
107112
* http://localhost:5000/collections/foo/schema
113+
108114
* coverage access via CoverageJSON (default)
115+
109116
* http://localhost:5000/collections/foo/coverage?f=json
117+
110118
* coverage access via native format (as defined in ``provider.format.name``)
119+
111120
* http://localhost:5000/collections/foo/coverage?f=GRIB
121+
112122
* coverage access with comma-separated properties
123+
113124
* http://localhost:5000/collections/foo/coverage?properties=1,3
125+
114126
* coverage access with subsetting
127+
115128
* http://localhost:5000/collections/foo/coverage?subset=lat(10:20)&subset=long(10:20)
129+
116130
* coverage with bbox
131+
117132
* http://localhost:5000/collections/foo/coverage?bbox=10,10,20,20
133+
118134
* coverage with bbox and bbox CRS
135+
119136
* http://localhost:5000/collections/foo/coverage?bbox=-8794239.772668611,5311971.846945471,-8348961.809495518,5621521.486192066&bbox=crs=3857
137+
120138

121139
.. note::
122140
``.../coverage`` queries which return an alternative representation to CoverageJSON (which prompt a download)

docs/source/data-publishing/ogcapi-features.rst

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Mandatory properties
361361
- example_group_id
362362
363363
On large tables it could be useful to disallow a query on the complete dataset. For this reason it is possible to
364-
configure mandatory properties. When this is activated, the provoder throws an exception when the parameter
364+
configure mandatory properties. When this is activated, the provider throws an exception when the parameter
365365
is not in the query uri.
366366

367367
Extra properties
@@ -387,13 +387,28 @@ Extra properties
387387
Extra properties is a list of strings which are added as fields for data retrieval in the SELECT clauses. They
388388
can be used to return expressions computed by the database.
389389

390+
Session Pooling
391+
""""""""""""""""
392+
393+
Configured using environment variables.
394+
395+
.. code-block:: bash
396+
397+
export ORACLE_POOL_MIN=2
398+
export ORACLE_POOL_MAX=10
399+
400+
401+
The ``ORACLE_POOL_MIN`` and ``ORACLE_POOL_MAX`` environment variables are used to trigger session pool creation in the Oracle Provider and the ``DatabaseConnection`` class. See https://python-oracledb.readthedocs.io/en/latest/api_manual/module.html#oracledb.create_pool for documentation of the ``create_pool`` function.
402+
403+
If none or only one of the environment variables is set, session pooling will not be activated and standalone connections are established at every request.
404+
390405

391406
Custom SQL Manipulator Plugin
392407
"""""""""""""""""""""""""""""
393408
The provider supports a SQL-Manipulator-Plugin class. With this, the SQL statement could be manipulated. This is
394409
useful e.g. for authorization at row level or manipulation of the explain plan with hints.
395410

396-
An example an more informations about that feature you can find in the test class in tests/test_oracle_provider.py.
411+
An example an more information about that feature you can find in the test class in tests/test_oracle_provider.py.
397412

398413
.. _PostgreSQL:
399414

@@ -488,7 +503,7 @@ SQLiteGPKG
488503
^^^^^^^^^^
489504

490505
.. note::
491-
Requries Spatialite installation
506+
Requires Spatialite installation
492507

493508
SQLite file:
494509

docs/source/data-publishing/ogcapi-processes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Hello World (Default)
110110
# execute a job for the ``hello-world`` process in asynchronous mode
111111
curl -X POST http://localhost:5000/processes/hello-world/execution \
112112
-H "Content-Type: application/json" \
113-
-H "Prefer: respond-async"
113+
-H "Prefer: respond-async" \
114114
-d "{\"inputs\":{\"name\": \"hi there2\"}}"
115115
# execute a job for the ``hello-world`` process with a success subscriber
116116
curl -X POST http://localhost:5000/processes/hello-world/execution \

docs/source/data-publishing/ogcapi-records.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,27 +100,49 @@ Metadata search examples
100100
------------------------
101101

102102
* overview of record collection
103+
103104
* http://localhost:5000/collections/metadata-records
105+
104106
* queryables
107+
105108
* http://localhost:5000/collections/foo/queryables
109+
106110
* browse records
111+
107112
* http://localhost:5000/collections/foo/items
113+
108114
* paging
115+
109116
* http://localhost:5000/collections/foo/items?offset=10&limit=10
117+
110118
* CSV outputs
119+
111120
* http://localhost:5000/collections/foo/items?f=csv
121+
112122
* query records (spatial)
123+
113124
* http://localhost:5000/collections/foo/items?bbox=-180,-90,180,90
125+
114126
* query records (attribute)
127+
115128
* http://localhost:5000/collections/foo/items?propertyname=foo
129+
116130
* query records (temporal)
131+
117132
* http://localhost:5000/collections/my-metadata/items?datetime=2020-04-10T14:11:00Z
133+
118134
* query features (temporal) and sort ascending by a property (if no +/- indicated, + is assumed)
135+
119136
* http://localhost:5000/collections/my-metadata/items?datetime=2020-04-10T14:11:00Z&sortby=datetime
137+
120138
* query features (temporal) and sort descending by a property
139+
121140
* http://localhost:5000/collections/my-metadata/items?datetime=2020-04-10T14:11:00Z&sortby=-datetime
141+
122142
* fetch a specific record
143+
123144
* http://localhost:5000/collections/my-metadata/items/123
145+
124146

125147
.. note::
126148
provider `id_field` values support slashes (i.e. ``my/cool/identifier``). The client request would then

docs/source/data-publishing/ogcapi-tiles.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pygeoapi core tile providers are listed below, along with supported features.
1919
:align: left
2020

2121
`MVT-tippecanoe`_,❌,✅,✅,❌
22-
`MVT-elastic`_,✅,,✅,❌
22+
`MVT-elastic`_,✅,,✅,❌
2323
`MVT-proxy`_,❓,❓,❓,❓
2424
`WMTSFacade`_,✅,❌,✅,✅
2525

@@ -162,15 +162,25 @@ Data access examples
162162
--------------------
163163

164164
* list all collections
165+
165166
* http://localhost:5000/collections
167+
166168
* overview of dataset
169+
167170
* http://localhost:5000/collections/foo
171+
168172
* overview of dataset tiles
173+
169174
* http://localhost:5000/collections/foo/tiles
175+
170176
* tile matrix metadata
177+
171178
* http://localhost:5000/collections/lakes/tiles/WorldCRS84Quad/metadata
179+
172180
* tiles URI template
181+
173182
* `http://localhost:5000/collections/lakes/tiles/{tileMatrixSetId}/{tileMatrix}/{tileRow}/{tileCol}?f=mvt <http://localhost:5000/collections/lakes/tiles/{tileMatrixSetId}/{tileMatrix}/{tileRow}/{tileCol}?f=mvt>`_
183+
174184

175185

176186
.. _`OGC API - Tiles`: https://github.com/opengeospatial/ogcapi-tiles

docs/source/data-publishing/stac.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Connection examples
4949
pygeometa metadata control files
5050
--------------------------------
5151

52-
pygeoapi's STAC filesystem fuctionality supports `pygeometa`_ MCF files residing
52+
pygeoapi's STAC filesystem functionality supports `pygeometa`_ MCF files residing
5353
in the same directory as data files. If an MCF file is found, it will be used
5454
as part of generating the STAC item metadata (e.g. a file named ``birds.csv``
5555
having an associated ``birds.yml`` file). If no MCF file is found, then
@@ -66,6 +66,7 @@ Data access examples
6666
--------------------
6767

6868
* STAC root page
69+
6970
* http://localhost:5000/stac
7071

7172
From here, browse the filesystem accordingly.

docs/source/html-templating.rst

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,13 @@ Linking to a static file in your HTML templates can be done using Jinja syntax a
3636
<img src="{{ config['server']['url'] }}/static/img/logo.png" title="{{ config['metadata']['identification']['title'] }}" />
3737

3838

39-
Featured templates
40-
------------------
41-
42-
The following themes provide useful examples of pygeoapi templates implemented
43-
by downstream applications.
44-
45-
.. csv-table::
46-
:header: "Plugin(s)", "Organization/Project","Description"
47-
:align: left
48-
49-
`pygeoapi-skin-dashboard`_,GeoCat bv,skin for pygeoapi based on a typical dashboard interface
39+
Featured themes
40+
----------------
5041

42+
Community based themes can be found on the `pygeoapi Community Plugins and Themes wiki page`_.
5143

5244
.. _`Jinja`: https://palletsprojects.com/p/jinja/
5345
.. _`Jinja documentation`: https://jinja.palletsprojects.com
5446
.. _`Flask`: https://palletsprojects.com/p/flask/
5547
.. _`Flask documentation`: https://flask.palletsprojects.com
56-
.. _`pygeoapi-skin-dashboard`: https://github.com/GeoCat/pygeoapi-skin-dashboard
48+
.. _`pygeoapi Community Plugins and Themes wiki page`: https://github.com/geopython/pygeoapi/wiki/CommunityPluginsThemes

docs/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ reference documentation on all aspects of the project.
5151
support
5252
further-reading
5353
license
54-
5554
api-documentation
5655

5756
Indices and tables

docs/source/introduction.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@ Features
1010

1111
* out of the box modern OGC API server
1212
* certified OGC Compliant and Reference Implementation
13+
1314
* OGC API - Features
1415
* OGC API - Environmental Data Retrieval
16+
* OGC API - Tiles
17+
1518
* additionally implements
19+
1620
* OGC API - Coverages
1721
* OGC API - Maps
18-
* OGC API - Tiles
1922
* OGC API - Processes
2023
* OGC API - Records
2124
* SpatioTemporal Asset Library
25+
2226
* out of the box data provider plugins for rasterio, GDAL/OGR, Elasticsearch, PostgreSQL/PostGIS
2327
* easy to use OpenAPI / Swagger documentation for developers
2428
* supports JSON, GeoJSON, HTML and CSV output

0 commit comments

Comments
 (0)