Skip to content

Commit d29a041

Browse files
committed
Updated for new Gecko version
1 parent 021f9c0 commit d29a041

35 files changed

+1668
-10538
lines changed

app/app/settings.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898

9999
STATICFILES_DIRS = [
100100
os.path.join(BASE_DIR, 'server/static'),
101-
os.path.join(BASE_DIR, 'server/node_modules/gecko/build')
101+
os.path.join(BASE_DIR, 'server/node_modules/gecko/build_external')
102102
]
103103

104104
STATICFILES_STORAGE = 'app.storage.CompressedManifestStaticFilesStorage'
@@ -180,18 +180,6 @@
180180
}
181181
}
182182

183-
DATABASES = {
184-
'default': {
185-
'ENGINE': 'django.db.backends.postgresql_psycopg2',
186-
'NAME': 'doccano',
187-
'USER': 'postgres',
188-
'PASSWORD': 'admin',
189-
'HOST': 'localhost',
190-
'PORT': 5432,
191-
'CONN_MAX_AGE': 60
192-
}
193-
}
194-
195183
# Password validation
196184
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
197185

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Generated by Django 2.1.5 on 2020-06-04 09:09
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('server', '0021_auto_20191105_1553'),
10+
('server', '0022_auto_20200317_0301'),
11+
]
12+
13+
operations = [
14+
]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Generated by Django 2.1.5 on 2020-06-07 17:09
2+
3+
from django.conf import settings
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
11+
('server', '0023_merge_20200604_0909'),
12+
]
13+
14+
operations = [
15+
migrations.AddField(
16+
model_name='audiolabelingannotation',
17+
name='additional_data',
18+
field=models.TextField(default='{}'),
19+
),
20+
migrations.AlterField(
21+
model_name='project',
22+
name='project_type',
23+
field=models.CharField(choices=[('DocumentClassification', 'document classification'), ('SequenceLabelingAlt', 'sequence labeling Alt'), ('SequenceLabeling', 'sequence labeling'), ('Seq2seq', 'sequence to sequence'), ('ImageClassification', 'image classification'), ('ImageCaptioning', 'image captioning'), ('AudioLabeling', 'audio labeling (Gecko test)'), ('ConversationClassification', 'conversation classification')], max_length=30),
24+
),
25+
migrations.AlterUniqueTogether(
26+
name='audiolabelingannotation',
27+
unique_together={('document', 'user', 'file_path')},
28+
),
29+
]

app/server/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ def get_documents_kwargs(self, user, labels=None):
107107
ret["seq_annotations__user"] = user
108108
if (labels):
109109
ret[ "seq_annotations__label__in"] = labels
110+
elif self.is_type_of(Project.AudioLabeling):
111+
ret["audio_labeling_annotations__user"] = user
112+
if (labels):
113+
ret[ "audio_labeling_annotations__label__in"] = labels
110114
else:
111115
print('Project type: '+self.project_type)
112116
raise ValueError('Invalid project_type')
@@ -562,4 +566,4 @@ class AudioLabelingAnnotation(Annotation):
562566
data = models.TextField(blank=True)
563567

564568
class Meta:
565-
unique_together = ('document', 'user')
569+
unique_together = ('document', 'user', 'file_path')

app/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"chart.js": "^2.7.2",
1414
"custom-event-polyfill": "^1.0.7",
1515
"element-matches": "^0.1.2",
16-
"gecko": "github:strelok2012/gecko#doccano-integration",
16+
"gecko": "github:strelok2012/gecko#gecko-doccano",
1717
"vue": "^2.6.10",
1818
"vue-chartjs": "^3.4.0",
1919
"vue-good-table": "^2.16.4",

app/server/static/bundle/audio_annotation.js

Lines changed: 142 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/server/static/bundle/dataset.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)