Skip to content

Commit

Permalink
Merge branch 'master' into pydantic2
Browse files Browse the repository at this point in the history
  • Loading branch information
aulemahal committed Sep 18, 2024
2 parents ff476aa + 6682b44 commit d3cd3e8
Show file tree
Hide file tree
Showing 96 changed files with 3,496 additions and 1,927 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
branches: [master]

env:
DOCKER_REPOSITORY: geopython/pygeoapi
DOCKER_REPOSITORY: ${{ secrets.DOCKER_REPOSITORY || 'geopython/pygeoapi' }}
# DOCKER_TEST_IMAGE: geopython/pygeoapi:test

jobs:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,20 @@ jobs:
pip3 install -r requirements-starlette.txt
pip3 install -r requirements-dev.txt
pip3 install -r requirements-provider.txt
pip3 install -r requirements-manager.txt
pip3 install -r requirements-django.txt
python3 setup.py install
pip3 install --upgrade numpy elasticsearch
pip3 install --upgrade numpy "sqlalchemy<2"
pip3 install --upgrade "sqlalchemy<2"
pip3 install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
#pip3 install --upgrade rasterio==1.1.8
- name: setup test data ⚙️
run: |
python3 tests/load_es_data.py tests/data/ne_110m_populated_places_simple.geojson geonameid
python3 tests/load_es_data.py tests/cite/canada-hydat-daily-mean-02HC003.geojson IDENTIFIER
python3 tests/load_mongo_data.py tests/data/ne_110m_populated_places_simple.geojson
gunzip < tests/data/hotosm_bdi_waterways.sql.gz | psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test
psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test -f tests/data/dummy_data.sql
psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test -f tests/data/dummy_types_data.sql
psql postgresql://postgres:${{ secrets.DatabasePassword || 'postgres' }}@localhost:5432/test -f tests/data/postgres_manager_full_structure.backup.sql
docker ps
python3 tests/load_oracle_data.py
- name: run unit tests ⚙️
Expand All @@ -128,6 +128,7 @@ jobs:
pytest tests/test_ogr_shapefile_provider.py
pytest tests/test_ogr_sqlite_provider.py
pytest tests/test_ogr_wfs_provider.py
pytest tests/test_postgresql_manager.py
# pytest tests/test_ogr_wfs_provider_live.py # NOTE: these are skipped in the file but listed here for completeness
pytest tests/test_openapi.py
pytest tests/test_oracle_provider.py
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ ENV TZ=${TZ} \
python3-greenlet \
python3-pip \
python3-tz \
python3-unicodecsv \
python3-yaml \
${ADD_DEB_PACKAGES}"

Expand Down
12 changes: 6 additions & 6 deletions docker/default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ server:
limit: 10
# templates: /path/to/templates
map:
url: https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia maps</a> | Map data &copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
ogc_schemas_location: /schemas.opengis.net

logging:
Expand Down Expand Up @@ -200,7 +200,7 @@ resources:
hreflang: nl-NL
extents:
spatial:
bbox: [50.7539, 7.21097, 53.4658, 3.37087]
bbox: [3.37,50.75,7.21,53.47]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin:
Expand Down Expand Up @@ -301,7 +301,7 @@ resources:
hreflang: en-US
extents:
spatial:
bbox: [36.0, 17.0, 46.0, 18.0]
bbox: [5.0,36.0,20.0,46.0]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin:
Expand Down Expand Up @@ -438,7 +438,7 @@ resources:
hreflang: nl-NL
extents:
spatial:
bbox: [50.7539, 7.21097, 53.4658, 3.37087]
bbox: [3.37,50.75,7.21,53.47]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin:
Expand Down Expand Up @@ -481,7 +481,7 @@ resources:
hreflang: nl-NL
extents:
spatial:
bbox: [50.7539, 7.21097, 53.4658, 3.37087]
bbox: [3.37,50.75,7.21,53.47]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin:
Expand Down
7 changes: 4 additions & 3 deletions docs/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ For more information related to API design rules (the ``api_rules`` property in
static: /path/to/static/folder # path to static folder containing css, js, images and other static files referenced by the template
map: # leaflet map setup for HTML pages
url: https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia maps</a> | Map data &copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
ogc_schemas_location: /opt/schemas.opengis.net # local copy of https://schemas.opengis.net
manager: # optional OGC API - Processes asynchronous job management
Expand Down Expand Up @@ -206,6 +206,7 @@ default.
temporal: # optional
begin: 2000-10-30T18:24:39Z # start datetime in RFC3339
end: 2007-10-30T08:57:29Z # end datetime in RFC3339
trs: http://www.opengis.net/def/uom/ISO-8601/0/Gregorian # TRS
providers: # list of 1..n required connections information
# provider name
# see pygeoapi.plugin for supported providers
Expand Down Expand Up @@ -240,7 +241,7 @@ default.
option_name: option_value
hello-world: # name of process
type: collection # REQUIRED (collection, process, or stac-collection)
type: process # REQUIRED (collection, process, or stac-collection)
processor:
name: HelloWorld # Python path of process definition
Expand Down
11 changes: 10 additions & 1 deletion docs/source/data-publishing/ogcapi-coverages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ The `Xarray`_ provider plugin reads and extracts `NetCDF`_ and `Zarr`_ data.
data: tests/data/coads_sst.nc
# optionally specify x/y/time fields, else provider will attempt
# to derive automagically
x_field: lat
x_field: lon
y_field: lat
time_field: time
# optionally specify the coordinate reference system of your dataset
# else pygeoapi assumes it is WGS84 (EPSG:4326).
storage_crs: 4326
format:
name: netcdf
mimetype: application/x-netcdf
Expand All @@ -96,6 +99,11 @@ The `Xarray`_ provider plugin reads and extracts `NetCDF`_ and `Zarr`_ data.
be sure to provide the full S3 URL. Any parameters required to open the dataset
using fsspec can be added to the config file under `options` and `s3`.

.. note::
When providing a `storage_crs` value in the xarray configuration, specify the
coordinate reference system using any valid input for
`pyproj.CRS.from_user_input`_.

Data access examples
--------------------

Expand Down Expand Up @@ -146,3 +154,4 @@ Data access examples
.. _`NetCDF`: https://en.wikipedia.org/wiki/NetCDF
.. _`Zarr`: https://zarr.readthedocs.io/en/stable
.. _`GDAL raster driver short name`: https://gdal.org/drivers/raster/index.html
.. _`pyproj.CRS.from_user_input`: https://pyproj4.github.io/pyproj/stable/api/crs/coordinate_system.html#pyproj.crs.CoordinateSystem.from_user_input
16 changes: 15 additions & 1 deletion docs/source/data-publishing/ogcapi-edr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ The `xarray-edr`_ provider plugin reads and extracts `NetCDF`_ and `Zarr`_ data
data: tests/data/coads_sst.nc
# optionally specify x/y/time fields, else provider will attempt
# to derive automagically
x_field: lat
x_field: lon
y_field: lat
time_field: time
# optionally specify the coordinate reference system of your dataset
# else pygeoapi assumes it is WGS84 (EPSG:4326).
storage_crs: 4326
format:
name: netcdf
mimetype: application/x-netcdf
Expand Down Expand Up @@ -81,25 +84,36 @@ The `xarray-edr`_ provider plugin reads and extracts `NetCDF`_ and `Zarr`_ data
S3 URL. Any parameters required to open the dataset using fsspec can be added
to the config file under `options` and `s3`, as shown above.

.. note::
When providing a `storage_crs` value in the EDR configuration, specify the
coordinate reference system using any valid input for
`pyproj.CRS.from_user_input`_.


Data access examples
--------------------

* list all collections

* http://localhost:5000/collections
* overview of dataset

* http://localhost:5000/collections/foo
* dataset position query

* http://localhost:5000/collections/foo/position?coords=POINT(-75%2045)
* dataset position query for a specific parameter

* http://localhost:5000/collections/foo/position?coords=POINT(-75%2045)&parameter-name=SST
* dataset position query for a specific parameter and time step

* http://localhost:5000/collections/foo/position?coords=POINT(-75%2045)&parameter-name=SST&datetime=2000-01-16


.. _`xarray`: https://docs.xarray.dev/en/stable/
.. _`NetCDF`: https://en.wikipedia.org/wiki/NetCDF
.. _`Zarr`: https://zarr.readthedocs.io/en/stable
.. _`pyproj.CRS.from_user_input`: https://pyproj4.github.io/pyproj/stable/api/crs/coordinate_system.html#pyproj.crs.CoordinateSystem.from_user_input


.. _`OGC Environmental Data Retrieval (EDR) (API)`: https://github.com/opengeospatial/ogcapi-coverages
Loading

0 comments on commit d3cd3e8

Please sign in to comment.