• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    Python
  • License
    Other
  • Created about 11 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Collect, Analyze and Share

Ona Platform

Collect, Analyze and Share Data!

https://app.codacy.com/project/badge/Grade/68c96351c8b24d5c9062a9c8247142f2

About

Ona is derived from the excellent formhub platform developed by the Sustainable Engineering Lab at Columbia University.

Installation

See the installation documentation.

Docker

Install Docker and Docker Compose.

docker-compose up

# create super user
# -----------------
docker exec -it onadata_web_1 bash

# activate virtual envirenment
source /srv/.virtualenv/bin/activate

python manage.py createsuperuser

It should be accessible via http://localhost:8000. The settings are in onadata/settings/docker.py.

On registration check the console for the activation links, the default email backend is django.core.mail.backends.console.EmailBackend. See Django Docs for details.

Contributing

If you would like to contribute code please read Contributing Code to Ona Data.

Edit top level requirements in the file requirements/base.in. Use
pip-compile to update requirements/base.pip. You will need to update requirements.pip and set lxml==3.6.0, for some unknown reason pip-compile seems to pick a lower version of lxml when openpyxl requires lxml>=3.3.4.
pip-compile --output-file requirements/base.pip requirements/base.in

Copy pre-commit.sh into .git/hooks/pre-commit, it ensures staged python flake8 are in acceptable code style and conventions.

cp pre-commit.sh .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

Security Acknowledgments

We would like to thank the following security researchers for responsibly disclosing security issues:

Name Date Severity Contribution
Danish Tariq 1st April 2018 Medium Users able to create projects in other user accounts

Code Structure

  • api - This app provides the API functionality mostly made up of viewsets
  • logger - This app serves XForms to and receives submissions from ODK Collect and Enketo.
  • viewer - This app provides a csv and xls export of the data stored in logger. This app uses a data dictionary as produced by pyxform. It also provides a map and single survey view.
  • main - This app is the glue that brings logger and viewer together.

Localization

To generate a locale from scratch (ex. Spanish)

django-admin.py makemessages -l es -e py,html,email,txt ;
for app in {main,viewer} ; do cd onadata/apps/${app} && django-admin.py makemessages -d djangojs -l es && cd - ; done

To update PO files

django-admin.py makemessages -a ;
for app in {main,viewer} ; do cd onadata/apps/${app} && django-admin.py makemessages -d djangojs -a && cd - ; done

To compile MO files and update live translations

django-admin.py compilemessages ;
for app in {main,viewer} ; do cd onadata/apps/${app} && django-admin.py compilemessages && cd - ; done

Api Documentation

Generate the API documentation and serve via Django using:

cd docs
make html
python manage.py collectstatic

Generate sphinx docs for new code using autodoc.

Run sphinx in autobuild mode using:

sphinx-autobuild docs docs/_build/html

Requires sphinx-autobuild, install with pip install sphinx-autobuild.

Django Debug Toolbar

  • $ pip install django-debug-toolbar
  • Use/see onadata/settings/debug_toolbar_settings/py
  • Access api endpoint on the browser and use .debug as the format extension e.g /api/v1/projects.debug

Upgrading existing installation to django 1.9+

Requirements

  • Postgres 9.4 or higher
  • xcode-select version 2343 or higher

Upgrading from a pervious Ona setup Ensure you upgrade all your pip requirements using the following command:

pip install -r requirements/base.pip

Fake initial migration of guardian, django_digest, registration. Migrate contenttypes app first.

python manage.py migrate contenttypes
python manage.py migrate --fake-initial django_digest
python manage.py migrate --fake-initial guardian
python manage.py migrate --fake-initial registration
python manage.py migrate

Major django changes affecting Ona * The DATABASES settings key depricates the use of the autocommit setting in the OPTIONS dictionary.

More Repositories

1

kujaku

Mapping and check-in library for Android using MapBox SDK
Java
18
star
2

tally-ho

Election results data entry and verification software.
Python
17
star
3

fhir-web

A web based interface for administering FHIR based digital health solutions
TypeScript
17
star
4

ansible-gpg-import

Ansible role for importing GPG keypairs
15
star
5

hatti

It views data! Note: this library is not maintained
Clojure
13
star
6

ansible-superset

Ansible Superset Role
HTML
13
star
7

js-tools

Ona shared JavaScript components and utilities
TypeScript
11
star
8

meow

Emacs Lisp
10
star
9

milia

Ona API client library in Clojure and ClojureScript
Clojure
10
star
10

gisida

JavaScript library that converts MapSpec layers to beautiful, interactive maps using Mapbox GL
JavaScript
10
star
11

reveal-frontend

WebUI for the Reveal epidemiological surveillance platform
TypeScript
8
star
12

ansible-nifi

Ansible NiFi Role
Shell
7
star
13

vega-viewer

A collection of Om components for rendering Vega specifications
Clojure
6
star
14

ansible-druid

Ansible Druid Role
6
star
15

kaznet-frontend

The frontend for the Kaznet market price tracking app
JavaScript
6
star
16

superset-patchup

Superset-patchup is a python package that "patches" Superset to add custom functionality that we find to be useful
Python
6
star
17

community-health-task-investigator

Outlier Detection Algorithm
Python
5
star
18

helm-chart-superset

Superset chart for helm
Shell
5
star
19

ansible-django

Use this role to install, configure, and manage Django
Jinja
5
star
20

tasking

Django tasking app
Python
5
star
21

onapie

Ona Python API
Python
5
star
22

kaznet-web

