Skip to content

kpi is the server for KoboToolbox. It includes an API for users to access data and manage their forms, question library, sharing settings, create reports, and export data.

License

Notifications You must be signed in to change notification settings

kobotoolbox/kpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bb8b161 · Sep 30, 2024
Sep 30, 2024
Jun 30, 2023
Mar 7, 2023
May 29, 2024
Sep 9, 2024
Jul 10, 2024
Aug 5, 2024
Sep 26, 2024
Sep 13, 2024
Sep 12, 2024
May 30, 2022
Jul 16, 2024
Aug 23, 2024
Mar 4, 2024
Jul 19, 2024
Jul 2, 2024
Jun 30, 2023
Mar 27, 2023
Aug 31, 2021
Mar 28, 2022
Jan 25, 2023
Feb 15, 2022
Sep 19, 2024
Sep 26, 2023
Aug 22, 2023
Oct 27, 2023
Dec 18, 2023
Apr 3, 2020
Aug 23, 2024
Aug 23, 2024
Jun 25, 2024
Jun 25, 2024
Jul 2, 2024
May 3, 2018
Aug 30, 2024
Jan 24, 2022
May 29, 2024
Apr 20, 2021
Jun 16, 2021
Sep 18, 2024
Jun 26, 2024
Jan 11, 2019
Sep 30, 2024
Sep 30, 2024
Aug 8, 2024
Sep 10, 2024
Sep 30, 2024

Repository files navigation

KPI

Python Build Status Python Coverage Status JavaScript Build Status

We're open for contributions!

Important notice when upgrading from any release older than 2.024.19

Prior to release 2.024.19, this project (KPI) and KoboCAT were two separated projects. KoboCAT is now part of KPI code base and its repository has been archived.

KoboCAT deprecation notices will be maintained in this repository. More details here

Important notice when upgrading from any release older than 2.020.18

Prior to release 2.020.18, this project (KPI) and KoboCAT both shared a common Postgres database. They now each have their own. If you are upgrading an existing single-database installation, you must follow these instructions to migrate the KPI tables to a new database and adjust your configuration appropriately.

If you do not want to upgrade at this time, please use the shared-database-obsolete branch instead.

Python Dependencies

Python dependencies are managed with pip-compile and pip-sync from the pip-tools package. The dependencies are listed in dependencies/pip/, with core requirements in dependencies/pip/requirements.in. You may use pip directly with one of the compiled dependencies/pip/*.txt files, but consider using instead the pip-sync. Do not add new dependencies directly to the compiled dependencies/pip/*.txt files; instead, update the relevant the source dependencies/pip/*.in file(s), and execute ./pip-compile.sh after any changes. You can pass arguments to pip-compile.sh with e.g. ./pip-compile.sh --upgrade-package=xlwt.

Downloading and compiling the translations

  • Pull the submodule into the locale directory with git submodule update.
  • Optionally configure transifex to pull the latest translations into the locale directory with tx pull --all
  • Run python manage.py compilemessages to create .mo files from the .po files.
  • To test out locales in the interface, double click "account actions" in the left navbar, use the dropdown to select a language, and refresh.

Searching

Results from the tags and api/v2/assets endpoints can be filtered by a Boolean query specified in the q parameter. For example: api/v2/assets?q=owner__username:meg AND name__icontains:quixotic would return assets whose owner has the username "meg" (case sensitive) and whose name contains "quixotic" anywhere (case insensitive). For more details about the syntax, see the documentation at the top of kpi/utils/query_parser/query_parser.py.

Admin reports

There are several types of data reports available to superusers.

  • Full list of users including their details provided during signup, number of deployed projects (XForm count), number of submissions, date joined, and last login: <kpi base url>/superuser_stats/user_report/. File being created is a CSV, so don't download immediately to wait for server to be finished writing to the file (it will download even if incomplete).
  • Monthly aggregate figures for number of forms, deployed projects, and submissions (from kobocat): <kc server domain>/<superuser username>/superuser_stats/

Django Admin Interface

As this is a Django project, you may find the admin panel at <kpi base url>/admin useful, e.g. to configure user accounts or log in as other users without knowing their passwords. You must use a superuser account to access the admin panel.

Icons

All project icons are kept in jsapp/svg-icons/. Adding new icon requires adding new svg file here and regenerating icons with npm run generate-icons. Filenames are used for icon font classnames, e.g. .k-icon-arrow-last for arrow-last.svg (please use kebab-case). You can see all available icons in Storybook by running npm run storybook.

Supported Browsers

See browsers list config

About

kpi is the server for KoboToolbox. It includes an API for users to access data and manage their forms, question library, sharing settings, create reports, and export data.

Resources

License

Stars

Watchers

Forks

Sponsor this project