Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onaio/onadata
Collect, Analyze and Share
https://github.com/onaio/onadata
Last synced: 3 days ago
JSON representation
Collect, Analyze and Share
- Host: GitHub
- URL: https://github.com/onaio/onadata
- Owner: onaio
- License: other
- Created: 2013-09-17T07:25:01.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:26:41.000Z (3 months ago)
- Last Synced: 2024-10-29T11:40:58.519Z (3 months ago)
- Language: Python
- Homepage: https://ona.io
- Size: 37.9 MB
- Stars: 183
- Watchers: 54
- Forks: 133
- Open Issues: 164
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- Contributing: CONTRIBUTING.MD
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - onaio/onadata - Collect, Analyze and Share (others)
README
Ona Platform
============Collect, Analyze and Share Data!
.. image:: https://github.com/onaio/onadata/actions/workflows/ci.yml/badge.svg
:target: https://github.com/onaio/onadata/actions/workflows/ci.yml.. image:: https://app.codacy.com/project/badge/Grade/68c96351c8b24d5c9062a9c8247142f2
:target: https://www.codacy.com/gh/onaio/onadata/dashboard?utm_source=github.com&utm_medium=referral&utm_content=onaio/onadata&utm_campaign=Badge_Grade.. image:: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
:target: https://opensource.org/licenses/BSD-3-ClauseAbout
-----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 `_.
.. code-block:: sh
docker-compose up
# create super user
# -----------------
docker exec -it onadata_web_1 bash# activate virtual envirenment
source /srv/.virtualenv/bin/activatepython 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`... code-block:: sh
pip-compile --output-file requirements/base.pip requirements/base.in
Install the pre-commit hooks by running:
.. code-block:: sh
pre-commit install
**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)
.. code-block:: sh
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 - ; doneTo update PO files
.. code-block:: sh
django-admin.py makemessages -a ;
for app in {main,viewer} ; do cd onadata/apps/${app} && django-admin.py makemessages -d djangojs -a && cd - ; doneTo compile MO files and update live translations
.. code-block:: sh
django-admin.py compilemessages ;
for app in {main,viewer} ; do cd onadata/apps/${app} && django-admin.py compilemessages && cd - ; doneApi Documentation
-----------------Generate the API documentation and serve via Django using:
.. code-block:: sh
cd docs
make html
python manage.py collectstaticGenerate sphinx docs for new code using
`autodoc `_.Run sphinx in autobuild mode using:
.. code-block:: sh
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:.. code-block:: sh
pip install -r requirements/base.pip
Fake initial migration of `guardian`, `django_digest`, `registration`. Migrate `contenttypes` app first.
.. code-block:: sh
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.