You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal of this issue is to implement data validation for shapefiles, spreadsheets before API data ingestion by modifying existing API routes functionality.
Like, the code in this function responds to /yaba/v1/experiments (for inserting experiments in the BETY database), we can modify this, by accepting one more parameter as status(which can be true or false), if false then return a valid response after validating data otherwise continue with data insertion. In this example, we can check the status after line 64, if true we can return a response from there only and stop further execution otherwise continue with data insertion.
if(all(x in accepted_columns for x in columns)): >> if(status == false) >>>> msg = {'Message' : true } >>>> return make_response(jsonify(msg), 200)
It will be a Boolean. A false value indicates that data should be only validated and a response should be returned accordingly, while a true value tells us that data should also be inserted.
The goal of this issue is to implement data validation for shapefiles, spreadsheets before API data ingestion by modifying existing API routes functionality.
BETYdb-YABA/app/Meta.py
Lines 52 to 72 in 64b540e
Like, the code in this function responds to /yaba/v1/experiments (for inserting experiments in the BETY database), we can modify this, by accepting one more parameter as status(which can be true or false), if false then return a valid response after validating data otherwise continue with data insertion. In this example, we can check the status after line 64, if true we can return a response from there only and stop further execution otherwise continue with data insertion.
if(all(x in accepted_columns for x in columns)):
>> if(status == false)
>>>> msg = {'Message' : true }
>>>> return make_response(jsonify(msg), 200)
So, what do you say?
@dlebauer @KristinaRiemer @saurabh1969 @Chris-Schnaufer
The text was updated successfully, but these errors were encountered: