mrbotcr / py3ClimMob

ClimMob is software for agricultural citizen science
https://climmob.net/
GNU Affero General Public License v3.0
5 stars 2 forks source link
citizen-science

CircleCI Black

ClimMob

ClimMob is software for agricultural citizen science with the following features:

For more information visit https://climmob.net

The tricot approach

ClimMob supports a novel approach to citizen science: the tricot approach. Tricot approach simplifies the experimental process.

Digital Researchers and citizen scientists collaborate digitally using ClimMob. Digital communication saves time and money.
Robust From a pool of technology options, ClimMob randomly assigns each participant a combination of three options to test. This way, each option is tested many times.
Representative Participants test technology options under real use conditions, such as their own field or kitchen.
Simple Participants mainly use ranking (ordering from best to worst) to report their results.
Insightful ClimMob lets you joins all the data and applies sophisticated statistical analytics at the touch of a button.
Fast Participants and researchers immediately get the information back and can start to discuss the results!
Scientific The tricot approach has been tested scientifically across many research projects.

Tricot stands for ‘triadic comparison of technology options’. The approach derives it name from the fact that citizen scientists compare multiple technology options in sub-sets of just three, in ‘triads’.

Click here for more information about the tricot approach.

The software

ClimMob is a Web-based App created using Python, MySQL, R, and several other third-party tools. The best way to have a ClimMob server is by using Docker. See below.

ScreenShot

image

Releases

The current stable release is 3.9.0 and it is available here

The database signature for stable 3.9.0 is 23d2f8154412

The Docker image for stable 3.9.0 is 20230720

Installation

ClimMob comes as as Docker container. The below is a common recipe for running ClimMob using docker:

# From a fresh installation of Ubuntu 18.04.03 from https://ubuntu.com/download/server
# Update the repositories and packages
sudo add-apt-repository multiverse
sudo apt-get update
sudo apt-get -y upgrade

# Install docker-compose
sudo apt-get install -y docker-compose

# Get the Docker Compose file
cd /opt
sudo mkdir climmob_docker_compose_20230720
cd climmob_docker_compose_20230720
sudo wget https://raw.githubusercontent.com/BioversityCostaRica/py3ClimMob/stable-3.9.0/docker_compose/docker-compose.yml

# Make the directory structure for ClimMob
sudo mkdir /opt/climmob
whoami=$(whoami)
sudo chown $whoami /opt/climmob
mkdir /opt/climmob/celery
mkdir /opt/climmob/log
mkdir /opt/climmob/repository
mkdir /opt/climmob/config
mkdir /opt/climmob/mysql
mkdir /opt/climmob/plugins
sudo chmod -R g+w /opt/climmob

# Download all the required Docker Images
cd /opt/climmob_docker_compose_20230720
sudo docker-compose pull

# Edit the docker-compose.yml file to set the MySQL root password
sudo nano /opt/climmob_docker_compose_20230720/docker-compose.yml
# Press Alt+Shit+3 to show the line numbers in Nano

Edit line 7: Change the root password from "my_secure_password" to your password
Edit line 19: Change the root password from "my_secure_password" to the same password of line 7
Edit line 22: Change the IP address for the IP address of the machine running the Docker service

# Save the file with Ctlr+o Enter . Exit with Ctrl+x

# In AWS if you use MySQL >= 8 in a RDS service you need to add the following permissions to your RDS root user:
# GRANT SESSION_VARIABLES_ADMIN ON *.* TO 'my_RDS_root_user'@'%';
# GRANT SYSTEM_VARIABLES_ADMIN ON *.* TO 'my_RDS_root_user'@'%';

# Install Apache Server
sudo apt-get install -y apache2

# Enable proxy for Apache
sudo ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/
sudo ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/
sudo ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/

# Edit the apache configuration to proxy pass ClimMob 
sudo nano /etc/apache2/sites-enabled/000-default.conf
# Add the following lines after line 28
        ProxyRequests Off
        ProxyPreserveHost On

        ProxyPass           /climmob    http://127.0.0.1:5900/climmob
        ProxyPassReverse    /climmob    http://127.0.0.1:5900/climmob

        <Proxy *>
           allow from all
        </Proxy>
        ProxyTimeout 120

# Save the file with Ctlr+o Enter . Exit with Ctrl+x
# Stop the Apache server
sudo service apache2 stop
# Start the Apache server
sudo service apache2 start

# Start the ClimMob containers. The first time you start the container ClimMob will construct the database and apply all updates. This will take about 5 minutes.
# Subsequent start will take about 2 minutes. You can check the status with "sudo docker stats". 
# ClimMob will be ready for usage when the container reaches more than 700 kB of MEM USAGE
# This is the only two commands you need to start ClimMob after a server restart
cd /opt/climmob_docker_compose_20230720
sudo docker-compose up -d

# Browse to ClimMob
http://[this server IP address]/climmob

Documentation

Documentation and other resources about ClimMob are available at the ClimMob Documentation Site.

ClimMob's REST API

Documentation about ClimMob's API is available here.

Customization and extension

ClimMob uses PyUtilib Component Architecture to allow customization and extension. The best way to do it is by using the ClimMob Plugin CookieCutter and explore the different Interfaces.

What can you do through extension plug-ins? Some ideas:

You basically can extend ClimMob to fit your needs.

Some examples of plug-ins are:

Localization

ClimMob comes out of the box in English and Spanish. It uses Babel for translation and you can help us by creating new translations or by correcting an existing one.

To generate a new translation:

$ cd climmob
$ python setup.py init_catalog -l [new_language_ISO_639-1_code]
$ python setup.py extract_messages
$ python setup.py update_catalog

The translation files (.po) are available at climmob/locale/[language-code]/LC_MESSAGES. You can edit a .po file with tools like PoEdit, Lokalize, GTranslator, or a simple text editor. Once the translation is done you can send us the updated or new .po file as an issue and we will add it to ClimMob.

Partners

The development of ClimMob and the scientific research behind the tricot approach has been possible thanks to investments by the following partners:

License and copyrights

ClimMob is Copyright 2023, MrBot Software Solutions. The software is released in the terms of GNU Affero General Public License v3.0. The plug-in architecture of ClimMob is based on PyUtilib Component Architecture (PCA) which is licensed under BSD, therefore the code that loads and connects plug-ins is licensed under BSD.