Git Product home page Git Product logo

biomodelos-website's Introduction

BioModelos v2.11.0

BioModelos is a web app that facilitates the generation, validation and consultation of hypothesis of species distribution for the continental biodiversity of Colombia. As such, it provides tools to (1) improve existing species distribution models (SDMs) by integrating expert's opinion, (2) generate expert maps and (3) publish SDMs. Our objective is to provide freely and openly access to the most up to date information on species distributions, validated by a large network of researchers, to support national environmental decision making processes and research.

Requirements

Services

Deploy these services before setting up the app:

  • MongoDB Database Service
  • BioModelos API Service GitHub Repo
  • SQL Database Service

Software

  • Ruby version 2.5. It is advisable to use rbenv to install and manage ruby local version.
  • Docker version 17.05 or up.
  • Git
  • Bower

Setup

Download the source code

Clone the repo to the server where you are deploying the app:

$ git clone git://github.com/LBAB-Humboldt/BioModelos.v2.git

Web app database

To build the database according to the schema file using the SQL Service, you should follow the next steps:

  1. Create a database.yml file with the configuration of your SQL Service and add it to the /config/ path. Use database_template.yml as a template which is located at /config/ folder
  2. Once you have the Docker container running, you may execute the migrations (/db/migrate/) following this guide.

Configuration

Some files and paths in BioModelos need to be configured in order for the app to work as intended.

Files

  • Models folder with raster files.
  • Thumbnails folder with thumbnails image files.
  • Zip folder with zip files of the models.

Connection to other BioModelos services

You need to setup a path to the BioModelos API service URL and geoserver URL. Create a new file url.rb under the /config/initializers/ folder and setup the next env vars:

BASE_URI = "http://localhost:3000/v2";
GEOSERVER_URI = "http://localhost:8080/geoserver";

Keys and credentials

The app needs the following keys which you can set up in a local_env.yml file under the config folder like this:

SECRET_KEY_BASE: [secret key base]

\# Google Maps API
GOOGLE_MAPS_KEY: [key]

\# Google reCaptcha
RECAPTCHA_SITE_KEY_V2: [site key]
RECAPTCHA_SECRET_KEY_V2: [site key]
RECAPTCHA_SITE_KEY_V3: [site key]
RECAPTCHA_SECRET_KEY_V3: [site key]

\# Mail Server Gmail
GMAIL_USERNAME: [username]
GMAIL_PASSWORD: [password]

There, you should put information about:

  • Rails Application key.
  • Google maps key.
  • Recaptcha keys (Version 2 and 3).
  • SMTP credentials.

Run

Install dependencies

gem install bundler

bundle install

bower install --allow-root

Run the following command to execute the app in your local env

bundle exec rails s -b 0.0.0.0

Dev env with docker

You can create a docker container for development purposes, just build the image with the dev file:

$ docker build -f Dockerfile.dev -t <image name> .

And remember to mount the volumes (or link them) in your source code path

Deploy

Copying static files

First, there are some static .PDF, .PNG and .ZIP files you need to copy to the /public/ folder. Those files are part of the guides and graphic pieces to advertise BioModelos and are not part of our repo.

Building the image

On the root path of the rails app you enter this command to build the image:

$ docker build -t <image name>:<tag> .

Starting the container

Once you have the image, it's recommended to use docker-compose to run the container.

You need to create a docker-compose.yml file and set the volumes according to the models, thumbnails, zip and uploads folders like this:

version: '3'
services:
  biomodelos:
    image: [image name]
    ports:
     - [host port]:[container port]"
    volumes:
     - /path/to/host/methods:/var/www/BioModelos/public/methods
     - /path/to/host/models:/var/www/BioModelos/public/models
     - /path/to/host/thumbs:/var/www/BioModelos/public/thumbs
     - /path/to/host/zip:/var/www/BioModelos/public/zip
     - /path/to/host/uploads:/var/www/BioModelos/public/uploads

Finally, you run the container with the next command:

$ docker-compose up -d

LICENSE

The MIT License (MIT) 2018 - Instituto de Investigación de Recursos Biológicos Alexander von Humboldt. Please have a look at the LICENSE.md file for more details.

biomodelos-website's People

Contributors

alegnaaived avatar angrypixels avatar cazapatamar avatar danflop avatar erikasv avatar manuelstardust avatar valegrajales avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ecopervious

biomodelos-website's Issues

migratoryType -> SPE3

Using the new field in records.species DB, is mandatory to update the webService to use that field.

Migrar base de datos a nueva versión

  1. Generar backup de la base de datos.
  2. Generar duplicado en producción.
  3. Correr scripts de actualización para cada colección.
  4. Ejecutar los mongoSchema.
  5. Generar el mongoDataValidationSchema.
  6. Actualizar las consultas de acuerdo a los servicios web expuestos.

Code review of SPE3

The SPE3 webService is a continuous concatenation of ifs. Maybe will be a better way to code all the bodyQuery + params?
How can be used the webService without parameters, just bodyQuery (endangered, endemic, invasive and migratory) to "filter" the species shown?

Permitir a usuario ver actividades del grupo

Como usuario de biomodelos quiero poder visualizar las actividades de curación, edición, variables ecológicas, aprobación de modelos y vinculación de usuarios en el feed de actividad del grupo

La página no carga de forma responsiva

La página no carga de forma responsiva cuando se prueba en diferentes tamaños de pantalla de dispositivos móviles utilizando las herramientas de desarrollador de Google Chrome. Sin embargo, funciona correctamente al cambiar el tamaño de la pantalla manualmente.

Habilitar calificación de hipótesis por estrellas

Como miembro de un grupo quiero poder calificar los modelos de distribución de especies pendientes de validación de las especies de mi grupo usando un sistema de estrellas para calificar su utilidad.

Ajustar salidas de datos en sección información de la especie

Ajustar los datos de salida que se presentan en la sección información de la especie:

  • Ajustar número de decimales a extensión de ocurrencia a 0.
  • Ajustar número de decimales a representatividad de áreas protegidas a 1 y eliminar multiplicación x 100.
  • Agregar título en eje Y del gráfico de pérdida de bosque, agregar cifra para año 2005 y crear línea para escenario adicional a 2030, y modificar leyenda.
  • Mapear nombre de coberturas de la base de datos a los nombres reales.
  • No mostrar coberturas con valor de 0.
  • Mostrar coberturas en orden decreciente de area

Profundizar en desarrollos de BD

Como desarrollador de BioModelos quiero conocer y usar la API de la base de datos Mongo de BioModelos para contribuir a futuros desarrollos

Estudio de base de datos MongoDB

Como desarrollador de BioModelos quiero conocer el estado actual de la base de datos mongo de Biomodelos para contribuir a futuros desarrollos

Sugerir especie en grupo

Como experto quiero poder sugerir una especie a ser incluida en el grupo para hacer aportes a su distribución.

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.