Skip to content

nzzdev/Q-poll-result

dev
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Q Poll Result Build Status

Maintainer: Danijel Beljan

Q Poll Result is one tool of the Q toolbox to render poll results. Test it in the demo.

Table of contents

Installation

git clone git@github.com:nzzdev/Q-poll-result.git
cd ./Q-poll-result
nvm use
npm install
npm run build

to the top

Configuration

No configuration is needed for this tool.

to the top

Development

Start the Q dev server:

npx @nzz/q-cli server

Run the Q tool:

npm run dev

to the top

Testing

The testing framework used in this repository is Code.

Run the tests:

npm run test

Implementing a new test

When changing or implementing...

  • A route, it needs to be tested in the e2e-tests.js file
  • Something on the frontend, it needs to be tested in the dom-tests.js file

to the top

Deployment

We provide automatically built docker images at https://hub.docker.com/r/nzzonline/q-poll-result/. There are three options for deployment:

  • use the provided images
  • build your own docker images
  • deploy the service using another technology

Use the provided docker images

  1. Deploy nzzonline/q-poll-result to a docker environment
  2. Set the ENV variables as described in the configuration section

to the top

Functionality

The tool structure follows the general structure of each Q tool. Further information can be found in Q server documentation - Developing tools.

The tool is designed specifically for poll results in Switzerland which are done prior to votings on intiatives and referendums. Hence, we have two pre-defined scales:

  • Three answer scale

Poll result with three answer scale

  • Five answer scale

Poll result with five answer scale

The scales can also be mixed together:

Poll result with mixed answer scales

to the top

Implementation

The tool uses the svelte framework to render the markup on server-side.

Options

There are no options for this tool.

to the top

License

Copyright (c) 2019 Neue Zürcher Zeitung. All rights reserved.

This software is published under the MIT license.

to the top