Skip to content

Add CI workflow to test CITE compliance #2011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 42 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1219f56
Adding compose for running CITE tests
Apr 27, 2024
63815dd
Adding compose for running CITE tests
Jul 9, 2024
1199423
Adding compose for running CITE tests
Jul 12, 2024
b1d5212
Adding compose for running CITE tests
Jul 12, 2024
bf986a0
Fix bug in workflow
Jul 12, 2024
f301f88
Fix bug in workflow
Jul 12, 2024
99b83d1
Fix bug in workflow
Jul 12, 2024
5639e6c
Trying out the github action
Jul 12, 2024
6198802
Trying out the github action
Jul 12, 2024
33bf014
Added healthcheck for pygeoapi service
Jul 13, 2024
1bafb48
Increased timeout for checking if pygeoapi service is healthy
Jul 13, 2024
5dee390
Increased timeout for checking if pygeoapi service is healthy
Jul 13, 2024
54e102d
Adding way to inspect logs on github workflow
Jul 13, 2024
ccde58b
Fixed unrecognized image name on step that collects logs
Jul 13, 2024
62fa84a
Fixing compose so that it runs on CI
Jul 13, 2024
b42d5db
Trying out workflow with matrix to run multiple test suites
ricardogsilva Jul 14, 2024
a9a2e6d
Test updated cite action
ricardogsilva Dec 23, 2024
043549f
Test updated cite action
ricardogsilva Dec 30, 2024
7353c67
Test updated cite action
ricardogsilva Jan 2, 2025
ce575e3
Added COLUMNS env variable
ricardogsilva Jan 2, 2025
a44e87b
Added ogcapi-edr CITE runner
ricardogsilva Mar 20, 2025
218d4a5
Adapted cite-runner arguments
ricardogsilva Mar 27, 2025
652ae6d
Renaming cite testing jobs to make them easier to distinguish
ricardogsilva Mar 27, 2025
03e8940
Added ogcapi-tiles to the CITE CI workflow
ricardogsilva Apr 10, 2025
d589c1b
Adding job exit with error on suite failed result
ricardogsilva Apr 10, 2025
04f238d
Adapt to changed parameter names
ricardogsilva Apr 14, 2025
96f1da0
Update to use a tagged version of cite-runner
ricardogsilva Apr 24, 2025
fa9b12c
Update to use a tagged version of cite-runner
ricardogsilva Apr 24, 2025
8749053
Revert back to cite-runner@main
ricardogsilva Apr 24, 2025
2c916bd
Update arguments for cite-runner
ricardogsilva May 8, 2025
2a36fc4
Update arguments for cite-runner
ricardogsilva May 8, 2025
9515352
Adding final workflow job to set overall status based on matrix results
ricardogsilva May 8, 2025
2f356cc
Adding final workflow job to set overall status based on matrix results
ricardogsilva May 8, 2025
fb5582f
Adding final workflow job to set overall status based on matrix results
ricardogsilva May 8, 2025
bd0e762
Adding final workflow job to set overall status based on matrix results
ricardogsilva May 8, 2025
88b34bd
Adjusting workflow status when a job fails
ricardogsilva May 8, 2025
8c2ecee
Adapt edr suite arguments
ricardogsilva May 8, 2025
3ffd9b5
Updated cite-runner action version
ricardogsilva May 12, 2025
0cf7478
Added more test datasets
ricardogsilva May 12, 2025
e352c6f
Rebase on top of current pygeoapi master
ricardogsilva May 12, 2025
0669f32
Remove commented out workflow step
ricardogsilva May 12, 2025
2ddd3ec
Remove unused teamengine bootstrap file
ricardogsilva May 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/cite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 'Perform CITE tests against a local teamengine instance'

on:
push:
pull_request:

env:
COLUMNS: 120


jobs:

perform-cite-testing:
name: ${{ matrix.test-suite.suite-id }} CITE testing
# continue-on-error: true
continue-on-error: false
strategy:
fail-fast: false
matrix:
test-suite:
- suite-id: ogcapi-features-1.0
arguments: >-
iut=http://host.docker.internal:5001
noofcollections=-1
- suite-id: ogcapi-processes-1.0
arguments: >-
iut=http://host.docker.internal:5001
noofcollections=-1
- suite-id: ogcapi-edr10
arguments: >-
iut=http://host.docker.internal:5001
apiDefinition=http://host.docker.internal:5001/openapi
- suite-id: ogcapi-tiles-1.0
arguments: >-
iut=http://host.docker.internal:5001
tilematrixsetdefinitionuri=http://www.opengis.net/def/tilematrixset/OGC/1.0/WebMercatorQuad
urltemplatefortiles=http://localhost:5001/collections/lakes/tiles/WebMercatorQuad/{tileMatrix}/{tileRow}/{tileCol}?f=mvt
tilematrix=0
mintilerow=0
maxtilerow=1
mintilecol=0
maxtilecol=1

runs-on: ubuntu-22.04
steps:

- name: grab code
uses: actions/checkout@v4

- name: start pygeoapi with suitable CITE data and config
run: >
docker compose -f tests/cite/compose.test-cite.yaml up --detach

- name: wait for pygeoapi to be usable
uses: raschmitt/wait-for-healthy-container@v1.0.1
with:
container-name: pygeoapi-cite-pygeoapi-1
timeout: 120

