Getting Started

We’re pleased that you are interested in working on Junction.

This document is meant to get you setup to work on Junction and to act as a guide and reference to the the development setup. If you face any issues during this process, please open an issue about it on the issue tracker.

Initial Setup

Junction’s development workflow is automated using Docker with docker-compose. We also use Docker for production deployment.

To setup Docker and docker-compose locally follow the Docker Getting started doc.

After Docker and docker-compose is setup locally follow these steps

$ cp .env.sample .env
$ docker-compose build
$ docker-compose up -d

This will build and run the application after running database migrations

Access the application at https://localhost:8888

Backend

Populate Database with sample data

$ docker-compose exec web /bin/sh
# python manage.py sample_data

Admin Access

When sample data is generated, a superuser is created with the username admin and password 123123. Go to https://localhost:8888/nimda to access Django Admin Panel

Development workflow

Running tests

For running the tests, run:

$ docker-compose -f docker-compose.test.yml up -d

Running linters

We use pre-commit for linting. Install pre-commit then run:

$ pre-commit install

This will install all linters in form of git hooks. To manually run the linter run:

$ pre-commit run --all-files

Building documentation

For building the documentation, run:

$ python -m pip install -r tools/requirements-docs.txt
$ cd docs
$ make html