fix flakes errors, do not run everytime tox is run
This commit is contained in:
parent
7dc724da28
commit
00b84b15cf
3
tox.ini
3
tox.ini
|
@ -14,6 +14,7 @@ setenv =
|
|||
DJANGO_SETTINGS_MODULE=zoo.settings
|
||||
coverage: COVERAGE=--junitxml=junit-{envname}.xml --cov-report xml --cov=zoo/
|
||||
fast: FAST=--nomigrations
|
||||
flakes: FLAKES=--flakes
|
||||
usedevelop =
|
||||
coverage: True
|
||||
nocoverage: False
|
||||
|
@ -37,4 +38,4 @@ deps =
|
|||
pytz
|
||||
faker
|
||||
commands =
|
||||
py.test {env:FAST:} {env:COVERAGE:} {posargs:--flakes tests/}
|
||||
py.test {env:FAST:} {env:COVERAGE:} {env:FLAKES:} {posargs:tests}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
from .zoo_meta.models import *
|
||||
from .zoo_data.models import *
|
||||
from .zoo_meta.models import * # NOQA
|
||||
from .zoo_data.models import * # NOQA
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from .models import Transaction, Entity, Relation, Log
|
||||
from .widgets import JSONEditor
|
||||
|
||||
|
||||
class TransactionAdmin(admin.ModelAdmin):
|
||||
|
|
|
@ -8,4 +8,4 @@ class ZooDataConfig(AppConfig):
|
|||
|
||||
def ready(self):
|
||||
# load our custom lookups
|
||||
import zoo.zoo_data.lookups
|
||||
import zoo.zoo_data.lookups # NOQA
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.contrib.postgres.fields import jsonb
|
||||
from django.db.models import Transform, TextField, DateTimeField
|
||||
from django.db.models import Transform, TextField, DateTimeField
|
||||
|
||||
|
||||
class KeyTransform(Transform):
|
||||
|
|
|
@ -35,7 +35,6 @@ class Transaction(models.Model):
|
|||
cursor.execute('LOCK TABLE %s' % Transaction._meta.db_table)
|
||||
return Transaction.objects.create()
|
||||
|
||||
|
||||
class Meta:
|
||||
ordering = ('id',)
|
||||
verbose_name = _('transaction')
|
||||
|
|
|
@ -13,7 +13,9 @@ class JSONEditor(forms.Textarea):
|
|||
if self.schema:
|
||||
attrs['style'] = 'display: none'
|
||||
s = super(JSONEditor, self).render(name, value, attrs=attrs)
|
||||
s += mark_safe('<div style="display: inline-block; width: 80%%" id="%s_editor_holder"></div>"' % attrs['id'])
|
||||
s += mark_safe(
|
||||
'<div style="display: inline-block; width: 80%%" id="%s_editor_holder"></div>"'
|
||||
% attrs['id'])
|
||||
s += mark_safe('''<script>
|
||||
(function () {
|
||||
var schema = %s;
|
||||
|
|
|
@ -3,7 +3,7 @@ import sys
|
|||
|
||||
import psycopg2
|
||||
|
||||
from zoo.models import *
|
||||
from zoo.models import Entity, Relation, EntitySchema, RelationSchema, Transaction
|
||||
|
||||
Relation.objects.all().delete()
|
||||
Entity.objects.all().delete()
|
||||
|
@ -114,7 +114,7 @@ a.city,
|
|||
a.zipcode,
|
||||
a.country,
|
||||
a.inseecode
|
||||
FROM individualaddress as ia, address as a
|
||||
FROM individualaddress as ia, address as a
|
||||
WHERE
|
||||
ia.addressid = a.id''')
|
||||
for individualid, addressid, is_primary, streetnumber, streetnumberext, streetname, streetmatriculation, \
|
||||
|
@ -197,5 +197,3 @@ for label, relationtype, responsibleid, subjectid in cursor.fetchall():
|
|||
relation_batch.append(e)
|
||||
|
||||
Relation.objects.bulk_create(relation_batch)
|
||||
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ class PersonSearch(object):
|
|||
if not first_name or not last_name:
|
||||
factor *= 0.8
|
||||
if last_name:
|
||||
q &= (self.q_normalize('nom_d_usage', last_name)
|
||||
q &= (self.q_normalize('nom_d_usage', last_name)
|
||||
| self.q_normalize('nom_de_naissance', last_name))
|
||||
if first_name:
|
||||
q &= self.q_normalize('prenoms', first_name)
|
||||
|
|
Loading…
Reference in New Issue