a tasking application built on top of Onadata
Python
5
star
23

docker-builds

Dockerfile
4
star
24

ansible-react

Install and configure React apps
Python
4
star
25

ansible-enketo

Ansible Enketo Role
Jinja
3
star
26

mspray

Mspray
Python
3
star
27

ona-tech

Ona Tech related documentation and discussions
3
star
28

ansible-rapidpro

Ansible RapidPro Role
Jinja
3
star
29

ansible-nginx

Ansible NGINX Manager Role
Jinja
3
star
30

duva

API Application that provides the ability to export XLSForm Data from an Onadata server or CSV File to a Hyper file database
Python
3
star
31

ansible-sqitch-migrations

Very simple role to run Database migrations
HTML
3
star
32

ansible-kafka

Ansible Kafka Role
3
star
33

chimera

Common Utilities when working in Clojure
Clojure
3
star
34

floip-canopy

FLOIP Results Ingestion with Nifi and Superset
Python
3
star
35

zebra-lite

A lite Zebra (i.e. a baby Zebra)
CSS
3
star
36

gisida-react

React Dashboard library for Gisida.
JavaScript
2
star
37

help

The Ona Help Site
HTML
2
star
38

ona-oidc

A pluggable django application that adds OpenID connect client functionality.
Python
2
star
39

helm-chart-enketo

enketo helm chart
Smarty
2
star
40

ansible-nvm

Ansible Node Version Manager Role
2
star
41

steps-app

WHO STEPS App
Java
2
star
42

ansible-onadata

Ansible role for deploying Ona Data
Jinja
2
star
43

ansible-rapidpro-indexer

Ansible RapidPro Indexer
Python
2
star
44

ansible-collection-kubespray

Shell
2
star
45

ansible-server-monitoring

Ansible role for setting up server monitoring
2
star
46

py-enketo

Python bindings for the Enketo API
Python
2
star
47

ansible-git-clone

Ansible role for cloning git repositories
Python
2
star
48

kenya-fsp

FSP Map of ATMs, Banks and Post Offices in Kenya
2
star
49

python-json2xlsclient

Python JSON-2-XLS Client
Python
2
star
50

fhir-tooling

A command line utility to support FHIR Core content authoring
Java
2
star
51

sqitch-migrations-template

ProjectName Data Migrations
PLpgSQL
1
star
52

who-adolescent-hqa

WHO Adolescent Health Quality Assessment
JavaScript
1
star
53

ansible-linux-config

Ansible Linux Configuration Role
1
star
54

rdt-standard

RDT Open Guidelines Application
Java
1
star
55

f2dhis2

Python
1
star
56

wb-composting

World Bank Uganda Composting
JavaScript
1
star
57

android-p2p

Wifi Direct P2P Research and Implementation for FHIR Core
Kotlin
1
star
58

ansible-collection-rapidpro

RapidPro Ansible Collection
1
star
59

ansible-kpi

Ansible role for KPI Formbuilder
Jinja
1
star
60

c2-histograms

Clojure
1
star
61

zim-data

Zimbabwe Data
1
star
62

ansible-tranquility

Ansible Tranqulity Role
1
star
63

covid-hit

1
star
64

ansible-mailroom

Ansible Mailroom Role
Python
1
star
65

rapidpro2ona

Python
1
star
66

dhis2

dhis2 mirror - 2.13, rev 12930
Java
1
star
67

Down-For-Maintenance

Down for maintenance page
HTML
1
star
68

ona-design

A Bootstrap theme for Ona products.
CSS
1
star
69

ansible-monit

Ansible Monit Role
Jinja
1
star
70

ansible-ssh

Ansible role for configuring SSH
Jinja
1
star
71

mregistry.org

mRegistry.org Website
CSS
1
star
72

nifi-docker

1
star
73

ansible-chubbs

Installs and configures Chubbs (PGRestAPI)
Jinja
1
star
74

ansible-certbot

Ansible role for setting up Lets Encrypt Certificates
Jinja
1
star
75

ansible-redis

Ansible Role to install redis and configure backup
1
star
76

ona-devtrac

Ona Devtrac Integration
Python
1
star
77

canopy-treeaid

repository to manage the TreeAid consulting engagements
1
star
78

ansible-kafka-stack

Shell
1
star
79

ansible-kafka-manager

Ansible Kafka Manager Role
1
star
80

ansible-sqitch

Ansible role that install sqitch
Python
1
star
81

molecule-action

Github action to test Ansible roles with Molecule
Dockerfile
1
star
82

terraform-aws-asg-compute

Terraform module for defining the compute infrastructure for an Auto Scaling Group deployment. Meant to be used with https://github.com/onaio/terraform-aws-asg-base
HCL
1
star
83

wkcdd

World Bank Western Kenya CDD and Flood Mitigation Project
JavaScript
1
star
84

ansible-kannel

Ansible role to install and configure Kannel
Shell
1
star
85

hki-vas-dashboard

HKI VAS Dashboard
JavaScript
1
star
86

ansible-express

Ansible role for deploying express
Python
1
star
87

ansible-hostname

Ansible role for setting a server's hostname
1
star
88

casepro-docker

Dockerfile
1
star
89

collect-simprints-proxy

Android app that can be used with ODK Collect (as an external-app) to communicate with the SimPrints app
Java
1
star
90

django-allauth-onadata

django-allauth provider for Onadata
Python
1
star
91

fhir-web-e2e-docker

container setup for all services needed to run a fhir-web instance locally
Smarty
1
star