- name: test {{ matrix.test-suite.suite-id }} compliance
uses: OSGeo/cite-runner@v0.2.0
with:
test_suite_identifier: ${{ matrix.test-suite.suite-id }}
test_session_arguments: ${{ matrix.test-suite.arguments }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ ENV/

# development setup examples
example-config.yml
example-openapi.yml
example-openapi.yml

# CITE openapi document (must be (re)generated before runing CITE tests)
tests/cite/cite.openapi.yml

# misc
*.swp
Expand Down
174 changes: 174 additions & 0 deletions tests/cite/cite.config.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
server:
bind:
host: 0.0.0.0
port: ${PYGEOAPI_PORT:-5001}
url: ${PYGEOAPI_PUBLIC_URL:-http://localhost:5001}
mimetype: application/json; charset=UTF-8
encoding: utf-8
language: en-US
cors: true
pretty_print: true
limit: 100
# templates: /path/to/templates
map:
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
manager:
name: TinyDB
connection: /tmp/pygeoapi-process-manager.db
output_dir: /tmp/

logging:
level: ERROR
#logfile: /tmp/pygeoapi.log

metadata:
identification:
title: pygeoapi CITE instance
description: pygeoapi instance in support of OGC CITE compliance
keywords:
- geospatial
- data
- api
keywords_type: theme
terms_of_service: https://creativecommons.org/licenses/by/4.0/
url: https://pygeoapi.io
license:
name: CC-BY 4.0 license
url: https://creativecommons.org/licenses/by/4.0/
provider:
name: pygeoapi
url: https://pygeoapi.io
contact:
name: Tom Kralidis
position: Senior Systems Scientist
address: Mailing Address
city: City
stateorprovince: Administrative Area
postalcode: Zip or Postal Code
country: Country
phone: +xx-xxx-xxx-xxxx
fax: +xx-xxx-xxx-xxxx
email: pygeoapi@lists.osgeo.org
url: https://pygeoapi.io/community/
hours: Mo-Fr 08:00-17:00
instructions: During hours of service. Off on weekends.
role: pointOfContact

resources:
icoads-sst:
type: collection
title: International Comprehensive Ocean-Atmosphere Data Set (ICOADS)
description: International Comprehensive Ocean-Atmosphere Data Set (ICOADS)
keywords:
- icoads
- sst
- air temperature
extents:
spatial:
bbox: [ -180,-90,180,90 ]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: 2000-01-16T06:00:00Z
end: 2000-12-16T01:20:06Z
links:
- type: text/html
rel: canonical
title: information
href: https://psl.noaa.gov/data/gridded/data.coads.1deg.html
hreflang: en-US
providers:
- type: edr
name: xarray-edr
data: ${PYGEOAPI_DATA_ROOT}/coads_sst.nc
format:
name: NetCDF
mimetype: application/x-netcdf


canada-hydat-daily-mean-02hc003:
type: collection
title: Daily Mean of Water Level or Flow
description: The daily mean is the average of all unit values for a given day.
keywords: [ Daily, Daily Mean, Water Level, Flow, Discharge ]
crs:
- CRS84
links:
- type: text/html
rel: canonical
title: Water Level and Flow - Environment Canada
href: https://wateroffice.ec.gc.ca
hreflang: en-CA
- type: text/html
rel: canonical
title: Niveau d'eau et débit - Environnement Canada
href: https://wateroffice.ec.gc.ca/index_f.html
hreflang: fr-CA
- type: text/html
rel: download
title: "National water data archive: HYDAT - Canada.ca"
href: https://www.canada.ca/en/environment-climate-change/services/water-overview/quantity/monitoring/survey/data-products-services/national-archive-hydat.html
hreflang: en-CA
- type: text/html
rel: download
title: "Archives nationales des données hydrologiques : HYDAT - Canada.ca"
href: https://www.canada.ca/fr/environnement-changement-climatique/services/eau-apercu/volume/surveillance/releves/produits-donnees-services/archives-nationales-hydat.html
hreflang: fr-CA
- type: application/zip
rel: download
title: download data
href: https://collaboration.cmc.ec.gc.ca/cmc/hydrometrics/www
hreflang: en-CA
extents:
spatial:
bbox: [ -142, 52, -52, 84 ]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: 1850-01-01T00:00:00Z
end: null # or empty

providers:
- type: feature
name: TinyDB
data: ${PYGEOAPI_DATA_ROOT}/canada-hydat-daily-mean-02HC003.tinydb
id_field: IDENTIFIER
time_field: DATE

lakes:
type: collection
title: Large Lakes
description: lakes of the world, public domain
keywords:
- lakes
crs:
- CRS84
links:
- type: text/html
rel: canonical
title: information
href: http://www.naturalearthdata.com/
hreflang: en-US
extents:
spatial:
bbox: [ -180,-90,180,90 ]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: 2011-11-11T00:00:00Z
end: null # or empty
providers:
- type: tile
name: MVT-tippecanoe
data: ${PYGEOAPI_DATA_ROOT}/tiles/ne_110m_lakes
options:
bounds: [ [ -124.953634,-16.536406 ],[ 109.929807,66.969298 ] ]
zoom:
min: 0
max: 5
format:
name: pbf
mimetype: application/vnd.mapbox-vector-tile

hello-world:
type: process
processor:
name: HelloWorld
Loading
Loading