Contribute

River Admin consists of two parts that are backend and ui. It is built with Django Rest Framework on the backend side whereas Vue on the front end side.

Rive Admin Backend

River Admin backend side is built with Django and Django Rest Framework. So you need Django development environment to be set up.

  1. Install the dependencies

    pip install -r requirements.txt
    
  2. Install Tox to run the tests for all environments.

    pip install tox
    
  3. Install Twine and other necessary packages to upload packages to PyPI

    pip install wheel setuptools twine
    
  4. You are ready to develop the backend side now.

Development

python manage.py runserver

Tests

Tox is used on the backend side to automate Python & Django testing. Tests are under river-admin/tets/. Simply run

tox

To run it for a specific environment;

tox -e py34-dj2.1

River Admin UI

River Admin ui is built with Vue. So you need Vue development environment to be set up.

  1. Install node & npm

  2. Install yarn (Install Yarn)

  3. Install dependencies

    yarn install
    

Development

While developing the front end Vue app of River Admin, you can run it without building it and the server will auotmatically reload on any changes in the code. This is quite useful thing for fast feedback and debugging. One thing you should make sure before you run this, backend server is also running since it needs to call the backend

python manage.py runserver
yarn serve

Tests

UI tests are written with Jest javascript testing framework from Facebook. Tests are under ui/tets/. To run the tests simply;

yarn test:unit

To run a specific one;

yarn test:unit StateInput.spec.js

To run the tests with a fresh snapshot (to clean the snapshots);

yarn test:unit -u

Build

yarn build

The distribution folders of the Vue app are river_admin/templates and river_admin/static. The reason for that is because a Django app should contains all the html and static files under templates and static folders.