memopol merge requestshttps://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests2018-04-20T00:02:19+02:00https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/184Docker2018-04-20T00:02:19+02:00Jamesie PicDockerhttps://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/179add docker and compose configuration files2016-12-25T22:55:40+01:00Arnaud Grausemadd docker and compose configuration files
**HOW-TO**
```bash
docker-compose build web
docker-compose up -d db
docker-compose up web
```
In an other shell window :
```bash
docker-compose exec web migrate --noinput
docker-compose exec web collectstatic --noinput
```
...
**HOW-TO**
```bash
docker-compose build web
docker-compose up -d db
docker-compose up web
```
In an other shell window :
```bash
docker-compose exec web migrate --noinput
docker-compose exec web collectstatic --noinput
```
Open your browser and go to http://172.16.230.3:8000/
Let's code ! (I got a 500 http error but I think app is up and running)https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/178modif url2016-10-19T23:52:19+02:00Arthurmodif urlhttps://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/163split2016-10-11T18:43:28+02:00Jamesie Picsplithttps://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/162WIP: Turn position-representative relation into m2m2016-10-12T01:37:41+02:00njoyardWIP: Turn position-representative relation into m2mhttps://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/89[Abandoned] Enhance pager2016-10-03T17:37:01+02:00njoyard[Abandoned] Enhance pager*Created by: njoyard*
**Abandoned. PR kept for future reference**
Change pager icons and tooltips to be more descriptive ; add "go to page" feature*Created by: njoyard*
**Abandoned. PR kept for future reference**
Change pager icons and tooltips to be more descriptive ; add "go to page" featurehttps://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/80[WIP] Add import scripts for old data, fixes #582016-10-03T17:36:39+02:00njoyard[WIP] Add 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/60Clear ContentType table before loading fixtures2016-10-03T17:36:18+02:00okhinokhin@laquadrature.netClear ContentType table before loading fixtures*Created by: jpic*
Something has changed in the last two months, when this test used to
pass:
https://travis-ci.org/political-memory/political_memory/builds/108147420
Exception this patch fixes::
=================================...*Created by: jpic*
Something has changed in the last two months, when this test used to
pass:
https://travis-ci.org/political-memory/political_memory/builds/108147420
Exception this patch fixes::
======================================================================
ERROR: setUpClass (representatives_positions.tests.test_functional.PositionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/test/testcases.py", line 956, in setUpClass
'database': db_name,
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/core/management/__init__.py", line 120, in call_command
return command.execute(*args, **defaults)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 60, in handle
self.loaddata(fixture_labels)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 100, in loaddata
self.load_label(fixture_label)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 157, in load_label
obj.save(using=self.using)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/core/serializers/base.py", line 173, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/models/base.py", line 762, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/models/base.py", line 827, in _save_table
forced_update)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/models/base.py", line 877, in _do_update
return filtered._update(values) > 0
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/models/query.py", line 580, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1062, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
cursor.execute(sql, params)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 318, in execute
return Database.Cursor.execute(self, query, params)
IntegrityError: Problem installing fixture '/home/jpic/work/lqdn/political_memory/memopol/fixtures/one_representative.json': Could not load contenttypes.ContentType(pk=25): UNIQUE constraint failed: django_content_type.app_label, django_content_type.modelhttps://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/56WIP - Admin: Optimization and UX with Campaigns2016-10-03T17:36:15+02:00okhinokhin@laquadrature.netWIP - Admin: Optimization and UX with Campaigns*Created by: jpic*
The purpose of this PR is to enable more real-time-ish user experience for the
administrator:
- [ ] Optimization: Sync only dossiers which the admins are interrested in,
- [ ] UX: Sync Dossiers in real-time, when...*Created by: jpic*
The purpose of this PR is to enable more real-time-ish user experience for the
administrator:
- [ ] Optimization: Sync only dossiers which the admins are interrested in,
- [ ] UX: Sync Dossiers in real-time, when the admin changes Dossiers they are
interested in
- [ ] UX: Email admins when a new Proposal was synchronized on a Dossier they
follow
- [ ] UX: Show a list of Proposals which require the admin to set a
Recommendation for
To achieve this, a Campaign model was added, with an n:m relation to Dossier.
The admin manages the Dossiers it is interrested in by managing Campaign
objects.https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/52Added download as CSV2016-10-03T17:36:05+02:00okhinokhin@laquadrature.netAdded download as CSV*Created by: jpic*
*Created by: jpic*
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/49WIP - Added download as CSV2016-10-03T17:35:57+02:00okhinokhin@laquadrature.netWIP - Added download as CSV*Created by: jpic*
This is a work-in-progress branch to offer CSV download of filtered representative lists. It adds a "Download as CSV" link next to the search form. It was tested manually that it preserves group and search filters, ho...*Created by: jpic*
This is a work-in-progress branch to offer CSV download of filtered representative lists. It adds a "Download as CSV" link next to the search form. It was tested manually that it preserves group and search filters, however I would like some time to add automatic tests.
Note that it doesn't use streaming response, because I'm still studying how to do that properly, but we can at most download 750 MEPs should it doesn't prevent using the feature for now.
The number of queries should be OK, but it has not been tested with assertNumQueries, again I'd like some time to test it, if possible.
Because it's in the "pr" branch, it's automatically deployed on http://pr-memopol.rhcloud.com/ which makes it usable for our friends who like spreadsheets right away even before the final implementation is merged ;)https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/46WIP: refactor to sane data model2016-10-03T17:35:50+02:00okhinokhin@laquadrature.netWIP: refactor to sane data model*Created by: jpic*
OK so this time I'm really doing it, let's see if I can buy back the technical debt.*Created by: jpic*
OK so this time I'm really doing it, let's see if I can buy back the technical debt.https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/44WIP Release2016-10-03T17:35:48+02:00okhinokhin@laquadrature.netWIP Release*Created by: jpic*
Rebased commits, unfortunnately the Quality commit which adds pep8 and all makes it way hard to move commits from before / after it but this branch seems reasonable enough to make a release.
Once this is merged i'l...*Created by: jpic*
Rebased commits, unfortunnately the Quality commit which adds pep8 and all makes it way hard to move commits from before / after it but this branch seems reasonable enough to make a release.
Once this is merged i'll reconfigure CD:
- master branch for dev-memopol.rhcloud.com
- staging branch for staging-memopol.rhcloud.com (data would be copied from production before updates)
- lqdn branch for lqdn-memopol.rhcloud.com (production !!)https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/42Release 2.02016-10-03T17:35:43+02:00okhinokhin@laquadrature.netRelease 2.0*Created by: jpic*
*Created by: jpic*
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/36Working release2016-10-03T17:35:39+02:00okhinokhin@laquadrature.netWorking release*Created by: jpic*
*Created by: jpic*
https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/35Project modernization2015-11-14T04:23:20+01:00okhinokhin@laquadrature.netProject modernization*Created by: jpic*
- continuous integration with travis,
- continuous deployment with openshift,
- continuous documentation build with rtfd,
- configuration made 12factor-ish,
- make use of new django-representat...*Created by: jpic*
- continuous integration with travis,
- continuous deployment with openshift,
- continuous documentation build with rtfd,
- configuration made 12factor-ish,
- make use of new django-representatives version for database
optimization.https://git.laquadrature.net/la-quadrature-du-net/memopol/memopol/-/merge_requests/34Continuous delivery2016-10-03T17:35:34+02:00okhinokhin@laquadrature.netContinuous delivery*Created by: jpic*
*Created by: jpic*