memopol merge requestshttps://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests2016-10-03T17:36:47+02:00https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/84Add import scripts for old data, fixes #582016-10-03T17:36:47+02:00njoyardAdd import scripts for old data, fixes #58*Created by: njoyard*
This PR adds two import scripts for old memopol data.
Links to exported data:
* [recommendations.csv](https://framabin.org/?ad32ff1675bd62b5#74mkMfNTLRNT4f4tGkJpgxUmRe02Zgp5ImosoBrSAvg=)
* [positions.csv](http...*Created by: njoyard*
This PR adds two import scripts for old memopol data.
Links to exported data:
* [recommendations.csv](https://framabin.org/?ad32ff1675bd62b5#74mkMfNTLRNT4f4tGkJpgxUmRe02Zgp5ImosoBrSAvg=)
* [positions.csv](https://framabin.org/?089bceff87c480cc#EfiUTwUi/Umz6JuqGaPOhwTKpHesnqVdQ8u2CsUVcs0=)
#### Recommendations
Export old recommendation data to a `|`-separated CSV file with the following query:
```sql
SELECT CONCAT(r.description, '|', r.weight, '|', r.recommendation, '|',
r.part, '|', p.title, '|', p.ponderation)
FROM votes_recommendation r
LEFT JOIN votes_proposal p ON r.proposal_id = p.id
WHERE p.institution = 'EU'
```
Then run the import script using :
```sh
cat recommendations.csv | memopol_import_recommendations
```
#### Positions
Export old position data to a `|`-separated CSV file with the following query:
```sql
SELECT CONCAT(o.content, '|', o.url, '|', o.title, '|', ro.date, '|',
r.first_name, '|', r.last_name)
FROM reps_opinion o
INNER JOIN reps_opinionrep ro ON ro.opinion_id = o.id
INNER JOIN reps_representative r ON r.id = ro.representative_id
WHERE o.institution='EU'
```
Then run the import script using :
```sh
cat positions.csv | memopol_import_positions
```https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/83Enhance representative details, fixes #742016-10-03T17:36:44+02:00njoyardEnhance representative details, fixes #74*Created by: njoyard*
This PR adds contact information on the representative page:
- social network and websites
- email addresses, phone number and postal addresses
![preview](https://framapic.org/4lFSBXV00nSt/9VLkllVvPkmq.png)*Created by: njoyard*
This PR adds contact information on the representative page:
- social network and websites
- email addresses, phone number and postal addresses
![preview](https://framapic.org/4lFSBXV00nSt/9VLkllVvPkmq.png)https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/82Add group icons2016-10-03T17:36:41+02:00njoyardAdd group icons*Created by: njoyard*
Previews :
![1](https://framapic.org/b2EEtbt3NuSB/1veWYO55pRbX.png)
![2](https://framapic.org/cmkoxbmebjH1/mmMsj7r9fW8L.png)
![3](https://framapic.org/DU7yaeWtuugm/UMoMhDZjpJcI.png)
We should also add frenc...*Created by: njoyard*
Previews :
![1](https://framapic.org/b2EEtbt3NuSB/1veWYO55pRbX.png)
![2](https://framapic.org/cmkoxbmebjH1/mmMsj7r9fW8L.png)
![3](https://framapic.org/DU7yaeWtuugm/UMoMhDZjpJcI.png)
We should also add french groups when applicablehttps://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/78Rewrite score computing, fixes #692016-10-03T17:36:36+02:00njoyardRewrite score computing, fixes #69*Created by: njoyard*
This PR removes static, asynchronous representative score updates by replacing plain models with views in the `representatives_recommendations` app:
* `votescores` computes the score consequence of each vote on ...*Created by: njoyard*
This PR removes static, asynchronous representative score updates by replacing plain models with views in the `representatives_recommendations` app:
* `votescores` computes the score consequence of each vote on the representative score ; it is mapped to the new VoteScore model that replaces ScoredVote (which extended Vote and computed scores in python).
* `dossierscores` was introduced in a previous changeset but was rewritten to use `votescores`; it aggregates votes over proposals from a single dossier and returns the score contribution of each dossier on representatives scores. It is mapped to the DossierScore model.
* `representativescore` aggregates scores from the `dossierscores` view over all dossiers for each representative and gives a direct queryable access to the score of each representative. It is mapped to the RepresentativeScore model.
This PR also removes score update facilities as they now don't have any use.
TL;DR: no more manual score updates, scores are computed on the fly.https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/77Enhance dossiers views, fixes #702016-10-03T17:36:33+02:00njoyardEnhance dossiers views, fixes #70*Created by: njoyard*
Dossier list:
![dossier list](https://framapic.org/OChfK78WhmMT/LlSAnZN22HMS.png)
Dossier details:
![dossier details](https://framapic.org/mnQvP6zBKkBd/kSEAX5pb2QcF.png)*Created by: njoyard*
Dossier list:
![dossier list](https://framapic.org/OChfK78WhmMT/LlSAnZN22HMS.png)
Dossier details:
![dossier details](https://framapic.org/mnQvP6zBKkBd/kSEAX5pb2QcF.png)https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/75Enhance footer links2016-10-03T17:36:31+02:00okhinokhin@laquadrature.netEnhance footer links*Created by: djangocreation*
In response to issue #71
*Created by: djangocreation*
In response to issue #71
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/67Completed hacker guide with crazy slides2016-05-21T06:39:30+02:00okhinokhin@laquadrature.netCompleted hacker guide with crazy slides*Created by: jpic*
*Created by: jpic*
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/66Fix deployment on master2016-05-20T19:26:00+02:00okhinokhin@laquadrature.netFix deployment on master*Created by: jpic*
*Created by: jpic*
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/64Add scores, scoredvotes, recommendations to api2016-10-03T17:36:23+02:00njoyardAdd scores, scoredvotes, recommendations to api*Created by: njoyard*
This PR adds memopol entries to the REST api:
- recommendations
- representative scores
- scored votes (ie. votes with their contribution to the rep score)
- score contribution by dossier (via a new DossierScor...*Created by: njoyard*
This PR adds memopol entries to the REST api:
- recommendations
- representative scores
- scored votes (ie. votes with their contribution to the rep score)
- score contribution by dossier (via a new DossierScore model that maps to a DB view, because django querysets do not seem to enable aggregating over annotated fields)
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/61Fix tests on master2016-10-03T17:36:20+02:00okhinokhin@laquadrature.netFix tests on master*Created by: jpic*
Otherwise tests might become broken as a side effect of an upgrade in
these packages. And that's hard to figure out ;)*Created by: jpic*
Otherwise tests might become broken as a side effect of an upgrade in
these packages. And that's hard to figure out ;)https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/55Fixed url conflicts2016-10-03T17:36:13+02:00okhinokhin@laquadrature.netFixed url conflicts*Created by: jpic*
*Created by: jpic*
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/54Display votes with recommendation only2016-10-03T17:36:10+02:00okhinokhin@laquadrature.netDisplay votes with recommendation only*Created by: jpic*
Fixes display bug ie.
http://lqdn-memopol.rhcloud.com/legislature/representative/yannick-jadot/*Created by: jpic*
Fixes display bug ie.
http://lqdn-memopol.rhcloud.com/legislature/representative/yannick-jadot/https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/53Added proposal autocomplete, upgrade to DAL v32016-10-03T17:36:07+02:00okhinokhin@laquadrature.netAdded proposal autocomplete, upgrade to DAL v3*Created by: jpic*
*Created by: jpic*
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/51Added API2016-10-03T17:36:02+02:00okhinokhin@laquadrature.netAdded API*Created by: jpic*
*Created by: jpic*
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/50Use Country.get_absolute_url in templates2016-10-03T17:36:00+02:00okhinokhin@laquadrature.netUse Country.get_absolute_url in templates*Created by: jpic*
*Created by: jpic*
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/47Release2016-10-03T17:35:55+02:00okhinokhin@laquadrature.netRelease*Created by: jpic*
*Created by: jpic*