Database for federal votes
Project description
.
Dataset (CSV, XLSX)
The CSV and XLSX version of the dataset are cached on application level and regenerated only after updating the votes. The files are saved in the root of the filestorage. Old files are not deleted.
Managing Votes
Managing votes is done by uploading datasets. Modified votes are automatically updated and new votes added. Deleting existing votes can be done using the UI.
Full Text Search
Onegov Swissvotes uses Poppler + Postgres for full text search of attached PDFs.
If you want to reindex the attachments, you can run:
onegov-swissvotes reindex
Batch Upload Attachments
There is a command line command for batch-uploading and indexing attachments:
onegov-swissvotes import [folder]
The structure of the folder is expected to be in the form:
[folder]/[attribute]/[locale]/[bfs_number].pdf
The attribute may be any LocalizedFile attribute of the SwissVote model.
Run the Tests
Install tox and run it:
pip install tox tox
Limit the tests to a specific python version:
tox -e py27
Install jest and run it:
npm install npm t
To update the snapshots, run:
npm t -- -u
Conventions
Onegov Swissvotes follows PEP8 as close as possible. To test for it run:
tox -e pep8
Onegov Swissvotes uses Semantic Versioning
Build Status
Coverage
Latest PyPI Release
License
onegov.swissvotes is released under GPLv2
Changelog
1.0.1 (2019-05-13)
Fixes typo. [msom]
Adds label for unknown party recommendations. [msom]
1.0.0 (2019-05-09)
Aligns the vote title left, again. [msom]
0.0.58 (2019-05-07)
Centers the vote title. [msom]
0.0.57 (2019-05-07)
Reorders the votes columns. [msom]
0.0.56 (2019-05-07)
Adds more national council share paroles. [msom]
Adds short and french titles. [msom]
0.0.55 (2019-05-06)
Fixes typo. [msom]
0.0.54 (2019-05-02)
Moves the BFS map into the table. [msom]
0.0.53 (2019-04-30)
Nothing. [msom]
0.0.52 (2019-04-30)
Removes legacy sentry parameter. [msom]
0.0.51 (2019-04-30)
Enables sentry in CLI commands. [msom]
Replaces Raven JS with Sentry. [msom]
0.0.50 (2019-04-29)
Removes unused depdency. [msom]
0.0.49 (2019-04-08)
Improves attachments form. [msom]
Adds hints to slow forms. [msom]
0.0.48 (2019-03-15)
Reworks the bar chart. [msom]
0.0.47 (2019-03-14)
Defers full text search columns. [msom]
Fixes logo color. [msom]
0.0.46 (2019-03-13)
Uses proper rendering of actors in party strengths view. [msom]
Improves sorting of party strenghts tables. [msom]
0.0.45 (2019-03-13)
Adds brief description attachments. [msom]
Adds a reindex command. [msom]
Fixes PDF attachments not getting indexed when uploaded together. [msom]
0.0.44 (2019-03-13)
Updates translations. [msom]
0.0.43 (2019-03-11)
Moves divergent branches further down. [msom]
Updates JavaScript libraries. [msom]
0.0.42 (2019-02-28)
Rearranges the dataset columns. [msom]
0.0.41 (2019-02-28)
Fixes the order of the upgrade steps. [msom]
0.0.40 (2019-02-28)
Adds other recommendations. [msom]
Adds divergent recommendations. [msom]
0.0.39 (2019-02-27)
Adds wildcard search. [msom]
0.0.38 (2019-02-27)
Adds a fulltext search hint. [msom]
0.0.37 (2019-02-27)
Adds BFS maps. [msom]
0.0.36 (2019-02-27)
Adds results by domain attachments. [msom]
0.0.35 (2019-02-25)
Adds additional association recommendations. [msom]
0.0.34 (2019-02-25)
Uses a single JSON column for all recommendations. [msom]
Renames party recommendation dataset columns. [msom]
Increases the maximum size of attachments to 50 MB. [msom]
0.0.33 (2019-02-20)
Allows to add attachments to pages. [msom]
0.0.32 (2019-02-19)
Shows party’s recommendations in the strengths view. [msom]
Adds datetime picker. [msom]
Allows to sort votes by turnout. [msom]
0.0.31 (2019-02-14)
Adds ad analysis. [msom]
Caches the datasets. [msom]
0.0.30 (2019-02-10)
Allows to add and remove content pages. [msom]
Adds a static data protection content page. [msom]
Removes the login link. [msom]
Always display the number of cantons voted yeas/nays. [msom]
Opens external links and files in a new window/tab. [msom]
Hides empty rows in the detail view. [msom]
0.0.29 (2019-01-16)
Adds cantonal results. [msom]
Fixes formatting of procedure numbers. [msom]
0.0.28 (2019-01-09)
Adds a bar chart with the percentages of the positions and results. [msom]
0.0.27 (2019-01-08)
Adds a pagination to the vote details view. [msom]
Adjusts styles to look more like anneepolitique.swiss. [msom]
0.0.26 (2018-12-18)
Shows the localized file of the default locale if none is available for the current locale. [msom]
0.0.25 (2018-12-17)
Adds the swissvotes logo. [msom]
0.0.24 (2018-12-17)
Fixes default sorting of votes collections. [msom]
Fixes display of the voter share of yes camp. [msom]
Fixes display of procedure number. [msom]
0.0.23 (2018-12-11)
Visually aligns the multiple tree select widget options. [msom]
0.0.21 (2018-12-11)
Adds more margins to the multiple tree select widget. [msom]
0.0.20 (2018-12-11)
Uses a multiple tree select widget for policy descriptors. [msom]
0.0.19 (2018-12-10)
Adds descriptors. [msom]
Fixes the click area of collapsible tables. [msom]
0.0.18 (2018-12-09)
Import data files in alphabetical order. [msom]
Fixes XLSX import for quasi-empty string cells. [msom]
0.0.17 (2018-12-09)
Fixes data import. [msom]
0.0.16 (2018-12-09)
Reorganizes the vote details view. [msom]
Makes groups of vote details collapsible. [msom]
0.0.15 (2018-11-25)
Fixes switching the extended filters. [msom]
0.0.14 (2018-11-21)
Fixes displaying yeas and nays of council positions. [msom]
0.0.13 (2018-11-21)
Improves the XLSX import. [msom]
0.0.12 (2018-11-20)
Allows to search for BFS and procedure numbers. [msom]
Allows to search by council positions. [msom]
Adds a full text search option. [msom]
Fixes the formatting of BFS numbers. [msom]
0.0.11 (2018-11-05)
Adds resolution and realization attachments. [msom]
Reorders the votes columns. [msom]
Only shows the top level of the descriptor in the votes view. [msom]
Uses the latest onegov.form. [msom]
0.0.10 (2018-10-07)
Use tsquery phrases for multipley fulltext terms. [msom]
0.0.9 (2018-10-07)
Uses prostgres for keyword filtering instead of elastic search. [msom]
0.0.8 (2018-09-28)
Use a wider range of MIME types when updating the dataset. [msom]
0.0.7 (2018-09-28)
Adds full text search support for attachments. [msom]
Adds voting booklet attachments. [msom]
Adds a CLI command for importing attachments. [msom]
Makes the update, export and delete vote views to be indifferent to the filters. [msom]
Handles search beeing unavailable. [msom]
Sorts full text search results by rank. [msom]
0.0.6 (2018-09-23)
Adds search. [msom]
Uses XLSX for import. [msom]
Uses excel format for CSV export. [msom]
0.0.5 (2018-09-18)
Adds XLSX export. [msom]
Improves UI. [msom]
Enables English. [msom]
0.0.4 (2018-09-03)
Styles content pages. [msom]
0.0.3 (2018-08-31)
Improves vote(s) views. [msom]
Adds editor options. [msom]
Fixes votes pagination. [msom]
0.0.2 (2018-08-31)
Adds the GitHub deploy key. [msom]
0.0.1 (2018-08-30)
Initial Release. [msom]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file onegov.swissvotes-1.0.1.tar.gz
.
File metadata
- Download URL: onegov.swissvotes-1.0.1.tar.gz
- Upload date:
- Size: 3.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5102d7f7ecb25f28ff61233b9f2d5956be1e5d0d0e75181b04f45c6c1da5a7e1 |
|
MD5 | 1138c1313e0a05a1e33c10b88da5ca43 |
|
BLAKE2b-256 | b0930bb13b5237b9bbfd7053714e150873612d9b74a22b0df74517071b522d6d |
File details
Details for the file onegov.swissvotes-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: onegov.swissvotes-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7ccbdb02d8556f77074f0d8e25844fd10e0c00892809fc6e7b590100eb0ddb0 |
|
MD5 | c99187ef0292c367039735751d5d3dae |
|
BLAKE2b-256 | 49a19b470e90d527a373c3f03efd481c31e045504e8cd139685f6eb464884ff1 |