Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
craig-willis committed Aug 14, 2018
1 parent 2559b43 commit 8940771
Showing 1 changed file with 14 additions and 31 deletions.
45 changes: 14 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,32 @@
# Swagger generated server
# TERRA-REF Breeder's API

## Overview
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the
[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This
is an example of building a swagger-enabled Flask server.
This repository contains preliminary work torward a BRAPI implementation
for TERRA-REF.

This example uses the [Connexion](https://github.com/zalando/connexion) library on top of Flask.

The server code was generated using [swagger-codegen](https://github.com/swagger-api/swagger-codegen).

## Requirements
Python 3.5.2+

## Usage
To run the server, please execute the following from the root directory:
To run, first start an intance of the BETY database:

```
pip3 install -r requirements.txt
python3 -m bety_brapi
docker run -n betydb -d -p 5432:5432 terraref/bety-postgis
```

and open your browser to here:

Install the python requirements and start the Flask server:
```
http://localhost:8080/brapi/v1/ui/
pip3 install -r requirements.txt
./run.sh
```

Your Swagger definition lives here:

```
http://localhost:8080/brapi/v1/swagger.json
```
then open your browser to here:

To launch the integration tests, use tox:
```
sudo pip install tox
tox
http://localhost:8080/brapi/v1/ui/
```

## Running with Docker

To run the server on a Docker container, please execute the following from the root directory:

```bash
# building the image
docker build -t bety_brapi .

# starting up a container
docker run -p 8080:8080 bety_brapi
```
The only call implemented is the `GET phenotypes-search` with a very very
preliminary mapping of BETY fields to BRAPI objects.

0 comments on commit 8940771

Please sign in to comment.