Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop CSV import support from API v1 #4981

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@

We're open for [contributions](./CONTRIBUTING.md)!

## Important notice when upgrading from any release older than [`2.024.19`](https://github.com/kobotoolbox/kpi/releases/tag/2.024.19)

Prior to release [`2.024.19`](https://github.com/kobotoolbox/kpi/releases/tag/2.024.19), this project (KPI) and [KoboCAT](https://github.com/kobotoolbox/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](./kobo/apps/openrosa/README.md)

## Important notice when upgrading from any release older than [`2.020.18`](https://github.com/kobotoolbox/kpi/releases/tag/2.020.18)

Prior to release [`2.020.18`](https://github.com/kobotoolbox/kpi/releases/tag/2.020.18), this project (KPI) and [KoBoCAT](https://github.com/kobotoolbox/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](https://community.kobotoolbox.org/t/upgrading-to-separate-databases-for-kpi-and-kobocat/7202)** to migrate the KPI tables to a new database and adjust your configuration appropriately.
Prior to release [`2.020.18`](https://github.com/kobotoolbox/kpi/releases/tag/2.020.18), this project (KPI) and [KoboCAT](https://github.com/kobotoolbox/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](https://community.kobotoolbox.org/t/upgrading-to-separate-databases-for-kpi-and-kobocat/7202)** 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`](https://github.com/kobotoolbox/kpi/tree/shared-database-obsolete) branch instead.

Expand All @@ -35,7 +43,7 @@ syntax, see the documentation at the top of

## Admin reports

There are several types of data reports available to superusers.
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/`

Expand Down
115 changes: 115 additions & 0 deletions kobo/apps/openrosa/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# KoboCAT

## Important notice when upgrading from any release older than [`2.020.18`](https://github.com/kobotoolbox/kobocat/releases/tag/2.020.18)

Up to and including release [`2.020.18`](https://github.com/kobotoolbox/kobocat/releases/tag/2.020.18), this project (KoboCAT) and [KPI](https://github.com/kobotoolbox/kpi) 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](https://community.kobotoolbox.org/t/upgrading-to-separate-databases-for-kpi-and-kobocat/7202)** 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`](https://github.com/kobotoolbox/kobocat/tree/shared-database-obsolete) branch instead.

## Deprecation Notices

Much of the user-facing features of this application are being migrated
to <https://github.com/kobotoolbox/kpi>. KoboCAT's data-access API and
OpenRosa functions will remain intact, and any plans to the contrary
will be announced well in advance. For more details and discussion,
please refer to
<https://community.kobotoolbox.org/t/contemplating-the-future-of-kobocat/2743>.

As features are migrated, we will list them here along with the last
release where each was present:
- Starting from version [2.024.19](https://github.com/kobotoolbox/kobocat/releases/tag/2.024.19),
the ability to import submissions in CSV to KoboCAT was
removed (i.e: `https://kobocat.domain.tld/api/v1/forms/<form_id>/csv_import`)
.
- On 14 June 2021, the ability to upload forms directly to KoboCAT was
removed, and it was announced that the legacy KoboCAT user interface would
be preserved for "a few more months". After more than two years, we have
removed the user interface and related endpoints entirely in release
[2.023.37](https://github.com/kobotoolbox/kobocat/releases/tag/2.023.37).
**This includes the ability to upload XLSForms via the legacy KoboCAT API.**
Please use the KPI `v2` API for all form management. Other removed features
should already be available in KPI as well. Please see
[REMOVALS.md](REMOVALS.md) for a complete list.
- To ensure security and stability, many endpoints that were already
available in KPI, long-unsupported, or underutilized have been removed in
release
[2.020.40](https://github.com/kobotoolbox/kobocat/releases/tag/2.020.40).
These were related to charts and stats, form cloning, form sharing, user
profiles, organizations / projects / teams, bamboo, and ziggy. For a full
list, please see [REMOVALS.md](REMOVALS.md). These endpoints were last
available in the release
[2.020.39](https://github.com/kobotoolbox/kobocat/releases/tag/2.020.39).
- REST Services - an improved version [has been added to
KPI](https://github.com/kobotoolbox/kpi/pull/1864). The last KoboCAT
release to contain legacy REST services is
[2.019.39](https://github.com/kobotoolbox/kobocat/releases/tag/2.019.39).

## About

kobocat is the data collection platform used in KoboToolbox. It is based
on the excellent [onadata](http://github.com/onaio/onadata) platform
developed by Ona LLC, which in itself is a redevelopment of the
[formhub](http://github.com/SEL-Columbia/formhub) platform developed by
the Sustainable Engineering Lab at Columbia University.

Please refer to
[kobo-install](https://github.com/kobotoolbox/kobo-install) for
instructions on how to install KoboToolbox.

## Code Structure

- **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)

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

To update PO files

``` sh
$ django-admin makemessages -a ;
$ for app in {main,viewer} ; do cd kobocat/apps/${app} && django-admin makemessages -d djangojs -a && cd - ; done
```

To compile MO files and update live translations

``` sh
$ django-admin compilemessages ;
$ for app in {main,viewer} ; do cd kobocat/apps/${app} && django-admin compilemessages && cd - ; done
```
## Testing in KoboCAT

For kobo-install users, enter the folder for kobo-install and run this command

```
./run.py -cf exec kobocat bash
```

For all other users, enter the container using this command

``` sh
$ docker exec -it {{kobocat container}} /bin/bash
```

Run pip install the development dependencies

``` sh
$ pip install -r dependencies/pip/dev.txt
```

Run pytest to run all automated tests

``` sh
$ pytest
```
Loading
Loading