Skip to content

Commit 3debd0c

Browse files
authored
update configuration to be resource specific (#393)
1 parent 11ee705 commit 3debd0c

Some content is hidden

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

52 files changed

+275
-215
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ If applicable, add screenshots to help explain your problem.
2121

2222
**Environment**
2323
- OS:
24-
- Python version:
25-
- pygeoapi version:
24+
- Python version:
25+
- pygeoapi version:
2626

2727
**Additional context**
2828
Add any other context about the problem here.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Your contribution will be under our [license](https://github.com/geopython/pygeo
8484
branch, __base your branch off the ``master`` one__.
8585

8686
* Note that depending on how long it takes for the dev team to merge your
87-
patch, the copy of ``master`` you worked off of may get out of date!
87+
patch, the copy of ``master`` you worked off of may get out of date!
8888
* If you find yourself 'bumping' a pull request that's been sidelined for a
8989
while, __make sure you rebase or merge to latest ``master``__ to ensure a
9090
speedier resolution.
@@ -103,7 +103,7 @@ Your contribution will be under our [license](https://github.com/geopython/pygeo
103103

104104
### Code Formatting
105105

106-
* __Please follow the coding conventions and style used in the pygeoapi repository.__
106+
* __Please follow the coding conventions and style used in the pygeoapi repository.__
107107
* pygeoapi follows the [PEP-8](http://www.python.org/dev/peps/pep-0008/) guidelines
108108
* 80 characters
109109
* spaces, not tabs

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ Try the swagger ui at `http://localhost:5000/openapi`
3535
or
3636

3737
```bash
38-
# feature collection metadata
38+
# collection metadata
3939
curl http://localhost:5000/
4040
# conformance
4141
curl http://localhost:5000/conformance
42-
# feature collection
42+
# collection
4343
curl http://localhost:5000/collections/countries
44-
# feature collection limit 100
44+
# collection limit 100
4545
curl http://localhost:5000/collections/countries/items?limit=100
46-
# feature
46+
# collection item
4747
curl http://localhost:5000/collections/countries/items/1
4848
# number of hits
4949
curl http://localhost:5000/collections/countries/items?resulttype=hits

aws-lambda/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ zappa undeploy -s zappa_settings.json
3535

3636
## node/serverless
3737

38-
The included `serverless.yml` and `pygeoapi-serverless-config.yml` can be used to deploy pygeoapi
38+
The included `serverless.yml` and `pygeoapi-serverless-config.yml` can be used to deploy pygeoapi
3939
on AWS Lambda Serverless Environment.
4040

4141
This requires Amazon Credentials and the Serverless deployment tool.

aws-lambda/pygeoapi-serverless-config.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ metadata:
8181
instructions: During hours of service. Off on weekends.
8282
role: pointOfContact
8383

84-
datasets:
84+
resources:
8585
obs:
86+
type: collection
8687
title: Observations
8788
description: My cool observations
8889
keywords:
@@ -116,6 +117,7 @@ datasets:
116117
y_field: lat
117118

118119
ne_110m_populated_places_simple:
120+
type: collection
119121
title: Populated Places
120122
description: Point symbols with name attributes. Includes all admin-0 capitals and some other major cities. We favor regional significance over population census in determining our selection of places. Use the scale rankings to filter the number of towns that appear on your map.
121123
keywords:
@@ -143,6 +145,7 @@ datasets:
143145
id_field: geonameid
144146

145147
lakes:
148+
type: collection
146149
title: Large Lakes
147150
description: lakes of the world, public domain
148151
keywords:
@@ -167,6 +170,7 @@ datasets:
167170
id_field: id
168171

169172
countries:
173+
type: collection
170174
title: Countries in the world
171175
description: Countries of the world
172176
keywords:
@@ -191,6 +195,7 @@ datasets:
191195
id_field: ogc_fid
192196
table: ne_110m_admin_0_countries
193197
poi:
198+
type: collection
194199
title: Portuguese point of interrest
195200
description: Portuguese points of interrest obtained from OpenStreetMap. Dataset includes Madeira and Azores islands
196201
keywords:
@@ -222,6 +227,7 @@ datasets:
222227
table: poi_portugal
223228

224229
hotosm_bdi_waterways:
230+
type: collection
225231
title: Waterways of Burundi
226232
description: Waterways of Burundi, Africa. Dataset timestamp 1st Sep 2018 - Humanitarian OpenStreetMap Team (HOT)
227233
keywords:
@@ -256,6 +262,7 @@ datasets:
256262
table: hotosm_bdi_waterways
257263

258264
dutch_georef_stations:
265+
type: collection
259266
title: Dutch Georef Stations via OGR WFS
260267
description: Locations of RD/GNSS-reference stations from Dutch Kadaster PDOK a.k.a RDInfo. Uses MapServer WFS v2 backend via OGRProvider.
261268
keywords:
@@ -301,7 +308,7 @@ datasets:
301308
id_field: gml_id
302309
layer: rdinfo:stations
303310

304-
processes:
305311
hello-world:
312+
type: process
306313
processor:
307314
name: HelloWorld

debian/changelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pygeoapi (0.7.0-1~bionic0) bionic; urgency=medium
2-
2+
33
* Numerous CITE compliance fixes
44
* Elasticsearch: update provider to support ES7
55
* MongoDB provider implementation

debian/copyright

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Files: *
55
Copyright: Copyright 2019 Tom Kralidis
66
License: MIT
77
Permission is hereby granted, free of charge, to any person
8-
obtaining a copy of this software and associated documentation
9-
files (the "Software"), to deal in the Software without
8+
obtaining a copy of this software and associated documentation
9+
files (the "Software"), to deal in the Software without
1010
restriction, including without limitation the rights to use,
1111
copy, modify, merge, publish, distribute, sublicense, and/or
12-
sell copies of the Software, and to permit persons to whom
12+
sell copies of the Software, and to permit persons to whom
1313
the Software is furnished to do so, subject to the following
1414
conditions:
1515
.
@@ -21,6 +21,6 @@ License: MIT
2121
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2222
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
2323
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2525
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2626
OTHER DEALINGS IN THE SOFTWARE.

docker/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Docker Image `geopython/pygeoapi:latest` and versions are [available from DockerHub](https://hub.docker.com/r/geopython/pygeoapi).
44

5-
Each Docker Image contains a default configuration [default.config.yml](default.config.yml) with the project's test data and WFS3/OGC API Features datasets.
5+
Each Docker Image contains a default configuration [default.config.yml](default.config.yml) with the project's test data and OGC API dataset collections.
66

7-
You can override this default config via Docker Volume mapping or by extending the Docker Image and copying in your config. See an [example for the geoapi demo server](https://github.com/geopython/demo.pygeoapi.io/tree/master/services/pygeoapi) for the latter method.
7+
You can override this default config via Docker Volume mapping or by extending the Docker Image and copying in your config. See an [example for the geoapi demo server](https://github.com/geopython/demo.pygeoapi.io/tree/master/services/pygeoapi) for the latter method.
88

99
https://github.com/geopython/demo.pygeoapi.io/tree/master/services Depending on your config you may need specific backends to be available.
1010

@@ -19,9 +19,9 @@ So the chain is:
1919
2020
```
2121

22-
There are a number of examples at [several examples](https://github.com/geopython/pygeoapi/blob/master/docker/examples).
22+
There are a number of examples at [several examples](https://github.com/geopython/pygeoapi/blob/master/docker/examples).
2323

24-
### Installation
24+
### Installation
2525

2626
Install Docker (Ubuntu)
2727

@@ -51,11 +51,11 @@ Run/Create Container
5151
$ sudo docker run --name geoapi -p 5000:80 -v $(pwd)/my.config.yml:/pygeoapi/local.config.yml -it geopython/pygeoapi
5252
```
5353

54-
Go to http://localhost:5000/ and should be up and running.
54+
Go to http://localhost:5000/ and should be up and running.
5555

5656
## Running - Basics
5757

58-
By default this Image will start a `pygeoapi` Docker Container
58+
By default this Image will start a `pygeoapi` Docker Container
5959
using `gunicorn` on internal port 80.
6060

6161
To run with default built-in config and data:
@@ -64,7 +64,7 @@ To run with default built-in config and data:
6464
docker run -p 5000:80 -it geopython/pygeoapi run
6565
# or simply
6666
docker run -p 5000:80 -it geopython/pygeoapi
67-
67+
6868
# then browse to http://localhost:5000/
6969
```
7070

@@ -111,13 +111,13 @@ COPY ./my.config.yml /pygeoapi/local.config.yml
111111

112112
See how the demo server is setup this way at
113113
https://github.com/geopython/demo.pygeoapi.io/tree/master/services/pygeoapi_master
114-
114+
115115
## Running - Running on a sub-path
116116

117117
By default the `pygeoapi` Docker Image will run from the `root` path `/`.
118118
If you need to run from a sub-path and have all internal URLs correct
119119
you need to set `SCRIPT_NAME` environment variable.
120-
120+
121121
For example to run with `my.config.yml` on http://localhost:5000/mypygeoapi:
122122

123123
```
@@ -140,7 +140,7 @@ services:
140140
141141
ports:
142142
- "5000:80"
143-
143+
144144
environment:
145145
- SCRIPT_NAME=/pygeoapi
146146

docker/default.config.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ metadata:
8787
instructions: During hours of service. Off on weekends.
8888
role: pointOfContact
8989

90-
datasets:
90+
resources:
9191
obs:
92+
type: collection
9293
title: Observations
9394
description: My cool observations
9495
keywords:
@@ -126,6 +127,7 @@ datasets:
126127
y_field: lat
127128

128129
lakes:
130+
type: collection
129131
title: Large Lakes
130132
description: lakes of the world, public domain
131133
keywords:
@@ -149,6 +151,7 @@ datasets:
149151
id_field: id
150152

151153
countries:
154+
type: collection
152155
title: Countries in the world (SpatialLite Provider)
153156
description: Countries of the world (SpatialLite)
154157
keywords:
@@ -174,6 +177,7 @@ datasets:
174177
table: ne_110m_admin_0_countries
175178

176179
dutch_georef_stations:
180+
type: collection
177181
title: Dutch Georef Stations via OGR WFS
178182
description: Locations of RD/GNSS-reference stations from Dutch Kadaster PDOK a.k.a RDInfo. Uses MapServer WFS v2 backend via OGRProvider.
179183
keywords:
@@ -220,6 +224,7 @@ datasets:
220224
layer: rdinfo:stations
221225

222226
utah_city_locations:
227+
type: collection
223228
title: Cities in Utah via OGR WFS
224229
description: Data from the state of Utah. Standard demo dataset from the deegree WFS server that is used as backend WFS.
225230
keywords:
@@ -265,6 +270,7 @@ datasets:
265270
layer: app:SGID93_LOCATION_UDOTMap_CityLocations
266271

267272
unesco_pois_italy:
273+
type: collection
268274
title: Unesco POIs in Italy via OGR WFS
269275
description: Unesco Points of Interest in Italy. Using GeoSolutions GeoServer WFS demo-server as backend WFS.
270276
keywords:
@@ -309,6 +315,7 @@ datasets:
309315
layer: unesco:Unesco_point
310316

311317
ogr_gpkg_poi:
318+
type: collection
312319
title: Portuguese Points of Interest via OGR GPKG
313320
description: Portuguese Points of Interest obtained from OpenStreetMap. Dataset includes Madeira and Azores islands. Uses GeoPackage backend via OGR provider.
314321
keywords:
@@ -354,6 +361,7 @@ datasets:
354361
layer: poi_portugal
355362

356363
ogr_geojson_lakes:
364+
type: collection
357365
title: Large Lakes OGR GeoJSON Driver
358366
description: lakes of the world, public domain
359367
keywords:
@@ -392,6 +400,7 @@ datasets:
392400
layer: ne_110m_lakes
393401

394402
ogr_addresses_sqlite:
403+
type: collection
395404
title: Dutch addresses (subset Otterlo). OGR SQLite Driver
396405
description: Dutch addresses subset.
397406
keywords:
@@ -433,6 +442,7 @@ datasets:
433442
layer: ogrgeojson
434443

435444
ogr_addresses_gpkg:
445+
type: collection
436446
title: Dutch addresses (subset Otterlo). OGR GeoPackage Driver
437447
description: Dutch addresses subset.
438448
keywords:
@@ -472,7 +482,7 @@ datasets:
472482
id_field: id
473483
layer: OGRGeoJSON
474484

475-
processes:
476485
hello-world:
486+
type: process
477487
processor:
478488
name: HelloWorld

docker/examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ This folder contains the sub-folders:
55
- simple
66
- elastic
77

8-
The [simple](simple) example will run pygeoapi with Docker with your local config.
8+
The [simple](simple) example will run pygeoapi with Docker with your local config.
99
The [elastic](elastic) example demonstrates a docker compose configuration to run pygeoapi with local ElasticSearch backend.

0 commit comments

Comments
 (0)