Pseudonymous voting component of the Ekklesia e-democracy platform.
See Documentation for the Ekklesia project.
- Backend:
- Main language: Python 3.11
- Web framework: Morepath
- Testing: pytest, WebTest
- Frontend
- Database: PostgreSQL 15
- Dependency management and build tool: Nix
- Documentation: Sphinx with MyST Markdown parser.
- (Optional) Run on NixOS with the included NixOS module
To get a consistent development environment, we use Nix to install Python and the project dependencies. The development environment also includes PostgreSQL, code linters, a SASS compiler and pytest for running the tests.
This section describes briefly how to set up a development environment to run a local instance of the application.
Setting up the environment for testing and running tests is described in the section Testing in the Ekklesia documentation.
The following instructions assume that Nix is already installed, has Nix flakes enabled, and an empty + writable PostgreSQL database can be accessed somehow.
If you don't have Nix with Flakes support and or can’t use an existing PostgreSQL server, have a look at the Development Environment section in the Ekklesia documentation.
It's strongly recommended to also follow the instructions at Setting up the Cachix Binary Cache or the first step will take a long time to complete.
-
Clone the repository and enter nix shell in the project root folder to open a shell which is your dev environment:
git clone https://github.com/edemocracy/ekklesia-voting cd ekklesia-voting nix develop --impure
-
Compile translations and CSS (look at
dodo.py
to see what this does):doit
-
Create a config file named
config.yml
using the config template fromsrc/ekklesia_voting/config.example.yml
or skip this to use the default settings fromekklesia_voting/app.py
,ekklesia_common/app.py
andekklesia_common/ekklesia_auth.py
. Make sure that the database connection string points to an empty + writable database. -
Set up the dev database (look at
flake.nix
to see what this does):create_dev_db
-
Run the development server (look at
flake.nix
to see what this does):run_dev
Run dev_help
to see all commonly used dev shell commands
AGPLv3, see LICENSE
- Tobias 'dpausp'