Pushing Together is an open-source web platform to manage participative opinion research, with built-in machine learning algorithm to generate opinion groups from participation data.
The platform development was migrated to https://github.com/cidadedemocratica/ej-application repository. You still can visit EJ at https://www.ejplatform.org . For detailed information on developing and using our system, please refer to the documentation.
First clone the repository:
$ git clone https://gitlab.com/pencillabs/ej/ej-application $ cd ej-application
The recomended way to run EJ is with Docker. With it you can quickly start the development server using the commands:
$ pip3 install invoke==2.0.0 --user $ inv docker-build $ inv docker-up
This will deploy EJ using docker/docker-compose.yml file. Every change made on the repository will be reflected inside the docker_server container.
If you are creating a clean EJ instance, you can populate the database with some fake data:
$ inv docker-exec "poetry run inv db-fake"
You can access the running instance accessing http://localhost:8000.
To rebuild the server image, you can run inv docker-build --no-cache.
Some useful commands to manage docker environment:
Some useful commands to manage the application (run this inside django container):
Command | Description |
---|---|
poetry run inv i18n | Extracts messages from Jinja templates for translation |
poetry run inv i18n -c | Compile .po files |
poetry run inv sass | Compile sass files |
poetry run inv sass --watch | Watch changes on code, and compile .sass files |
poetry run inv db | Prepare database and run migrations |
poetry run inv shell | Executs django shell with ipython |
If you are making changes to EJ codebase, do not forget to run tests frequently. EJ uses Pytest_:
$ inv docker-test
You probably will want to execute commands inside the container. It is possible to open a bash shell in the main "web" container with:
$ inv docker-attach
You also can execute commands without open docker bash shell:
$ inv docker-exec "command"
After configuring local environment, the next step is reading our documentation. It can be generated with:
$ inv docker-exec "poetry run inv docs"
and will be available at the http://localhost:8000/docs url.