opencdms-dev / legacy-opencdms-api

⭐🐍 OpenCDMS server application written in Python (FastAPI) and exposing a web interface for `opencdms-app` and other applications
MIT License
3 stars 3 forks source link

Climsoft station api #9

Closed faysal-ishtiaq closed 2 years ago

faysal-ishtiaq commented 2 years ago

CRUD with tests for station table in climsoft

faysal-ishtiaq commented 2 years ago

@isedwards

I have added CRUD with tests for observationinitial and observationfinal. observationinitial CRUD works fine. But observationfinal CRUD is throwing error and there is a lock in database. However, most of the CRUD endpoints worked when executed from Swagger Docs. I am attaching the screenshot numbering endpoints indicating order of execution. screenshot-localhost_5000-2021 11 17-03_29_50

isedwards commented 2 years ago

@faysal-ishtiaq - could you test the Climsoft API with data from the Climsoft test database? There are two CREATE DATABASE statements in the Climsoft SQL code in the test repository, the second has test data.

faysal-ishtiaq commented 2 years ago

@isedwards I have added some snapshot tests for climsoft. Only station, obselement and observationfinal tables had data and I only wrote some trivial tests such as test_should_return_5_elements, test_should_return_single_element. Should I add more tests? Here is the latest PR. ( See last 4 commits ) https://github.com/opencdms/opencdms-server/pull/11