-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit baa6e54
Showing
9 changed files
with
453 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[bandit] | ||
skips = B101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
venv | ||
.hypothesis | ||
.vscode | ||
__pycache__ | ||
venv | ||
logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# This file can only be used internally at Met.no. | ||
|
||
# build: | ||
# docker buildx build -t sedr -f Dockerfile . | ||
|
||
# run: | ||
# docker run -it --rm sedr --openapi https://edrisobaric.k8s.met.no/api --url https://edrisobaric.k8s.met.no | ||
|
||
FROM ubuntu:24.04 | ||
|
||
# Create user with home dir | ||
RUN useradd --create-home sedr | ||
|
||
# Install python and libeccodes-dev. Create /data. | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends python3-dev python3-pip \ | ||
python3-venv && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Set workdir and install app with requirements. | ||
WORKDIR /app | ||
COPY 07-edr-spesifics.py requirements.txt pytest.ini ./ | ||
RUN python3 -m venv ./venv && \ | ||
./venv/bin/pip install -r /app/requirements.txt | ||
|
||
# Run as nonroot user | ||
USER sedr | ||
|
||
ENTRYPOINT ["/app/venv/bin/python", "sedr.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# SEDR - An OGC EDR validator | ||
|
||
An experiment to validate OGC EDR APIs using schemathesis. | ||
|
||
## Who is responsible? | ||
|
||
Team Punkt at met.no | ||
|
||
## Status | ||
|
||
Experiment | ||
|
||
## Getting started | ||
|
||
### Test it out | ||
|
||
Run docker image: `docker run -it --rm github.com/metno/sedr --openapi https://edrisobaric.k8s.met.no/api --url https://edrisobaric.k8s.met.no` | ||
|
||
### Results testing existing services | ||
|
||
- [edrisobaric](https://edrisobaric.k8s.met.no) works | ||
- ...................... | ||
- [FMI](https://opendata.fmi.fi/edr/) some tests works, some fails | ||
- .F...FF.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.FFF......FF.........................................F...............F................................................ | ||
- [UK metoffice](https://labs.metoffice.gov.uk/edr) | ||
- fails due to /{service_id}/collections, /{service_id}/conformance? | ||
|
||
### Use it for production | ||
|
||
## Overview of architecture | ||
|
||
## Documentation | ||
|
||
## How to contribute | ||
|
||
## Documentation Template | ||
|
||
This document is based on the [Met-norway-readme](https://gitlab.met.no/maler/met-norway-readme)-template. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[pytest] | ||
filterwarnings = | ||
ignore::DeprecationWarning | ||
ignore::pytest.PytestAssertRewriteWarning | ||
addopts = -rP | ||
; log_cli = true | ||
; log_cli_level = WARNING | ||
log_file = ./logs/pytest.log | ||
log_file_level = WARNING | ||
testpaths = | ||
07-edr-spesifics.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tox | ||
black | ||
prospector | ||
bandit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
schemathesis~=3.34 | ||
pytest~=8.3 | ||
shapely~=2.0 | ||
requests |
Oops, something went wrong.