Follow instructions in Installation, but install it with additional --dev -e . flag:

pipenv install --ignore-pipfile --dev -e .

Entry point for the code is at


pytest is used for Unit testing.

pipenv run python test


To run profiles with cProfile (50.000 ODK records) and /usr/bin/time (10.000 ODK records), run:

pipenv run python profile


In order to debug the module, you can create a file called next to (with same code content) and create a debug profile in PyCharm like this:



  • Use Semantic Versioning:

    “Consider a version format of X.Y.Z (Major.Minor.Patch). Bug fixes not affecting the API increment the patch version, backwards compatible API additions/changes increment the minor version, and backwards incompatible API changes increment the major version.”

Commandline interface

  • delete ALL events (asks first)
  • export program metadata w/ dependencies
  • print error categories (exceptions)
pipenv run smartva-dhis2-cli --help

--delete_events       Delete all events
                      Download DHIS2 program metadata
                      Print error categories inserted into the database

Updating Documentation

  • add RestructuredText files (like this one) to docs and link them in index.rst
  • pipenv shell, then cd docs and finally make html