Skip to content

Commit

Permalink
Push to github
Browse files Browse the repository at this point in the history
  • Loading branch information
ways committed Sep 11, 2024
0 parents commit baa6e54
Show file tree
Hide file tree
Showing 9 changed files with 453 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .bandit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bandit]
skips = B101
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
venv
.hypothesis
.vscode
__pycache__
venv
logs
31 changes: 31 additions & 0 deletions Dockerfile
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"]
38 changes: 38 additions & 0 deletions README.md
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.
11 changes: 11 additions & 0 deletions pytest.ini
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
4 changes: 4 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tox
black
prospector
bandit
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
schemathesis~=3.34
pytest~=8.3
shapely~=2.0
requests
Loading

0 comments on commit baa6e54

Please sign in to comment.