Code Monkey home page Code Monkey logo

betydb-yaba's Introduction

License Build Status

BETYdb-YABA

Yet Another BETYdb API (for metadata upload)

Gsoc Report : Project Summary

Setup BETYdb

Following commands can be used to initialize the database to be used with YABA development.

docker-compose up -d postgres
docker-compose run --rm bety initialize
docker-compose run --rm bety sync

Running the App

Bring up container for YABA-API

docker-compose up -d yaba_api

Running the App (without initialization and synchronization of bety)

Bring up the containers at once

Once initialization and synchronization of bety database is done,the below command can be directly used to start the app.(Skip the "Setup BETYdb" step)

# Bring up full stack
docker-compose up

How to hit the YABA API endpoints

Following endpoints can be used to upload Metadata to respective tables in bety.

Experiments: (to experiments table):

curl -F "fileName=@input_files/experiments.csv"   \
     http://localhost:5001/yaba/v1/experiments?username=guestuser

Sites: (to sites table)

curl -F "fileName=@input_files/sites.csv"   \
     -F "shp_file=@input_files/S8_two_row_polys.shp"  \
     -F "dbf_file=@input_files/S8_two_row_polys.dbf"  \
     -F "prj_file=@input_files/S8_two_row_polys.prj"  \
     -F "shx_file=@input_files/S8_two_row_polys.shx"  \
     http://localhost:5001/yaba/v1/sites

Treatments: (to treatments table)

curl -F "fileName=@input_files/treatments.csv"   \
     http://localhost:5001/yaba/v1/treatments?username=guestuser

Cultivars: (to cultivars table)

curl -F "fileName=@input_files/cultivars.csv"   \
     http://localhost:5001/yaba/v1/cultivars

Citations: (to citations table)

curl -F "fileName=@input_files/citations.csv"   \
     http://localhost:5001/yaba/v1/citations?username=guestuser

Experiments_sites: (to experiments_sites table)

curl -F "fileName=@input_files/experiments_sites.csv"   \
     http://localhost:5001/yaba/v1/experiments_sites

Experiments_treatments: (to experiments_treatments table)

curl -F "fileName=@input_files/experiments_treatments.csv"   \
     http://localhost:5001/yaba/v1/experiments_treatments

Sites_cultivars: (to sites_cultivars table)

curl -F "fileName=@input_files/sites_cultivars.csv"   \
     http://localhost:5001/yaba/v1/sites_cultivars

Citations_sites: (to citations_sites table)

curl -F "fileName=@input_files/citations_sites.csv"   \
     http://localhost:5001/yaba/v1/citations_sites

How to hit the Client Endpoints

Following endpoints can be used to upload Metadata to respective tables in bety.

Experiments: (to experiments table):

curl -F "fileName=@input_files/experiments.csv"   \
     http://localhost:6001/experiments?username=guestuser

Sites: (to sites table)

curl -F "fileName=@input_files/sites.csv"   \
     -F "shp_file=@input_files/S8_two_row_polys.shp"  \
     -F "dbf_file=@input_files/S8_two_row_polys.dbf"  \
     -F "prj_file=@input_files/S8_two_row_polys.prj"  \
     -F "shx_file=@input_files/S8_two_row_polys.shx"  \
     http://localhost:6001/sites

Treatments: (to treatments table)

curl -F "fileName=@input_files/treatments.csv"   \
     http://localhost:6001/treatments?username=guestuser

Cultivars: (to cultivars table)

curl -F "fileName=@input_files/cultivars.csv"   \
     http://localhost:6001/cultivars

Citations: (to citations table)

curl -F "fileName=@input_files/citations.csv"   \
     http://localhost:6001/citations?username=guestuser

Experiments_sites: (to experiments_sites table)

curl -F "fileName=@input_files/experiments_sites.csv"   \
     http://localhost:6001/experiments_sites

Experiments_treatments: (to experiments_treatments table)

curl -F "fileName=@input_files/experiments_treatments.csv"   \
     http://localhost:6001/experiments_treatments

Sites_cultivars: (to sites_cultivars table)

curl -F "fileName=@input_files/sites_cultivars.csv"   \
     http://localhost:6001/sites_cultivars

Citations_sites: (to citations_sites table)

curl -F "fileName=@input_files/citations_sites.csv"   \
     http://localhost:6001/citations_sites

betydb-yaba's People

Contributors

saurabh1969 avatar dlebauer avatar kristinariemer avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.