Skip to content

Commit 0439f8e

Browse files
committed
Upstream pygeoapi
Update requirements.txt Support trailing slashes Add Geopandas Update Dockerfile Amend rebase Use pypi release for pygeoapi plugins Fix FileSystem Provider (#10) * Amend FS provider * fix flake8 * Skip failing tests Add SitemapGenerator Add PsuedoCount Postgres provider plugin name Add pyeoapi-plugins
1 parent e8aef58 commit 0439f8e

File tree

8 files changed

+27
-12
lines changed

8 files changed

+27
-12
lines changed

.github/workflows/containers.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ on:
99
workflow_run:
1010
workflows: ["Build"]
1111
types: [completed]
12-
branches: [master]
12+
branches: [latest]
13+
push:
14+
branches:
15+
- latest
1316

1417
env:
1518
DOCKER_REPOSITORY: ${{ secrets.DOCKER_REPOSITORY || 'geopython/pygeoapi' }}
@@ -36,8 +39,8 @@ jobs:
3639
- name: Log in to Docker Hub
3740
uses: docker/[email protected]
3841
with:
39-
username: ${{ secrets.DOCKER_USERNAME }}
40-
password: ${{ secrets.DOCKER_PASSWORD }}
42+
username: ${{ secrets.DOCKERHUB_USERNAME }}
43+
password: ${{ secrets.DOCKERHUB_TOKEN }}
4144

4245
- name: Log in to the Container registry
4346
uses: docker/[email protected]
@@ -66,7 +69,7 @@ jobs:
6669
ghcr.io/${{ github.repository }}
6770
tags: |
6871
type=semver,pattern={{version}}
69-
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
72+
type=raw,value=latest
7073
7174
- name: Build and push Docker images
7275
uses: docker/[email protected]

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
docker run -d --name oracledb -e ORACLE_PWD=oracle -v ${{ github.workspace }}/tests/data/oracle/init-db:/opt/oracle/scripts/startup -p 1521:1521 container-registry.oracle.com/database/express:21.3.0-xe
116116
- name: Install requirements 📦
117117
run: |
118+
pip3 install git+https://github.com/cgs-earth/pygeoapi-plugins.git
118119
pip3 install -r requirements.txt
119120
pip3 install -r requirements-admin.txt
120121
pip3 install -r requirements-starlette.txt

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ RUN \
128128

129129
ADD requirements-docker.txt requirements-admin.txt /pygeoapi/
130130
# Install remaining pygeoapi deps
131-
RUN python3 -m pip install --no-cache-dir -r requirements-docker.txt \
131+
RUN python3 -m pip install --no-cache-dir https://github.com/cgs-earth/pygeoapi-plugins/archive/refs/heads/master.zip \
132+
&& python3 -m pip install --no-cache-dir -r requirements-docker.txt \
132133
&& python3 -m pip install --no-cache-dir -r requirements-admin.txt
133134

134135

pygeoapi/flask_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ def get_tilematrix_sets():
217217
return execute_from_flask(tiles_api.tilematrixsets, request)
218218

219219

220-
@BLUEPRINT.route('/collections')
221-
@BLUEPRINT.route('/collections/<path:collection_id>')
220+
@BLUEPRINT.route('/collections/')
221+
@BLUEPRINT.route('/collections/<path:collection_id>/')
222222
def collections(collection_id=None):
223223
"""
224224
OGC API collections endpoint
@@ -260,7 +260,7 @@ def collection_queryables(collection_id=None):
260260
collection_id)
261261

262262

263-
@BLUEPRINT.route('/collections/<path:collection_id>/items',
263+
@BLUEPRINT.route('/collections/<path:collection_id>/items/',
264264
methods=['GET', 'POST', 'OPTIONS'],
265265
provide_automatic_options=False)
266266
@BLUEPRINT.route('/collections/<path:collection_id>/items/<path:item_id>',

pygeoapi/plugin.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,23 @@
7070
'WMSFacade': 'pygeoapi.provider.wms_facade.WMSFacadeProvider',
7171
'WMTSFacade': 'pygeoapi.provider.wmts_facade.WMTSFacadeProvider',
7272
'xarray': 'pygeoapi.provider.xarray_.XarrayProvider',
73-
'xarray-edr': 'pygeoapi.provider.xarray_edr.XarrayEDRProvider'
73+
'xarray-edr': 'pygeoapi.provider.xarray_edr.XarrayEDRProvider',
74+
'CKAN': 'pygeoapi_plugins.provider.ckan.CKANProvider',
75+
'FileSystemXML': 'pygeoapi_plugins.provider.filesystem_xml.FileSystemXMLProvider', # noqa: E501
76+
'GeoPandas': 'pygeoapi_plugins.provider.geopandas_.GeoPandasProvider', # noqa
77+
'MVT-PostgreSQL': 'pygeoapi_plugins.provider.mvt_postgresql.MVTPostgreSQLProvider_', # noqa: E501
78+
'PsuedoPostgreSQL': 'pygeoapi_plugins.provider.postgresql.PseudoPostgreSQLProvider', # noqa
79+
'SPARQL': 'pygeoapi_plugins.provider.sparql.SPARQLProvider'
7480
},
7581
'formatter': {
7682
'CSV': 'pygeoapi.formatter.csv_.CSVFormatter'
7783
},
7884
'process': {
7985
'HelloWorld': 'pygeoapi.process.hello_world.HelloWorldProcessor',
8086
'ShapelyFunctions': 'pygeoapi.process.shapely_functions.ShapelyFunctionsProcessor', # noqa: E501
81-
'Echo': 'pygeoapi.process.echo.EchoProcessor'
87+
'Echo': 'pygeoapi.process.echo.EchoProcessor',
88+
'Intersector': 'pygeoapi_plugins.process.intersect.IntersectionProcessor', # noqa
89+
'SitemapGenerator': 'pygeoapi_plugins.process.sitemap.SitemapProcessor', # noqa
8290
},
8391
'process_manager': {
8492
'Dummy': 'pygeoapi.process.manager.dummy.DummyManager',

pygeoapi/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def file_modified_iso8601(filepath: Path) -> str:
318318
"""
319319

320320
return datetime.fromtimestamp(
321-
os.path.getctime(filepath)).strftime('%Y-%m-%dT%H:%M:%SZ')
321+
os.path.getmtime(filepath)).strftime('%Y-%m-%dT%H:%M:%SZ')
322322

323323

324324
def human_size(nbytes: int) -> str:

requirements-docker.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ sodapy
77
s3fs<=2023.6.0
88
Flask>=2.2.0
99
Flask-Cors
10+
pygeoapi-plugins

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ filelock
44
Flask
55
jinja2
66
jsonschema
7-
pydantic
7+
pydantic>2.0
8+
pygeoapi-plugins
89
pygeofilter
910
pygeoif
1011
pyproj

0 commit comments

Comments
 (0)