Giter Site home page Giter Site logo

vahidsahraei / a4-meinberlin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liqd/a4-meinberlin

1.0 0.0 0.0 15.68 MB

The central participation platform of the city of Berlin, Germany

Home Page: https://mein.berlin.de

License: GNU Affero General Public License v3.0

Shell 0.13% JavaScript 8.93% Python 68.45% CSS 0.10% Makefile 0.41% HTML 17.21% SCSS 4.77%

a4-meinberlin's Introduction

Participation platform mein.berlin

mein.berlin is a participation platform for the city of Berlin, Germany. It is based on adhocracy 4.

Build Status Coverage Status

Requirements

  • nodejs (+ npm)
  • python 3.x (+ venv + pip)
  • libmagic
  • libjpeg
  • libpq (only if postgres should be used)
  • gdal
  • sqlite3 with JSON1 enabled(only if sqlite is used for local development)
  • redis (in production, not needed for development)

Installation (for development and testing only!)

Note: if you are on a mac you need to have gnu sed installed for the following steps to work. Install it via brew:

brew install gnu-sed

Steps to install and run a development server:

git clone https://github.com/liqd/a4-meinberlin.git
cd a4-meinberlin
make install
make fixtures
make watch

(Optional) postgresql database for testing:

If you need to do testing with postgresql as database (usually sqlite is sufficient).

run the following command once:

make postgres-create

to start the testserver with postgresql, run:

export DATABASE=postgresql
make postgres-start
make watch

to remove python venv and npm modules, run:

make clean

Note: if your virtualenv is located outside the project, then the command above it won't remove the python packages. Instead remove them with:

pip uninstall -r requirements/dev.txt

(Optional) celery for task queues

If you need to do testing with a proper celery setup.

For celery to register and run tasks you need to make sure that:

  • the redis server is running
  • the celery config parameter "always eager" is disabled (add CELERY_TASK_ALWAYS_EAGER = False to your local.py)

To start a celery worker in the foreground, run:

make celery-worker-start

Stop celery with ctr+C

To inspect all registered tasks, list the running worker nodes, run:

make celery-worker-status

To send a dummy task to the queue and report the result, run:

make celery-worker-dummy-task

See more info about Celery in the docs

(Optional) celery beat for scheduled tasks in development

If you need to do testing with periodical task working.

For celery to run scheduled tasks you need to make sure that:

  • the redis server is running
  • the celery worker is running (see previous step)

To start celery beat in the foreground, run:

make celery-beat

Stop celery beat with ctr+C

To add scheduled tasks (same for all environments) check the docs

In case of settings.TIME_ZONE change, tasks need to be synced with the new time. See HOWTO

a4-meinberlin's People

Contributors

2e2a avatar fuzzylogic2000 avatar goapunk avatar greenkeeper[bot] avatar hklarner avatar hmkay avatar hom3mad3 avatar ihucos avatar kleingeist avatar m4ra avatar magdan avatar mcastro-lqd avatar mkind avatar philli-m avatar pyup-bot avatar renovate-bot avatar renovate[bot] avatar rineee avatar rmader avatar sabinammm avatar slomo avatar vellip avatar weblate avatar xi avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.