The project follows the Open Knowledge International coding standards.
virtualenv .python -p python2
source .python/bin/activate
pip install -r requirements.txt
cp .env.example .env
editor .env # set your values
set -a; source .env
-
Create the test databases given as value for
TEST_WAREHOUSE_URL
,TEST_DATABASE_URL
andTEST_EXPLORER_URL
in your.env
file. -
Populate test databases with their corresponding schema:
```
$ make restore_schemas
```
-
To run the tests, you need tox installed. We recommend you to install it globally with
pip install -g tox
-
Run the tests:
```
$ tox
```
Our testing framework of choice is pytest combined with pylama.
We have several pytest
fixtures of database entities in tests/fixtures
that you can use in your tests. Feel free to add more if needed.
If your code alters the schema of a database make sure to update its schema file in
tests/dbs
.
$ make dump_schemas
To run a processor:
$ make start <name> [<args>]