Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • arkindex/backend
1 result
Show changes
Commits on Source (4)
Showing
with 876 additions and 684 deletions
...@@ -2,6 +2,8 @@ SELECT ...@@ -2,6 +2,8 @@ SELECT
dataset.id, dataset.id,
dataset.name, dataset.name,
dataset.state, dataset.state,
ARRAY_TO_STRING(dataset.sets, ',', '') string_agg(datasetset.name, ',')
FROM training_dataset dataset FROM training_dataset dataset
INNER JOIN training_datasetset datasetset ON datasetset.dataset_id = dataset.id
WHERE dataset.corpus_id = '{corpus_id}'::uuid WHERE dataset.corpus_id = '{corpus_id}'::uuid
GROUP BY dataset.id
SELECT SELECT
dataset_element.id, dataset_element.id,
dataset_element.element_id, dataset_element.element_id,
dataset_element.dataset_id, dataset_set.dataset_id,
dataset_element.set dataset_set.name
FROM training_datasetelement dataset_element FROM training_datasetelement dataset_element
INNER JOIN training_dataset dataset ON (dataset_element.dataset_id = dataset.id) INNER JOIN training_datasetset dataset_set ON (dataset_element.set_id = dataset_set.id)
INNER JOIN training_dataset dataset ON (dataset_set.dataset_id = dataset.id)
WHERE dataset.corpus_id = '{corpus_id}'::uuid WHERE dataset.corpus_id = '{corpus_id}'::uuid
[ [
{ {
"model": "process.process", "model": "process.process",
"pk": "76506eee-43ab-4caa-966c-9e8e5d10ef93", "pk": "6fb4ded9-ab97-4764-b0b0-4a7040556cde",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"name": null, "name": "Process fixture",
"creator": 1, "creator": 2,
"corpus": null, "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"mode": "local", "mode": "workers",
"activity_state": "disabled", "activity_state": "disabled",
"started": null, "started": null,
"finished": null, "finished": null,
"farm": null, "farm": "0464874a-12cd-4bb5-a06f-37a872a82e5a",
"element": null, "element": null,
"folder_type": null, "folder_type": null,
"element_type": null, "element_type": null,
...@@ -31,18 +31,18 @@ ...@@ -31,18 +31,18 @@
}, },
{ {
"model": "process.process", "model": "process.process",
"pk": "7a6fed8c-ed9c-4714-8036-7048462ce0f2", "pk": "89fbd695-bd87-4a1d-afef-8647a30d3ccc",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"name": "Process fixture", "name": null,
"creator": 2, "creator": 1,
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": null,
"mode": "workers", "mode": "local",
"activity_state": "disabled", "activity_state": "disabled",
"started": null, "started": null,
"finished": null, "finished": null,
"farm": "395522d1-94a0-407a-b5cb-347fa68ec2c4", "farm": null,
"element": null, "element": null,
"folder_type": null, "folder_type": null,
"element_type": null, "element_type": null,
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
}, },
{ {
"model": "process.process", "model": "process.process",
"pk": "b6b7dbcb-e134-4274-93fd-9d6d06818c6f", "pk": "fb8b6046-9aa6-454d-8e0b-472f93605016",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
...@@ -91,25 +91,25 @@ ...@@ -91,25 +91,25 @@
}, },
{ {
"model": "process.repository", "model": "process.repository",
"pk": "bcfed350-d5be-4f27-b66a-042be3e6ee64", "pk": "a7c6b0d5-d68c-48f7-a07b-09e0522a4d5c",
"fields": { "fields": {
"url": "http://gitlab/repo" "url": "http://my_repo.fake/workers/worker"
} }
}, },
{ {
"model": "process.repository", "model": "process.repository",
"pk": "e3f470b1-fc46-4bc1-8117-30e1c62962b7", "pk": "e3e6edfa-da1c-46a1-85be-24c0c5308fdd",
"fields": { "fields": {
"url": "http://my_repo.fake/workers/worker" "url": "http://gitlab/repo"
} }
}, },
{ {
"model": "process.revision", "model": "process.revision",
"pk": "2d087aa1-82ba-4ec5-af14-c19e4213f913", "pk": "179c0b17-cfa7-4157-bba0-83c83d58ee62",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"repo": "e3f470b1-fc46-4bc1-8117-30e1c62962b7", "repo": "a7c6b0d5-d68c-48f7-a07b-09e0522a4d5c",
"hash": "1337", "hash": "1337",
"message": "My w0rk3r", "message": "My w0rk3r",
"author": "Test user" "author": "Test user"
...@@ -117,11 +117,11 @@ ...@@ -117,11 +117,11 @@
}, },
{ {
"model": "process.revision", "model": "process.revision",
"pk": "7876a435-f3a5-40f8-b30b-f388f22019bf", "pk": "e67d4944-5167-4f45-bfac-2a4d92bbd177",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"repo": "bcfed350-d5be-4f27-b66a-042be3e6ee64", "repo": "e3e6edfa-da1c-46a1-85be-24c0c5308fdd",
"hash": "42", "hash": "42",
"message": "Salve", "message": "Salve",
"author": "Some user" "author": "Some user"
...@@ -129,50 +129,50 @@ ...@@ -129,50 +129,50 @@
}, },
{ {
"model": "process.worker", "model": "process.worker",
"pk": "12b2344f-4871-40ad-aa1b-efaa70b5823f", "pk": "7290f39e-fa17-4e7f-a051-a0e573c3ff6b",
"fields": { "fields": {
"name": "Document layout analyser", "name": "Recognizer",
"slug": "dla", "slug": "reco",
"type": "e84d4893-ae73-4162-acb6-13d606587644", "type": "ab7333fc-34e8-4fb6-a3bb-d733443cbe51",
"description": "", "description": "",
"repository": "e3f470b1-fc46-4bc1-8117-30e1c62962b7", "repository": "a7c6b0d5-d68c-48f7-a07b-09e0522a4d5c",
"public": false, "public": false,
"archived": null "archived": null
} }
}, },
{ {
"model": "process.worker", "model": "process.worker",
"pk": "1a18dc1d-49e3-4724-b1e3-cbc8da483610", "pk": "7c61dba0-4fdc-494f-b587-abddc75b8dbb",
"fields": { "fields": {
"name": "Worker requiring a GPU", "name": "Generic worker with a Model",
"slug": "worker-gpu", "slug": "generic",
"type": "20d3065e-0ef7-428b-888f-177f59e6ddd0", "type": "ab7333fc-34e8-4fb6-a3bb-d733443cbe51",
"description": "", "description": "",
"repository": "e3f470b1-fc46-4bc1-8117-30e1c62962b7", "repository": "a7c6b0d5-d68c-48f7-a07b-09e0522a4d5c",
"public": false, "public": false,
"archived": null "archived": null
} }
}, },
{ {
"model": "process.worker", "model": "process.worker",
"pk": "219444d1-2a84-49f4-94d6-d5c21e36fcb9", "pk": "8a27660c-f976-4550-834c-84d4ad033214",
"fields": { "fields": {
"name": "Generic worker with a Model", "name": "Worker requiring a GPU",
"slug": "generic", "slug": "worker-gpu",
"type": "50729501-d9c4-473d-803f-a7cf25f0f9bd", "type": "7af4b709-efd8-4882-b6be-6b408ebf9b2d",
"description": "", "description": "",
"repository": "e3f470b1-fc46-4bc1-8117-30e1c62962b7", "repository": "a7c6b0d5-d68c-48f7-a07b-09e0522a4d5c",
"public": false, "public": false,
"archived": null "archived": null
} }
}, },
{ {
"model": "process.worker", "model": "process.worker",
"pk": "667a82ac-a19a-4e97-9239-35a3026246cb", "pk": "af68bb34-5eaa-4edc-81fa-4400af06a715",
"fields": { "fields": {
"name": "Custom worker", "name": "Custom worker",
"slug": "custom", "slug": "custom",
"type": "64a618df-09d0-47eb-b999-02ceb0a114a4", "type": "7fedc658-ecaa-4727-8844-71663ec6d0a9",
"description": "", "description": "",
"repository": null, "repository": null,
"public": false, "public": false,
...@@ -181,128 +181,130 @@ ...@@ -181,128 +181,130 @@
}, },
{ {
"model": "process.worker", "model": "process.worker",
"pk": "9775f6a1-6238-4943-b245-b69bde621912", "pk": "bc503daa-b53f-45ef-9d90-7f6a24d028a1",
"fields": { "fields": {
"name": "Recognizer", "name": "Document layout analyser",
"slug": "reco", "slug": "dla",
"type": "50729501-d9c4-473d-803f-a7cf25f0f9bd", "type": "26ca87e4-afb3-4e0f-bc1a-b0641c7dd427",
"description": "", "description": "",
"repository": "e3f470b1-fc46-4bc1-8117-30e1c62962b7", "repository": "a7c6b0d5-d68c-48f7-a07b-09e0522a4d5c",
"public": false, "public": false,
"archived": null "archived": null
} }
}, },
{ {
"model": "process.worker", "model": "process.worker",
"pk": "df6dbbb2-0526-46f9-8da2-5ada8f93826a", "pk": "d757e5ad-a03e-4e81-bf81-0b2a8719220e",
"fields": { "fields": {
"name": "File import", "name": "File import",
"slug": "file_import", "slug": "file_import",
"type": "3a0b2c85-f53f-4ce7-942d-37c08f356880", "type": "f2a53f25-1ffe-423e-b9c4-ee5a01a2b5a0",
"description": "", "description": "",
"repository": "e3f470b1-fc46-4bc1-8117-30e1c62962b7", "repository": "a7c6b0d5-d68c-48f7-a07b-09e0522a4d5c",
"public": false, "public": false,
"archived": null "archived": null
} }
}, },
{ {
"model": "process.workertype", "model": "process.workertype",
"pk": "20d3065e-0ef7-428b-888f-177f59e6ddd0", "pk": "26ca87e4-afb3-4e0f-bc1a-b0641c7dd427",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"slug": "worker", "slug": "dla",
"display_name": "Worker requiring a GPU" "display_name": "Document Layout Analysis"
} }
}, },
{ {
"model": "process.workertype", "model": "process.workertype",
"pk": "3a0b2c85-f53f-4ce7-942d-37c08f356880", "pk": "7af4b709-efd8-4882-b6be-6b408ebf9b2d",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"slug": "import", "slug": "worker",
"display_name": "Import" "display_name": "Worker requiring a GPU"
} }
}, },
{ {
"model": "process.workertype", "model": "process.workertype",
"pk": "50729501-d9c4-473d-803f-a7cf25f0f9bd", "pk": "7fedc658-ecaa-4727-8844-71663ec6d0a9",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"slug": "recognizer", "slug": "custom",
"display_name": "Recognizer" "display_name": "Custom"
} }
}, },
{ {
"model": "process.workertype", "model": "process.workertype",
"pk": "64a618df-09d0-47eb-b999-02ceb0a114a4", "pk": "ab7333fc-34e8-4fb6-a3bb-d733443cbe51",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"slug": "custom", "slug": "recognizer",
"display_name": "Custom" "display_name": "Recognizer"
} }
}, },
{ {
"model": "process.workertype", "model": "process.workertype",
"pk": "e84d4893-ae73-4162-acb6-13d606587644", "pk": "f2a53f25-1ffe-423e-b9c4-ee5a01a2b5a0",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"slug": "dla", "slug": "import",
"display_name": "Document Layout Analysis" "display_name": "Import"
} }
}, },
{ {
"model": "process.workerversion", "model": "process.workerversion",
"pk": "229fc630-728b-421b-a2de-9618bd8e401f", "pk": "148946e9-5ddd-42d2-ad29-bf78ca55f62c",
"fields": { "fields": {
"worker": "667a82ac-a19a-4e97-9239-35a3026246cb", "worker": "8a27660c-f976-4550-834c-84d4ad033214",
"revision": null, "revision": "179c0b17-cfa7-4157-bba0-83c83d58ee62",
"version": 1, "version": null,
"configuration": { "configuration": {
"custom": "value" "test": 42
}, },
"state": "created", "state": "available",
"gpu_usage": "disabled", "gpu_usage": "required",
"model_usage": "disabled", "model_usage": "disabled",
"docker_image": null, "docker_image": null,
"docker_image_iid": null, "docker_image_iid": "registry.somewhere.com/something:latest",
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z" "updated": "2020-02-02T01:23:45.678Z"
} }
}, },
{ {
"model": "process.workerversion", "model": "process.workerversion",
"pk": "57cd018c-43e2-491e-9684-3b939df52921", "pk": "194b33ea-4a45-4884-9a89-dd04c5a65fc3",
"fields": { "fields": {
"worker": "df6dbbb2-0526-46f9-8da2-5ada8f93826a", "worker": "af68bb34-5eaa-4edc-81fa-4400af06a715",
"revision": "2d087aa1-82ba-4ec5-af14-c19e4213f913", "revision": null,
"version": null, "version": 1,
"configuration": {}, "configuration": {
"state": "available", "custom": "value"
},
"state": "created",
"gpu_usage": "disabled", "gpu_usage": "disabled",
"model_usage": "disabled", "model_usage": "disabled",
"docker_image": null, "docker_image": null,
"docker_image_iid": "registry.somewhere.com/something:latest", "docker_image_iid": null,
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z" "updated": "2020-02-02T01:23:45.678Z"
} }
}, },
{ {
"model": "process.workerversion", "model": "process.workerversion",
"pk": "665fdbad-798b-434b-9ab0-95f7522c19d6", "pk": "505988ea-21cb-4011-ad87-48bdab37237d",
"fields": { "fields": {
"worker": "1a18dc1d-49e3-4724-b1e3-cbc8da483610", "worker": "7290f39e-fa17-4e7f-a051-a0e573c3ff6b",
"revision": "2d087aa1-82ba-4ec5-af14-c19e4213f913", "revision": "179c0b17-cfa7-4157-bba0-83c83d58ee62",
"version": null, "version": null,
"configuration": { "configuration": {
"test": 42 "test": 42
}, },
"state": "available", "state": "available",
"gpu_usage": "required", "gpu_usage": "disabled",
"model_usage": "disabled", "model_usage": "disabled",
"docker_image": null, "docker_image": null,
"docker_image_iid": "registry.somewhere.com/something:latest", "docker_image_iid": "registry.somewhere.com/something:latest",
...@@ -312,10 +314,10 @@ ...@@ -312,10 +314,10 @@
}, },
{ {
"model": "process.workerversion", "model": "process.workerversion",
"pk": "88c64ea9-46e0-46fa-a65f-37eeaed3ded0", "pk": "6ee6d026-1ea4-4435-98a1-a811aed6304e",
"fields": { "fields": {
"worker": "219444d1-2a84-49f4-94d6-d5c21e36fcb9", "worker": "7c61dba0-4fdc-494f-b587-abddc75b8dbb",
"revision": "2d087aa1-82ba-4ec5-af14-c19e4213f913", "revision": "179c0b17-cfa7-4157-bba0-83c83d58ee62",
"version": null, "version": null,
"configuration": { "configuration": {
"test": 42 "test": 42
...@@ -331,10 +333,10 @@ ...@@ -331,10 +333,10 @@
}, },
{ {
"model": "process.workerversion", "model": "process.workerversion",
"pk": "928cfe44-77bc-4cb1-84d2-f02006bd61d5", "pk": "9da1ac9d-0ff7-44fc-923f-3076a5bead35",
"fields": { "fields": {
"worker": "12b2344f-4871-40ad-aa1b-efaa70b5823f", "worker": "bc503daa-b53f-45ef-9d90-7f6a24d028a1",
"revision": "2d087aa1-82ba-4ec5-af14-c19e4213f913", "revision": "179c0b17-cfa7-4157-bba0-83c83d58ee62",
"version": null, "version": null,
"configuration": { "configuration": {
"test": 42 "test": 42
...@@ -350,14 +352,12 @@ ...@@ -350,14 +352,12 @@
}, },
{ {
"model": "process.workerversion", "model": "process.workerversion",
"pk": "f62b2301-0447-4848-9848-a731ad801d60", "pk": "d822aa98-530d-46a9-b82b-d64eeb4668a6",
"fields": { "fields": {
"worker": "9775f6a1-6238-4943-b245-b69bde621912", "worker": "d757e5ad-a03e-4e81-bf81-0b2a8719220e",
"revision": "2d087aa1-82ba-4ec5-af14-c19e4213f913", "revision": "179c0b17-cfa7-4157-bba0-83c83d58ee62",
"version": null, "version": null,
"configuration": { "configuration": {},
"test": 42
},
"state": "available", "state": "available",
"gpu_usage": "disabled", "gpu_usage": "disabled",
"model_usage": "disabled", "model_usage": "disabled",
...@@ -369,10 +369,10 @@ ...@@ -369,10 +369,10 @@
}, },
{ {
"model": "process.workerrun", "model": "process.workerrun",
"pk": "14356945-e3a4-4d8b-b9b2-b4bc5e9287cc", "pk": "2dee3bf1-8c3a-4999-ae74-6801a141eea5",
"fields": { "fields": {
"process": "76506eee-43ab-4caa-966c-9e8e5d10ef93", "process": "fb8b6046-9aa6-454d-8e0b-472f93605016",
"version": "229fc630-728b-421b-a2de-9618bd8e401f", "version": "194b33ea-4a45-4884-9a89-dd04c5a65fc3",
"model_version": null, "model_version": null,
"parents": "[]", "parents": "[]",
"configuration": null, "configuration": null,
...@@ -384,14 +384,14 @@ ...@@ -384,14 +384,14 @@
}, },
{ {
"model": "process.workerrun", "model": "process.workerrun",
"pk": "2f828b7f-c169-4a8e-9555-0b4060e05641", "pk": "54d16192-ce9d-4fad-9e4b-b5692787a03a",
"fields": { "fields": {
"process": "7a6fed8c-ed9c-4714-8036-7048462ce0f2", "process": "6fb4ded9-ab97-4764-b0b0-4a7040556cde",
"version": "928cfe44-77bc-4cb1-84d2-f02006bd61d5", "version": "9da1ac9d-0ff7-44fc-923f-3076a5bead35",
"model_version": null, "model_version": null,
"parents": "[]", "parents": "[]",
"configuration": null, "configuration": null,
"summary": "Worker Document layout analyser @ 928cfe", "summary": "Worker Document layout analyser @ 9da1ac",
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"has_results": false "has_results": false
...@@ -399,14 +399,14 @@ ...@@ -399,14 +399,14 @@
}, },
{ {
"model": "process.workerrun", "model": "process.workerrun",
"pk": "25e12096-d55e-4137-a954-3c344fc244bd", "pk": "c2f94771-d640-4c59-9920-a602c85fba61",
"fields": { "fields": {
"process": "7a6fed8c-ed9c-4714-8036-7048462ce0f2", "process": "6fb4ded9-ab97-4764-b0b0-4a7040556cde",
"version": "f62b2301-0447-4848-9848-a731ad801d60", "version": "505988ea-21cb-4011-ad87-48bdab37237d",
"model_version": null, "model_version": null,
"parents": "[\"2f828b7f-c169-4a8e-9555-0b4060e05641\"]", "parents": "[\"54d16192-ce9d-4fad-9e4b-b5692787a03a\"]",
"configuration": null, "configuration": null,
"summary": "Worker Recognizer @ f62b23", "summary": "Worker Recognizer @ 505988",
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"has_results": false "has_results": false
...@@ -414,10 +414,10 @@ ...@@ -414,10 +414,10 @@
}, },
{ {
"model": "process.workerrun", "model": "process.workerrun",
"pk": "c2eb8dbb-584e-460a-8f0d-b6a7dc79f838", "pk": "f3246aec-23a7-4127-8368-5bec73b3e7cc",
"fields": { "fields": {
"process": "b6b7dbcb-e134-4274-93fd-9d6d06818c6f", "process": "89fbd695-bd87-4a1d-afef-8647a30d3ccc",
"version": "229fc630-728b-421b-a2de-9618bd8e401f", "version": "194b33ea-4a45-4884-9a89-dd04c5a65fc3",
"model_version": null, "model_version": null,
"parents": "[]", "parents": "[]",
"configuration": null, "configuration": null,
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
}, },
{ {
"model": "documents.corpus", "model": "documents.corpus",
"pk": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "pk": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
...@@ -442,9 +442,9 @@ ...@@ -442,9 +442,9 @@
}, },
{ {
"model": "documents.elementtype", "model": "documents.elementtype",
"pk": "329625fb-1514-492a-9567-e231f7646648", "pk": "264b7ce8-9232-49db-bda8-6c081c6817a0",
"fields": { "fields": {
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"slug": "page", "slug": "page",
"display_name": "Page", "display_name": "Page",
"folder": false, "folder": false,
...@@ -454,9 +454,9 @@ ...@@ -454,9 +454,9 @@
}, },
{ {
"model": "documents.elementtype", "model": "documents.elementtype",
"pk": "ab1c133b-71d0-4928-b388-7c12345a8416", "pk": "81ac6918-ad4b-4b0d-a9e2-b6c3b4e2421f",
"fields": { "fields": {
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"slug": "text_line", "slug": "text_line",
"display_name": "Line", "display_name": "Line",
"folder": false, "folder": false,
...@@ -466,9 +466,9 @@ ...@@ -466,9 +466,9 @@
}, },
{ {
"model": "documents.elementtype", "model": "documents.elementtype",
"pk": "c196f23a-6843-48e1-a885-c7cda27e64ca", "pk": "879b6e87-d531-4f61-a5fd-a943f6458e4f",
"fields": { "fields": {
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"slug": "act", "slug": "act",
"display_name": "Act", "display_name": "Act",
"folder": false, "folder": false,
...@@ -478,9 +478,9 @@ ...@@ -478,9 +478,9 @@
}, },
{ {
"model": "documents.elementtype", "model": "documents.elementtype",
"pk": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "pk": "917c264f-4b42-4335-a21f-9518056a7915",
"fields": { "fields": {
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"slug": "word", "slug": "word",
"display_name": "Word", "display_name": "Word",
"folder": false, "folder": false,
...@@ -490,9 +490,9 @@ ...@@ -490,9 +490,9 @@
}, },
{ {
"model": "documents.elementtype", "model": "documents.elementtype",
"pk": "e28100cb-49a4-4837-a9ae-81a519ebb43f", "pk": "9c789715-ee58-4259-af53-6a83d5448223",
"fields": { "fields": {
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"slug": "volume", "slug": "volume",
"display_name": "Volume", "display_name": "Volume",
"folder": true, "folder": true,
...@@ -502,9 +502,9 @@ ...@@ -502,9 +502,9 @@
}, },
{ {
"model": "documents.elementtype", "model": "documents.elementtype",
"pk": "efc85dfd-913e-4979-bb60-d6bf0c7dcd2d", "pk": "fa2c1395-9f8d-498e-84c4-db996ec47e03",
"fields": { "fields": {
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"slug": "surface", "slug": "surface",
"display_name": "Surface", "display_name": "Surface",
"folder": false, "folder": false,
...@@ -514,278 +514,278 @@ ...@@ -514,278 +514,278 @@
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "06ab62e0-e9e7-4353-967d-a798806f7e8a", "pk": "035f294c-06c7-4acf-b3af-2fdff88efdaf",
"fields": { "fields": {
"element": "9fc5e0a3-9afb-493e-bf0f-fc2998ba4ba4", "element": "f531f9a8-b826-4e87-bad3-edcd17cd435f",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"700c1fd5-1f67-4180-aea0-9d6533df44a4\"]",
"ordering": 0 "ordering": 1
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "156e125d-4550-4a72-a124-3b5e7fe25e77", "pk": "04d6c275-9b31-4af2-8dfe-0065e7527403",
"fields": { "fields": {
"element": "c8e488da-28d8-467e-a651-7d6f2ad6600d", "element": "17517c85-cf36-4841-9577-391c8b343914",
"path": "[\"2cd80ca1-7d55-4750-8c90-2b693e14a058\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"eedc30d8-ef94-40f6-843e-1900d15e47de\"]",
"ordering": 2 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "17526830-1f55-41e1-82c5-6faf34831a0d", "pk": "0907474b-202a-4e14-8b4f-3614a17be95c",
"fields": { "fields": {
"element": "7ea6161f-62f5-4bdf-9412-bbc4d13b3e6f", "element": "f20e8dd9-285b-4e9c-ba5c-4f63cdb2aaf8",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"d9744e02-66ef-424e-a71c-88b94b209688\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"700c1fd5-1f67-4180-aea0-9d6533df44a4\"]",
"ordering": 0 "ordering": 2
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "210c3ff2-1aac-4b1d-bcff-67a76b2bc4f9", "pk": "0b627a4d-277c-4448-a21e-07a47f2ba855",
"fields": { "fields": {
"element": "e7027313-7910-44b4-bdff-28e8d187c0b4", "element": "49b598b6-07a5-468f-aac0-e94a4ad06a6d",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\"]", "path": "[]",
"ordering": 5 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "21af7d64-10db-43f4-a0dd-386be73314cd", "pk": "12c39026-aa6b-4d71-b3e9-94fef1256ef7",
"fields": { "fields": {
"element": "2df1881f-d666-43c9-8af7-507b277c4e23", "element": "2dbf8cc9-cc10-4604-8eb5-de5f3718aa17",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"02a6f67e-c7d4-4dec-b3a0-9f9ab3f2ee99\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\"]",
"ordering": 1 "ordering": 1
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "262709fc-3d1f-46e2-8ba5-5c63b8d2b96f", "pk": "13b02e99-d065-4b34-92fb-33a653d58c13",
"fields": { "fields": {
"element": "d9744e02-66ef-424e-a71c-88b94b209688", "element": "1c02b4cc-858a-47bc-abaf-2549df1ef749",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"a433b9be-bf1d-4abd-840d-68401750c442\"]",
"ordering": 7 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "32644adb-c33b-47bd-befe-f5d2142d60ee", "pk": "2c99fbb0-fde9-4e4f-ae87-c1e74e34edf9",
"fields": { "fields": {
"element": "ec742315-a1e6-4cf2-96c0-abe2b0e0e3fc", "element": "700c1fd5-1f67-4180-aea0-9d6533df44a4",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"9fc5e0a3-9afb-493e-bf0f-fc2998ba4ba4\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\"]",
"ordering": 2 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "3a86e5d2-3c7c-474f-82b1-60dae09a82b4", "pk": "493be254-9117-474d-9a1a-16c7ed4c70d2",
"fields": { "fields": {
"element": "dc66eac3-a4e9-4c55-a4a8-d239bd79f3f6", "element": "a9a1a2ea-72bd-4649-9e12-e922884bd0e0",
"path": "[\"2cd80ca1-7d55-4750-8c90-2b693e14a058\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"7d480460-0ab0-4471-a445-f72f2be75b9a\"]",
"ordering": 1 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "5a8ae44a-8e2c-4eed-a1f1-c7ddcd4a093d", "pk": "64a5fefb-5132-48ee-bad9-03eadcb30b68",
"fields": { "fields": {
"element": "b8d9cf10-dc77-4a41-90f8-badf9718ebb9", "element": "173b6549-a747-446d-b073-567ec53f4a10",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"f530bd2f-d0ab-4f14-9d98-087486c4b1ab\"]", "path": "[\"99777763-3b04-4a00-a6bc-ffdfe840243f\"]",
"ordering": 0 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "650ef880-9d63-4164-8d50-b7dff16ca738", "pk": "7e5c2329-ccd5-45c3-9192-b5815a35de00",
"fields": { "fields": {
"element": "aec1257f-bcbe-41d5-8983-966da539e912", "element": "fc21b00e-fe72-4be3-83f7-beb2b775f0a3",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"e7027313-7910-44b4-bdff-28e8d187c0b4\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"21e28831-aac0-4e11-b44a-4bcbd0f4ddf7\"]",
"ordering": 0 "ordering": 1
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "666416c1-5aa0-4f57-a21f-b7585b10efd2", "pk": "88c8f446-d600-4750-9ebc-c1514b67a645",
"fields": { "fields": {
"element": "f75ca797-0067-4711-b899-6ed39b0a6f1a", "element": "a433b9be-bf1d-4abd-840d-68401750c442",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\"]",
"ordering": 4 "ordering": 3
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "6f42e63d-d4ba-495b-8e22-e059577c669f", "pk": "9d405bca-c0c0-4ce2-ad98-b4ff2c292aaf",
"fields": { "fields": {
"element": "f530bd2f-d0ab-4f14-9d98-087486c4b1ab", "element": "2b49f87c-e879-48b1-a7c2-9f173f62baf5",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"700c1fd5-1f67-4180-aea0-9d6533df44a4\"]",
"ordering": 1 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "72864cf7-e163-47c5-9a40-49a253e8cece", "pk": "a394a82c-8ee9-4fce-a1c4-3b4475d85477",
"fields": { "fields": {
"element": "39210eb6-70a9-4660-8a45-5c6957508936", "element": "17419d59-90af-4e7f-8052-5425e5444e80",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"2dbf8cc9-cc10-4604-8eb5-de5f3718aa17\"]",
"ordering": 3 "ordering": 1
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "733ddae3-62e2-433a-b322-41bb6502ac93", "pk": "a6089453-c63c-49a8-8a9d-fc05eac6d7c8",
"fields": { "fields": {
"element": "34cd2540-0a05-4812-add5-f24c08d46f73", "element": "7841e9f9-f71f-4582-8cca-844cb55210be",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"1d0f7ea6-6455-4a8d-ade2-a853f8ab7e08\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"93c849a1-9e56-4fc8-a3a7-14200103482c\"]",
"ordering": 0 "ordering": 2
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "79ecb1ed-8036-4e88-a659-605fb3b5c8aa", "pk": "a788c955-06f6-404d-a48c-4526089a6589",
"fields": { "fields": {
"element": "1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02", "element": "7f3e6a59-1bf6-4236-afba-dcecbfb38088",
"path": "[]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"700c1fd5-1f67-4180-aea0-9d6533df44a4\"]",
"ordering": 0 "ordering": 3
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "7d21ba65-6fc5-47db-995c-b4d8e8520c7c", "pk": "b2cfb1dd-4d11-4b9e-b757-03ce49f20d10",
"fields": { "fields": {
"element": "9754d5ef-2888-4083-97b0-c9593321d8d1", "element": "580235a9-4050-45f2-b194-2c62ef69051e",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"9fc5e0a3-9afb-493e-bf0f-fc2998ba4ba4\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"93c849a1-9e56-4fc8-a3a7-14200103482c\"]",
"ordering": 3 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "88d64d5e-3fba-450d-a9a8-5c7424559bbf", "pk": "b30f2781-b3e3-4e13-b767-2dc354752772",
"fields": { "fields": {
"element": "2039b7b8-15cb-4b1f-a9e6-c681aa20e13a", "element": "93c849a1-9e56-4fc8-a3a7-14200103482c",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"f530bd2f-d0ab-4f14-9d98-087486c4b1ab\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\"]",
"ordering": 2 "ordering": 2
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "968de6aa-0d1c-47cc-ad94-02c2b59a2d79", "pk": "b47d5414-1cbe-46f7-9a8c-7e11bcd5f5b8",
"fields": { "fields": {
"element": "9b478489-dd49-431b-8c51-f78ba7699f30", "element": "7d480460-0ab0-4471-a445-f72f2be75b9a",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"f75ca797-0067-4711-b899-6ed39b0a6f1a\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\"]",
"ordering": 0 "ordering": 6
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "9bdf9f6d-b114-443e-86fb-592a0ad362af", "pk": "c1022f9a-8b8f-4c9c-abc6-0742b78be4cf",
"fields": { "fields": {
"element": "e9aa6eb2-eb0b-4503-9bbf-c3d27b9cce5f", "element": "ea1947f6-dc20-447f-87f3-c46ef20cb3f1",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"9fc5e0a3-9afb-493e-bf0f-fc2998ba4ba4\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"d23ebc38-5318-46fc-bc1a-62466806723d\"]",
"ordering": 1 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "9c452d82-87c2-406c-add5-2556559e14f5", "pk": "c724d4e4-e4df-48ab-9e19-851ac25674be",
"fields": { "fields": {
"element": "d82d4181-3ec4-45c2-b2cc-825d1382274f", "element": "786a05b3-28db-45f9-9386-d86e4bd2370e",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"f75ca797-0067-4711-b899-6ed39b0a6f1a\"]", "path": "[\"99777763-3b04-4a00-a6bc-ffdfe840243f\"]",
"ordering": 1 "ordering": 1
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "a599aafe-89d3-4589-8c6c-e20bf9f32efa", "pk": "c8d274f4-fef2-4cbf-b6e2-455024b6b288",
"fields": { "fields": {
"element": "02a6f67e-c7d4-4dec-b3a0-9f9ab3f2ee99", "element": "599a7d5a-63c5-4695-b6e3-8b164fbc9ebb",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"2dbf8cc9-cc10-4604-8eb5-de5f3718aa17\"]",
"ordering": 2 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "b6ddde5c-f6de-433b-b9c3-c9afa288216f", "pk": "c9a3c855-9735-4e0d-916c-573bf789a142",
"fields": { "fields": {
"element": "1d0f7ea6-6455-4a8d-ade2-a853f8ab7e08", "element": "99777763-3b04-4a00-a6bc-ffdfe840243f",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\"]", "path": "[]",
"ordering": 6 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "c0f23fcf-1c63-4af2-b8b2-af0865b6dd9e", "pk": "ca75fe24-7090-438d-a822-20a228987cc3",
"fields": { "fields": {
"element": "2e8101c4-6fca-49b6-9b7b-41554facfa01", "element": "d23ebc38-5318-46fc-bc1a-62466806723d",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"02a6f67e-c7d4-4dec-b3a0-9f9ab3f2ee99\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\"]",
"ordering": 2 "ordering": 5
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "c614c8aa-de22-477f-bdb1-ef83ce7ab055", "pk": "cc426fcb-7bf6-42da-b4d1-ed6aa49296cf",
"fields": { "fields": {
"element": "4fed0e6a-9e3f-4e59-9c70-c5e74cc6d73c", "element": "236b450d-874b-40c9-9945-a7307a3be8d9",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"02a6f67e-c7d4-4dec-b3a0-9f9ab3f2ee99\"]", "path": "[\"99777763-3b04-4a00-a6bc-ffdfe840243f\"]",
"ordering": 0 "ordering": 2
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "c8bc7413-c96b-4047-8782-87a37cfc520b", "pk": "d1a618e3-a489-479d-ba73-22f111f8e94b",
"fields": { "fields": {
"element": "344f6b5b-b001-4084-950c-1925fdd2eef4", "element": "c31953e0-1723-45ba-9fd2-4e06611b164a",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"9fc5e0a3-9afb-493e-bf0f-fc2998ba4ba4\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"21e28831-aac0-4e11-b44a-4bcbd0f4ddf7\"]",
"ordering": 0 "ordering": 0
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "d06e1ff9-6dd5-4808-a035-bb2a0e7bd428", "pk": "d2e92f0f-0551-4e12-8fc5-d2d85f9b458c",
"fields": { "fields": {
"element": "2cd80ca1-7d55-4750-8c90-2b693e14a058", "element": "eedc30d8-ef94-40f6-843e-1900d15e47de",
"path": "[]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\"]",
"ordering": 0 "ordering": 7
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "d14e67c9-f5a9-4c81-ae3d-64599eb166a4", "pk": "dab68042-3da7-4bec-8a52-ae8fce056ca2",
"fields": { "fields": {
"element": "b3c0b2bb-f53e-401a-ae19-bc7f2ec31179", "element": "642de90b-27a0-4eb3-8742-000faa53f765",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"39210eb6-70a9-4660-8a45-5c6957508936\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"93c849a1-9e56-4fc8-a3a7-14200103482c\"]",
"ordering": 0 "ordering": 1
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "e3be0287-6213-4588-9407-6407c0de1d72", "pk": "dc2c3dde-fab6-4db7-8fec-cffe85ed4564",
"fields": { "fields": {
"element": "9c42123c-b940-4695-b083-5b19392f68a6", "element": "43f1b64e-44a9-4648-a46c-0b605b420bd7",
"path": "[\"2cd80ca1-7d55-4750-8c90-2b693e14a058\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\", \"2dbf8cc9-cc10-4604-8eb5-de5f3718aa17\"]",
"ordering": 0 "ordering": 2
} }
}, },
{ {
"model": "documents.elementpath", "model": "documents.elementpath",
"pk": "f4e4b076-bbfc-4c4e-90d2-060f1c0f3c89", "pk": "f6f57c2b-3d4b-4e80-b320-d4d7acc38935",
"fields": { "fields": {
"element": "86304b47-3d6a-48dd-a903-d0e09cde91ba", "element": "21e28831-aac0-4e11-b44a-4bcbd0f4ddf7",
"path": "[\"1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02\", \"f530bd2f-d0ab-4f14-9d98-087486c4b1ab\"]", "path": "[\"49b598b6-07a5-468f-aac0-e94a4ad06a6d\"]",
"ordering": 1 "ordering": 4
} }
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "02a6f67e-c7d4-4dec-b3a0-9f9ab3f2ee99", "pk": "173b6549-a747-446d-b073-567ec53f4a10",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "329625fb-1514-492a-9567-e231f7646648", "type": "264b7ce8-9232-49db-bda8-6c081c6817a0",
"name": "Volume 1, page 2r", "name": "Volume 2, page 1r",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "a38b69a3-a4f8-4dfc-a6b9-38ea2e52c713", "image": "0fceb46b-af14-4568-984e-ac26ceb06fa4",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)", "polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
...@@ -794,18 +794,18 @@ ...@@ -794,18 +794,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "1d0f7ea6-6455-4a8d-ade2-a853f8ab7e08", "pk": "17419d59-90af-4e7f-8052-5425e5444e80",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "c196f23a-6843-48e1-a885-c7cda27e64ca", "type": "917c264f-4b42-4335-a21f-9518056a7915",
"name": "Act 4", "name": "ROY",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": null, "image": "a4fef864-b712-41df-97cf-29b774450df8",
"polygon": null, "polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -813,18 +813,18 @@ ...@@ -813,18 +813,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "1d4b82fe-f9c5-4012-a9ae-c2ff83c9cc02", "pk": "17517c85-cf36-4841-9577-391c8b343914",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "e28100cb-49a4-4837-a9ae-81a519ebb43f", "type": "fa2c1395-9f8d-498e-84c4-db996ec47e03",
"name": "Volume 1", "name": "Surface F",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": null, "image": "e48347c1-2047-4e9a-b567-52a9e7b71ac6",
"polygon": null, "polygon": "LINEARRING (600 600, 600 1000, 1000 1000, 1000 600, 600 600)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -832,18 +832,18 @@ ...@@ -832,18 +832,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "2039b7b8-15cb-4b1f-a9e6-c681aa20e13a", "pk": "1c02b4cc-858a-47bc-abaf-2549df1ef749",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "type": "fa2c1395-9f8d-498e-84c4-db996ec47e03",
"name": "DATUM", "name": "Surface A",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f5ddf7e0-3dd3-4f4f-ada6-f42de7be869d", "image": "bd3c8ee4-358a-4a50-90f6-1080b910d615",
"polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)", "polygon": "LINEARRING (0 0, 0 600, 600 600, 600 0, 0 0)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -851,13 +851,13 @@ ...@@ -851,13 +851,13 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "2cd80ca1-7d55-4750-8c90-2b693e14a058", "pk": "21e28831-aac0-4e11-b44a-4bcbd0f4ddf7",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "e28100cb-49a4-4837-a9ae-81a519ebb43f", "type": "879b6e87-d531-4f61-a5fd-a943f6458e4f",
"name": "Volume 2", "name": "Act 2",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
...@@ -870,18 +870,18 @@ ...@@ -870,18 +870,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "2df1881f-d666-43c9-8af7-507b277c4e23", "pk": "236b450d-874b-40c9-9945-a7307a3be8d9",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "type": "264b7ce8-9232-49db-bda8-6c081c6817a0",
"name": "ROY", "name": "Volume 2, page 2r",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "a38b69a3-a4f8-4dfc-a6b9-38ea2e52c713", "image": "a43940c0-254f-4920-b725-7f063bcc0b50",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)", "polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -889,18 +889,18 @@ ...@@ -889,18 +889,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "2e8101c4-6fca-49b6-9b7b-41554facfa01", "pk": "2b49f87c-e879-48b1-a7c2-9f173f62baf5",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "type": "917c264f-4b42-4335-a21f-9518056a7915",
"name": "DATUM", "name": "PARIS",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "a38b69a3-a4f8-4dfc-a6b9-38ea2e52c713", "image": "bd3c8ee4-358a-4a50-90f6-1080b910d615",
"polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)", "polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -908,18 +908,18 @@ ...@@ -908,18 +908,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "344f6b5b-b001-4084-950c-1925fdd2eef4", "pk": "2dbf8cc9-cc10-4604-8eb5-de5f3718aa17",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "type": "264b7ce8-9232-49db-bda8-6c081c6817a0",
"name": "PARIS", "name": "Volume 1, page 1v",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f250d3f3-bd56-4a2f-bffc-fc3a33cd1902", "image": "a4fef864-b712-41df-97cf-29b774450df8",
"polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)", "polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -927,18 +927,18 @@ ...@@ -927,18 +927,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "34cd2540-0a05-4812-add5-f24c08d46f73", "pk": "43f1b64e-44a9-4648-a46c-0b605b420bd7",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "efc85dfd-913e-4979-bb60-d6bf0c7dcd2d", "type": "917c264f-4b42-4335-a21f-9518056a7915",
"name": "Surface E", "name": "DATUM",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "a38b69a3-a4f8-4dfc-a6b9-38ea2e52c713", "image": "a4fef864-b712-41df-97cf-29b774450df8",
"polygon": "LINEARRING (300 300, 300 600, 600 600, 600 300, 300 300)", "polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -946,13 +946,13 @@ ...@@ -946,13 +946,13 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "39210eb6-70a9-4660-8a45-5c6957508936", "pk": "49b598b6-07a5-468f-aac0-e94a4ad06a6d",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "c196f23a-6843-48e1-a885-c7cda27e64ca", "type": "9c789715-ee58-4259-af53-6a83d5448223",
"name": "Act 1", "name": "Volume 1",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
...@@ -965,17 +965,17 @@ ...@@ -965,17 +965,17 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "4fed0e6a-9e3f-4e59-9c70-c5e74cc6d73c", "pk": "580235a9-4050-45f2-b194-2c62ef69051e",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "type": "917c264f-4b42-4335-a21f-9518056a7915",
"name": "PARIS", "name": "PARIS",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "a38b69a3-a4f8-4dfc-a6b9-38ea2e52c713", "image": "e48347c1-2047-4e9a-b567-52a9e7b71ac6",
"polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)", "polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
...@@ -984,18 +984,18 @@ ...@@ -984,18 +984,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "7ea6161f-62f5-4bdf-9412-bbc4d13b3e6f", "pk": "599a7d5a-63c5-4695-b6e3-8b164fbc9ebb",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "efc85dfd-913e-4979-bb60-d6bf0c7dcd2d", "type": "917c264f-4b42-4335-a21f-9518056a7915",
"name": "Surface F", "name": "PARIS",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "a38b69a3-a4f8-4dfc-a6b9-38ea2e52c713", "image": "a4fef864-b712-41df-97cf-29b774450df8",
"polygon": "LINEARRING (600 600, 600 1000, 1000 1000, 1000 600, 600 600)", "polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1003,17 +1003,17 @@ ...@@ -1003,17 +1003,17 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "86304b47-3d6a-48dd-a903-d0e09cde91ba", "pk": "642de90b-27a0-4eb3-8742-000faa53f765",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "type": "917c264f-4b42-4335-a21f-9518056a7915",
"name": "ROY", "name": "ROY",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f5ddf7e0-3dd3-4f4f-ada6-f42de7be869d", "image": "e48347c1-2047-4e9a-b567-52a9e7b71ac6",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)", "polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
...@@ -1022,18 +1022,18 @@ ...@@ -1022,18 +1022,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "9754d5ef-2888-4083-97b0-c9593321d8d1", "pk": "700c1fd5-1f67-4180-aea0-9d6533df44a4",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "ab1c133b-71d0-4928-b388-7c12345a8416", "type": "264b7ce8-9232-49db-bda8-6c081c6817a0",
"name": "Text line", "name": "Volume 1, page 1r",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f250d3f3-bd56-4a2f-bffc-fc3a33cd1902", "image": "bd3c8ee4-358a-4a50-90f6-1080b910d615",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)", "polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1041,18 +1041,18 @@ ...@@ -1041,18 +1041,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "9b478489-dd49-431b-8c51-f78ba7699f30", "pk": "7841e9f9-f71f-4582-8cca-844cb55210be",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "efc85dfd-913e-4979-bb60-d6bf0c7dcd2d", "type": "917c264f-4b42-4335-a21f-9518056a7915",
"name": "Surface B", "name": "DATUM",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f250d3f3-bd56-4a2f-bffc-fc3a33cd1902", "image": "e48347c1-2047-4e9a-b567-52a9e7b71ac6",
"polygon": "LINEARRING (600 600, 600 1000, 1000 1000, 1000 600, 600 600)", "polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1060,17 +1060,17 @@ ...@@ -1060,17 +1060,17 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "9c42123c-b940-4695-b083-5b19392f68a6", "pk": "786a05b3-28db-45f9-9386-d86e4bd2370e",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "329625fb-1514-492a-9567-e231f7646648", "type": "264b7ce8-9232-49db-bda8-6c081c6817a0",
"name": "Volume 2, page 1r", "name": "Volume 2, page 1v",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "468df2f7-e22a-4dba-96d2-9c464ba6c2b0", "image": "7b3e5017-0c57-45da-aef8-fff14feba411",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)", "polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
...@@ -1079,18 +1079,18 @@ ...@@ -1079,18 +1079,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "9fc5e0a3-9afb-493e-bf0f-fc2998ba4ba4", "pk": "7d480460-0ab0-4471-a445-f72f2be75b9a",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "329625fb-1514-492a-9567-e231f7646648", "type": "879b6e87-d531-4f61-a5fd-a943f6458e4f",
"name": "Volume 1, page 1r", "name": "Act 4",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f250d3f3-bd56-4a2f-bffc-fc3a33cd1902", "image": null,
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)", "polygon": null,
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1098,18 +1098,18 @@ ...@@ -1098,18 +1098,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "aec1257f-bcbe-41d5-8983-966da539e912", "pk": "7f3e6a59-1bf6-4236-afba-dcecbfb38088",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "efc85dfd-913e-4979-bb60-d6bf0c7dcd2d", "type": "81ac6918-ad4b-4b0d-a9e2-b6c3b4e2421f",
"name": "Surface D", "name": "Text line",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "a38b69a3-a4f8-4dfc-a6b9-38ea2e52c713", "image": "bd3c8ee4-358a-4a50-90f6-1080b910d615",
"polygon": "LINEARRING (0 0, 0 300, 300 300, 300 0, 0 0)", "polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1117,18 +1117,18 @@ ...@@ -1117,18 +1117,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "b3c0b2bb-f53e-401a-ae19-bc7f2ec31179", "pk": "93c849a1-9e56-4fc8-a3a7-14200103482c",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "efc85dfd-913e-4979-bb60-d6bf0c7dcd2d", "type": "264b7ce8-9232-49db-bda8-6c081c6817a0",
"name": "Surface A", "name": "Volume 1, page 2r",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f250d3f3-bd56-4a2f-bffc-fc3a33cd1902", "image": "e48347c1-2047-4e9a-b567-52a9e7b71ac6",
"polygon": "LINEARRING (0 0, 0 600, 600 600, 600 0, 0 0)", "polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1136,18 +1136,18 @@ ...@@ -1136,18 +1136,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "b8d9cf10-dc77-4a41-90f8-badf9718ebb9", "pk": "99777763-3b04-4a00-a6bc-ffdfe840243f",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "type": "9c789715-ee58-4259-af53-6a83d5448223",
"name": "PARIS", "name": "Volume 2",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f5ddf7e0-3dd3-4f4f-ada6-f42de7be869d", "image": null,
"polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)", "polygon": null,
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1155,18 +1155,18 @@ ...@@ -1155,18 +1155,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "c8e488da-28d8-467e-a651-7d6f2ad6600d", "pk": "a433b9be-bf1d-4abd-840d-68401750c442",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "329625fb-1514-492a-9567-e231f7646648", "type": "879b6e87-d531-4f61-a5fd-a943f6458e4f",
"name": "Volume 2, page 2r", "name": "Act 1",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "53421855-db25-4abd-aba4-d86710a76d5d", "image": null,
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)", "polygon": null,
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1174,18 +1174,18 @@ ...@@ -1174,18 +1174,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "d82d4181-3ec4-45c2-b2cc-825d1382274f", "pk": "a9a1a2ea-72bd-4649-9e12-e922884bd0e0",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "efc85dfd-913e-4979-bb60-d6bf0c7dcd2d", "type": "fa2c1395-9f8d-498e-84c4-db996ec47e03",
"name": "Surface C", "name": "Surface E",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f5ddf7e0-3dd3-4f4f-ada6-f42de7be869d", "image": "e48347c1-2047-4e9a-b567-52a9e7b71ac6",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)", "polygon": "LINEARRING (300 300, 300 600, 600 600, 600 300, 300 300)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1193,18 +1193,18 @@ ...@@ -1193,18 +1193,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "d9744e02-66ef-424e-a71c-88b94b209688", "pk": "c31953e0-1723-45ba-9fd2-4e06611b164a",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "c196f23a-6843-48e1-a885-c7cda27e64ca", "type": "fa2c1395-9f8d-498e-84c4-db996ec47e03",
"name": "Act 5", "name": "Surface B",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": null, "image": "bd3c8ee4-358a-4a50-90f6-1080b910d615",
"polygon": null, "polygon": "LINEARRING (600 600, 600 1000, 1000 1000, 1000 600, 600 600)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1212,18 +1212,18 @@ ...@@ -1212,18 +1212,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "dc66eac3-a4e9-4c55-a4a8-d239bd79f3f6", "pk": "d23ebc38-5318-46fc-bc1a-62466806723d",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "329625fb-1514-492a-9567-e231f7646648", "type": "879b6e87-d531-4f61-a5fd-a943f6458e4f",
"name": "Volume 2, page 1v", "name": "Act 3",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "27c0757d-4d15-4f0e-bfc1-ec63bfada9e7", "image": null,
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)", "polygon": null,
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1231,18 +1231,18 @@ ...@@ -1231,18 +1231,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "e7027313-7910-44b4-bdff-28e8d187c0b4", "pk": "ea1947f6-dc20-447f-87f3-c46ef20cb3f1",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "c196f23a-6843-48e1-a885-c7cda27e64ca", "type": "fa2c1395-9f8d-498e-84c4-db996ec47e03",
"name": "Act 3", "name": "Surface D",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": null, "image": "e48347c1-2047-4e9a-b567-52a9e7b71ac6",
"polygon": null, "polygon": "LINEARRING (0 0, 0 300, 300 300, 300 0, 0 0)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1250,18 +1250,18 @@ ...@@ -1250,18 +1250,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "e9aa6eb2-eb0b-4503-9bbf-c3d27b9cce5f", "pk": "eedc30d8-ef94-40f6-843e-1900d15e47de",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "type": "879b6e87-d531-4f61-a5fd-a943f6458e4f",
"name": "ROY", "name": "Act 5",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f250d3f3-bd56-4a2f-bffc-fc3a33cd1902", "image": null,
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)", "polygon": null,
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1269,17 +1269,17 @@ ...@@ -1269,17 +1269,17 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "ec742315-a1e6-4cf2-96c0-abe2b0e0e3fc", "pk": "f20e8dd9-285b-4e9c-ba5c-4f63cdb2aaf8",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "d15930a5-ebb8-40aa-968d-8bd2cf504230", "type": "917c264f-4b42-4335-a21f-9518056a7915",
"name": "DATUM", "name": "DATUM",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f250d3f3-bd56-4a2f-bffc-fc3a33cd1902", "image": "bd3c8ee4-358a-4a50-90f6-1080b910d615",
"polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)", "polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
...@@ -1288,18 +1288,18 @@ ...@@ -1288,18 +1288,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "f530bd2f-d0ab-4f14-9d98-087486c4b1ab", "pk": "f531f9a8-b826-4e87-bad3-edcd17cd435f",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "329625fb-1514-492a-9567-e231f7646648", "type": "917c264f-4b42-4335-a21f-9518056a7915",
"name": "Volume 1, page 1v", "name": "ROY",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": "f5ddf7e0-3dd3-4f4f-ada6-f42de7be869d", "image": "bd3c8ee4-358a-4a50-90f6-1080b910d615",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)", "polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1307,18 +1307,18 @@ ...@@ -1307,18 +1307,18 @@
}, },
{ {
"model": "documents.element", "model": "documents.element",
"pk": "f75ca797-0067-4711-b899-6ed39b0a6f1a", "pk": "fc21b00e-fe72-4be3-83f7-beb2b775f0a3",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "c196f23a-6843-48e1-a885-c7cda27e64ca", "type": "fa2c1395-9f8d-498e-84c4-db996ec47e03",
"name": "Act 2", "name": "Surface C",
"creator": null, "creator": null,
"worker_version": null, "worker_version": null,
"worker_run": null, "worker_run": null,
"image": null, "image": "a4fef864-b712-41df-97cf-29b774450df8",
"polygon": null, "polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0, "rotation_angle": 0,
"mirrored": false, "mirrored": false,
"confidence": null "confidence": null
...@@ -1326,103 +1326,103 @@ ...@@ -1326,103 +1326,103 @@
}, },
{ {
"model": "documents.entitytype", "model": "documents.entitytype",
"pk": "0199d0f3-a2e6-4422-9202-2be9fe6d9dff", "pk": "01c8c770-8bc0-4383-a87b-865439cad9c6",
"fields": { "fields": {
"name": "number", "name": "location",
"color": "ff0000", "color": "ff0000",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12" "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f"
} }
}, },
{ {
"model": "documents.entitytype", "model": "documents.entitytype",
"pk": "2b56b955-e322-4cb3-b66c-9de1ead52ead", "pk": "932468ff-0f6a-4c87-8e42-cbdfeb4de820",
"fields": { "fields": {
"name": "location", "name": "organization",
"color": "ff0000", "color": "ff0000",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12" "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f"
} }
}, },
{ {
"model": "documents.entitytype", "model": "documents.entitytype",
"pk": "493a7fd6-4d9b-4a42-bb1c-d4336852cf43", "pk": "a9b5bd96-fe1e-41b0-86d5-1686b5364a95",
"fields": { "fields": {
"name": "organization", "name": "person",
"color": "ff0000", "color": "ff0000",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12" "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f"
} }
}, },
{ {
"model": "documents.entitytype", "model": "documents.entitytype",
"pk": "7051555a-449f-4ebb-a519-f5b65517a520", "pk": "ba17ef5d-c875-4a13-b59c-7528417a6cb7",
"fields": { "fields": {
"name": "person", "name": "number",
"color": "ff0000", "color": "ff0000",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12" "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f"
} }
}, },
{ {
"model": "documents.entitytype", "model": "documents.entitytype",
"pk": "c6cb242c-688d-484f-87d1-42cabd41f67f", "pk": "f9659fe1-0955-4b9e-acff-561a0cb7356a",
"fields": { "fields": {
"name": "date", "name": "date",
"color": "ff0000", "color": "ff0000",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12" "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f"
} }
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "05882194-0210-441a-a167-f0b58cca0d2e", "pk": "2b15b4fd-d26b-4bce-8610-20348ad44887",
"fields": { "fields": {
"element": "2df1881f-d666-43c9-8af7-507b277c4e23", "element": "2b49f87c-e879-48b1-a7c2-9f173f62baf5",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "ROY", "text": "PARIS",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
"confidence": 1.0 "confidence": 1.0
} }
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "29dca1b6-8661-4bb5-933f-0b05ac7c30bb", "pk": "3725b78b-efdf-432a-bc75-ae91bcb54297",
"fields": { "fields": {
"element": "86304b47-3d6a-48dd-a903-d0e09cde91ba", "element": "700c1fd5-1f67-4180-aea0-9d6533df44a4",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "ROY", "text": "Lorem ipsum dolor sit amet",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
"confidence": 1.0 "confidence": 1.0
} }
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "413a4b08-c496-4925-a440-e9edad4a9dc1", "pk": "4a7546e6-9e00-4dc9-82ff-5ae9b8bfbfc7",
"fields": { "fields": {
"element": "b8d9cf10-dc77-4a41-90f8-badf9718ebb9", "element": "f20e8dd9-285b-4e9c-ba5c-4f63cdb2aaf8",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "PARIS", "text": "DATUM",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
"confidence": 1.0 "confidence": 1.0
} }
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "5107512b-9bda-4f59-98e0-a0ff40c76d11", "pk": "5717edbf-0c6e-4f92-95f0-b4088a023dde",
"fields": { "fields": {
"element": "ec742315-a1e6-4cf2-96c0-abe2b0e0e3fc", "element": "599a7d5a-63c5-4695-b6e3-8b164fbc9ebb",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "DATUM", "text": "PARIS",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
"confidence": 1.0 "confidence": 1.0
} }
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "5b4bd0f0-63fa-43d1-970f-a79c44784392", "pk": "5ed1f7ca-e777-4e30-86b3-4789197729be",
"fields": { "fields": {
"element": "344f6b5b-b001-4084-950c-1925fdd2eef4", "element": "580235a9-4050-45f2-b194-2c62ef69051e",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "PARIS", "text": "PARIS",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
...@@ -1431,22 +1431,22 @@ ...@@ -1431,22 +1431,22 @@
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "7e865edb-f16e-4406-a497-682e5a946593", "pk": "6d0e6148-db3a-446a-bb16-539ea4255c30",
"fields": { "fields": {
"element": "9fc5e0a3-9afb-493e-bf0f-fc2998ba4ba4", "element": "7841e9f9-f71f-4582-8cca-844cb55210be",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "Lorem ipsum dolor sit amet", "text": "DATUM",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
"confidence": 1.0 "confidence": 1.0
} }
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "b3ec03c1-fa36-4347-b3ad-64abf63ce10c", "pk": "7011525f-cae6-4582-b869-ebe16dd93764",
"fields": { "fields": {
"element": "2039b7b8-15cb-4b1f-a9e6-c681aa20e13a", "element": "43f1b64e-44a9-4648-a46c-0b605b420bd7",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "DATUM", "text": "DATUM",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
...@@ -1455,22 +1455,22 @@ ...@@ -1455,22 +1455,22 @@
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "bf9dddc1-c158-487c-99b4-37e0f7f44759", "pk": "b2595600-d142-4515-a427-3b4b2dcb2d5f",
"fields": { "fields": {
"element": "4fed0e6a-9e3f-4e59-9c70-c5e74cc6d73c", "element": "f531f9a8-b826-4e87-bad3-edcd17cd435f",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "PARIS", "text": "ROY",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
"confidence": 1.0 "confidence": 1.0
} }
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "e1978d01-9182-4a42-a76f-7ae776aaaf55", "pk": "c399e488-675b-49ac-bd6b-a4be34756e87",
"fields": { "fields": {
"element": "e9aa6eb2-eb0b-4503-9bbf-c3d27b9cce5f", "element": "642de90b-27a0-4eb3-8742-000faa53f765",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "ROY", "text": "ROY",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
...@@ -1479,51 +1479,51 @@ ...@@ -1479,51 +1479,51 @@
}, },
{ {
"model": "documents.transcription", "model": "documents.transcription",
"pk": "f5b81d19-ebb7-412d-9deb-455d72aaf829", "pk": "c7d484cd-3080-41aa-b24d-e51fba98ee4e",
"fields": { "fields": {
"element": "2e8101c4-6fca-49b6-9b7b-41554facfa01", "element": "17419d59-90af-4e7f-8052-5425e5444e80",
"worker_version": "f62b2301-0447-4848-9848-a731ad801d60", "worker_version": "505988ea-21cb-4011-ad87-48bdab37237d",
"worker_run": null, "worker_run": null,
"text": "DATUM", "text": "ROY",
"orientation": "horizontal-lr", "orientation": "horizontal-lr",
"confidence": 1.0 "confidence": 1.0
} }
}, },
{ {
"model": "documents.allowedmetadata", "model": "documents.allowedmetadata",
"pk": "6437fdd1-97c0-4fff-a325-039d0379bdbe", "pk": "43948eee-60c9-42e1-affd-c72312b7f18e",
"fields": { "fields": {
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "text", "type": "text",
"name": "folio" "name": "folio"
} }
}, },
{ {
"model": "documents.allowedmetadata", "model": "documents.allowedmetadata",
"pk": "89efa0fd-a187-4177-8de5-f3477dde921f", "pk": "58be7836-60ef-43b8-a6ea-e4472f2c0c31",
"fields": { "fields": {
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "location", "type": "date",
"name": "location" "name": "date"
} }
}, },
{ {
"model": "documents.allowedmetadata", "model": "documents.allowedmetadata",
"pk": "ab34cc71-a15a-40d9-8cc5-f680adca898b", "pk": "60567a85-e544-47c4-b300-774308d0a6e8",
"fields": { "fields": {
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"type": "date", "type": "location",
"name": "date" "name": "location"
} }
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "0ba82a45-7667-4673-9258-34bbb9175f10", "pk": "11db8db6-e672-4fff-bfd6-064a30f1091f",
"fields": { "fields": {
"element": "1d0f7ea6-6455-4a8d-ade2-a853f8ab7e08", "element": "786a05b3-28db-45f9-9386-d86e4bd2370e",
"name": "number", "name": "folio",
"type": "text", "type": "text",
"value": "4", "value": "1v",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1531,12 +1531,12 @@ ...@@ -1531,12 +1531,12 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "3e7bf01c-c9d6-4322-bd3f-def5438d7384", "pk": "2127a4b5-44d7-4198-b285-45d11263a250",
"fields": { "fields": {
"element": "d9744e02-66ef-424e-a71c-88b94b209688", "element": "236b450d-874b-40c9-9945-a7307a3be8d9",
"name": "number", "name": "folio",
"type": "text", "type": "text",
"value": "5", "value": "2r",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1544,12 +1544,12 @@ ...@@ -1544,12 +1544,12 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "52139b43-747a-4ffe-9f5c-cd43e0ad2b39", "pk": "46142d6e-2716-4b13-899d-e25557674722",
"fields": { "fields": {
"element": "e7027313-7910-44b4-bdff-28e8d187c0b4", "element": "a433b9be-bf1d-4abd-840d-68401750c442",
"name": "number", "name": "number",
"type": "text", "type": "text",
"value": "3", "value": "1",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1557,12 +1557,12 @@ ...@@ -1557,12 +1557,12 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "62347283-e04f-4401-a8a9-ff402766ac2d", "pk": "6764ffd2-7a40-4fb2-aa5d-b07be43ec12a",
"fields": { "fields": {
"element": "c8e488da-28d8-467e-a651-7d6f2ad6600d", "element": "700c1fd5-1f67-4180-aea0-9d6533df44a4",
"name": "folio", "name": "folio",
"type": "text", "type": "text",
"value": "2r", "value": "1r",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1570,12 +1570,12 @@ ...@@ -1570,12 +1570,12 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "660e0182-f139-4a4b-b65e-b60b3051ef4c", "pk": "6b1e5c6f-c428-4bfe-84d1-5d70579a9e7b",
"fields": { "fields": {
"element": "9c42123c-b940-4695-b083-5b19392f68a6", "element": "7d480460-0ab0-4471-a445-f72f2be75b9a",
"name": "folio", "name": "number",
"type": "text", "type": "text",
"value": "1r", "value": "4",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1583,12 +1583,12 @@ ...@@ -1583,12 +1583,12 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "af1f94f7-b9a8-4963-9e21-d4a8c34b2627", "pk": "7d543dfd-2e55-41fe-a396-41fd5f9aa37a",
"fields": { "fields": {
"element": "39210eb6-70a9-4660-8a45-5c6957508936", "element": "173b6549-a747-446d-b073-567ec53f4a10",
"name": "number", "name": "folio",
"type": "text", "type": "text",
"value": "1", "value": "1r",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1596,12 +1596,12 @@ ...@@ -1596,12 +1596,12 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "cb325348-d43a-404f-b7f1-06c2230840c5", "pk": "8587b8a7-9b30-4018-9295-c069a2d18662",
"fields": { "fields": {
"element": "f75ca797-0067-4711-b899-6ed39b0a6f1a", "element": "eedc30d8-ef94-40f6-843e-1900d15e47de",
"name": "number", "name": "number",
"type": "text", "type": "text",
"value": "2", "value": "5",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1609,9 +1609,9 @@ ...@@ -1609,9 +1609,9 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "da44df4c-a8ac-4bdc-a10b-ab6939ac76cd", "pk": "8ab6a879-c132-4712-a985-212c3ba5ccb9",
"fields": { "fields": {
"element": "dc66eac3-a4e9-4c55-a4a8-d239bd79f3f6", "element": "2dbf8cc9-cc10-4604-8eb5-de5f3718aa17",
"name": "folio", "name": "folio",
"type": "text", "type": "text",
"value": "1v", "value": "1v",
...@@ -1622,12 +1622,12 @@ ...@@ -1622,12 +1622,12 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "f55c81b9-bc87-4086-8cb1-b3a0eea6d491", "pk": "a85ec19b-c732-4485-9655-4b6f9ba236fe",
"fields": { "fields": {
"element": "f530bd2f-d0ab-4f14-9d98-087486c4b1ab", "element": "93c849a1-9e56-4fc8-a3a7-14200103482c",
"name": "folio", "name": "folio",
"type": "text", "type": "text",
"value": "1v", "value": "2r",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1635,12 +1635,12 @@ ...@@ -1635,12 +1635,12 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "fb0bedec-cc2d-424e-86bf-05239865e3fd", "pk": "c6840a9a-5db5-45d5-aeef-e231571b499e",
"fields": { "fields": {
"element": "02a6f67e-c7d4-4dec-b3a0-9f9ab3f2ee99", "element": "d23ebc38-5318-46fc-bc1a-62466806723d",
"name": "folio", "name": "number",
"type": "text", "type": "text",
"value": "2r", "value": "3",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1648,12 +1648,12 @@ ...@@ -1648,12 +1648,12 @@
}, },
{ {
"model": "documents.metadata", "model": "documents.metadata",
"pk": "fe60529e-30d4-4824-bb87-3534a652da81", "pk": "f8240bb3-b50b-46a6-924c-7ebf057db537",
"fields": { "fields": {
"element": "9fc5e0a3-9afb-493e-bf0f-fc2998ba4ba4", "element": "21e28831-aac0-4e11-b44a-4bcbd0f4ddf7",
"name": "folio", "name": "number",
"type": "text", "type": "text",
"value": "1r", "value": "2",
"entity": null, "entity": null,
"worker_version": null, "worker_version": null,
"worker_run": null "worker_run": null
...@@ -1676,12 +1676,12 @@ ...@@ -1676,12 +1676,12 @@
}, },
{ {
"model": "images.image", "model": "images.image",
"pk": "27c0757d-4d15-4f0e-bfc1-ec63bfada9e7", "pk": "0fceb46b-af14-4568-984e-ac26ceb06fa4",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"server": 1, "server": 1,
"path": "img5", "path": "img4",
"width": 1000, "width": 1000,
"height": 1000, "height": 1000,
"hash": null, "hash": null,
...@@ -1690,12 +1690,12 @@ ...@@ -1690,12 +1690,12 @@
}, },
{ {
"model": "images.image", "model": "images.image",
"pk": "468df2f7-e22a-4dba-96d2-9c464ba6c2b0", "pk": "7b3e5017-0c57-45da-aef8-fff14feba411",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"server": 1, "server": 1,
"path": "img4", "path": "img5",
"width": 1000, "width": 1000,
"height": 1000, "height": 1000,
"hash": null, "hash": null,
...@@ -1704,7 +1704,7 @@ ...@@ -1704,7 +1704,7 @@
}, },
{ {
"model": "images.image", "model": "images.image",
"pk": "53421855-db25-4abd-aba4-d86710a76d5d", "pk": "a43940c0-254f-4920-b725-7f063bcc0b50",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
...@@ -1718,12 +1718,12 @@ ...@@ -1718,12 +1718,12 @@
}, },
{ {
"model": "images.image", "model": "images.image",
"pk": "a38b69a3-a4f8-4dfc-a6b9-38ea2e52c713", "pk": "a4fef864-b712-41df-97cf-29b774450df8",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"server": 1, "server": 1,
"path": "img3", "path": "img2",
"width": 1000, "width": 1000,
"height": 1000, "height": 1000,
"hash": null, "hash": null,
...@@ -1732,7 +1732,7 @@ ...@@ -1732,7 +1732,7 @@
}, },
{ {
"model": "images.image", "model": "images.image",
"pk": "f250d3f3-bd56-4a2f-bffc-fc3a33cd1902", "pk": "bd3c8ee4-358a-4a50-90f6-1080b910d615",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
...@@ -1746,12 +1746,12 @@ ...@@ -1746,12 +1746,12 @@
}, },
{ {
"model": "images.image", "model": "images.image",
"pk": "f5ddf7e0-3dd3-4f4f-ada6-f42de7be869d", "pk": "e48347c1-2047-4e9a-b567-52a9e7b71ac6",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"server": 1, "server": 1,
"path": "img2", "path": "img3",
"width": 1000, "width": 1000,
"height": 1000, "height": 1000,
"hash": null, "hash": null,
...@@ -1760,64 +1760,64 @@ ...@@ -1760,64 +1760,64 @@
}, },
{ {
"model": "users.right", "model": "users.right",
"pk": "15896320-98f2-48e1-9d36-4cef1e15c119", "pk": "007844fb-44e9-42ff-925f-954e98292c50",
"fields": { "fields": {
"user": 2, "user": 2,
"group": null, "group": null,
"content_type": 19, "content_type": 34,
"content_id": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "content_id": "d4c0ee9b-6c8e-4667-823b-01cdbf709161",
"level": 100 "level": 100
} }
}, },
{ {
"model": "users.right", "model": "users.right",
"pk": "2a7d975d-4f18-41f4-964f-817aeae09582", "pk": "3f108462-43fd-417f-adbf-f2efcae42d99",
"fields": { "fields": {
"user": 2, "user": 2,
"group": null, "group": null,
"content_type": 11, "content_type": 11,
"content_id": "395522d1-94a0-407a-b5cb-347fa68ec2c4", "content_id": "0464874a-12cd-4bb5-a06f-37a872a82e5a",
"level": 10 "level": 10
} }
}, },
{ {
"model": "users.right", "model": "users.right",
"pk": "7e2ea5d2-2408-49b4-b1b4-2ea0e12da7e4", "pk": "6c838d5b-602d-4a59-a890-e0e7b45892d3",
"fields": { "fields": {
"user": 2, "user": 3,
"group": null, "group": null,
"content_type": 34, "content_type": 34,
"content_id": "8f459bd8-0440-444e-940b-3c14b10bdb0d", "content_id": "d4c0ee9b-6c8e-4667-823b-01cdbf709161",
"level": 100 "level": 50
} }
}, },
{ {
"model": "users.right", "model": "users.right",
"pk": "db08fb62-277f-475c-ae92-cfb4a515b146", "pk": "8e0946ec-f183-4777-9b01-fad1260274d8",
"fields": { "fields": {
"user": 4, "user": 4,
"group": null, "group": null,
"content_type": 34, "content_type": 34,
"content_id": "8f459bd8-0440-444e-940b-3c14b10bdb0d", "content_id": "d4c0ee9b-6c8e-4667-823b-01cdbf709161",
"level": 10 "level": 10
} }
}, },
{ {
"model": "users.right", "model": "users.right",
"pk": "f61b568e-91d3-4e62-ba79-b5d7b326bc7d", "pk": "bb2da668-ad2c-4869-900a-fabc8edc1c81",
"fields": { "fields": {
"user": 3, "user": 2,
"group": null, "group": null,
"content_type": 34, "content_type": 19,
"content_id": "8f459bd8-0440-444e-940b-3c14b10bdb0d", "content_id": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"level": 50 "level": 100
} }
}, },
{ {
"model": "users.user", "model": "users.user",
"pk": 1, "pk": 1,
"fields": { "fields": {
"password": "pbkdf2_sha256$390000$n41pgYuMjEMc9yABOJDuv7$szqrPzEEMyrNyvxRF5ekrtgzLra4rnw09jkS/Rlb65M=", "password": "pbkdf2_sha256$390000$QSd65IybrTHuN13us8Mqz3$5D0bK0ZjilS/hgJNYMtiBeGqIyPXT2pS1opEuL2Xw5A=",
"last_login": null, "last_login": null,
"email": "root@root.fr", "email": "root@root.fr",
"display_name": "Admin", "display_name": "Admin",
...@@ -1832,7 +1832,7 @@ ...@@ -1832,7 +1832,7 @@
"model": "users.user", "model": "users.user",
"pk": 2, "pk": 2,
"fields": { "fields": {
"password": "pbkdf2_sha256$390000$82MV7wfiM1CYxnR3JI9dRw$vavB8EAQRE2Z0REJhhWU7bRyrQqZF5wazXjl1rOrvTY=", "password": "pbkdf2_sha256$390000$TpW8NPlptDOAWz4DsGYUPB$CsXsGa2P8pwWcYLAFkF40X3F8wNyqMl+eDNB/OLs3gw=",
"last_login": null, "last_login": null,
"email": "user@user.fr", "email": "user@user.fr",
"display_name": "Test user", "display_name": "Test user",
...@@ -1875,7 +1875,7 @@ ...@@ -1875,7 +1875,7 @@
}, },
{ {
"model": "users.group", "model": "users.group",
"pk": "8f459bd8-0440-444e-940b-3c14b10bdb0d", "pk": "d4c0ee9b-6c8e-4667-823b-01cdbf709161",
"fields": { "fields": {
"name": "User group", "name": "User group",
"public": false, "public": false,
...@@ -3871,42 +3871,124 @@ ...@@ -3871,42 +3871,124 @@
"codename": "view_datasetelement" "codename": "view_datasetelement"
} }
}, },
{
"model": "auth.permission",
"pk": 222,
"fields": {
"name": "Can add dataset set",
"content_type": 57,
"codename": "add_datasetset"
}
},
{
"model": "auth.permission",
"pk": 223,
"fields": {
"name": "Can change dataset set",
"content_type": 57,
"codename": "change_datasetset"
}
},
{
"model": "auth.permission",
"pk": 224,
"fields": {
"name": "Can delete dataset set",
"content_type": 57,
"codename": "delete_datasetset"
}
},
{
"model": "auth.permission",
"pk": 225,
"fields": {
"name": "Can view dataset set",
"content_type": 57,
"codename": "view_datasetset"
}
},
{ {
"model": "ponos.farm", "model": "ponos.farm",
"pk": "395522d1-94a0-407a-b5cb-347fa68ec2c4", "pk": "0464874a-12cd-4bb5-a06f-37a872a82e5a",
"fields": { "fields": {
"name": "Wheat farm", "name": "Wheat farm",
"seed": "444809637bf8b3088a181de520a02151a99477edd051710e90a2d1fcdf860dbb" "seed": "752dbcf9ba697d6affdd82339c81ca2db28f9b046961a317e0c509561bbc3ad7"
} }
}, },
{ {
"model": "training.dataset", "model": "training.dataset",
"pk": "4a844b36-08bd-4284-918e-5e03d543df13", "pk": "2d515087-c048-42a1-a21a-5c1ba589f455",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"creator": 2, "creator": 2,
"task": null, "task": null,
"name": "Second Dataset", "name": "First Dataset",
"description": "dataset number two", "description": "dataset number one",
"state": "open", "state": "open"
"sets": "[\"training\", \"test\", \"validation\"]"
} }
}, },
{ {
"model": "training.dataset", "model": "training.dataset",
"pk": "630d1cf5-3ba8-4335-b0be-d1be4cb18782", "pk": "3a350d60-ce8d-4e26-a764-92b1ff02b3f8",
"fields": { "fields": {
"created": "2020-02-02T01:23:45.678Z", "created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z", "updated": "2020-02-02T01:23:45.678Z",
"corpus": "f34313ec-45ec-4ac4-92e5-43d7eb045c12", "corpus": "35d72d0a-7d7a-4165-ad65-a863725a470f",
"creator": 2, "creator": 2,
"task": null, "task": null,
"name": "First Dataset", "name": "Second Dataset",
"description": "dataset number one", "description": "dataset number two",
"state": "open", "state": "open"
"sets": "[\"training\", \"test\", \"validation\"]" }
},
{
"model": "training.datasetset",
"pk": "04b3fdac-fd31-48b7-8d39-cfe68ebbe464",
"fields": {
"name": "training",
"dataset": "2d515087-c048-42a1-a21a-5c1ba589f455"
}
},
{
"model": "training.datasetset",
"pk": "35188db8-ac84-4edf-8f85-b747da5d20ab",
"fields": {
"name": "test",
"dataset": "2d515087-c048-42a1-a21a-5c1ba589f455"
}
},
{
"model": "training.datasetset",
"pk": "70e0b644-45cc-4fa7-8290-f9a56801d664",
"fields": {
"name": "validation",
"dataset": "2d515087-c048-42a1-a21a-5c1ba589f455"
}
},
{
"model": "training.datasetset",
"pk": "8a800950-7647-4001-8a19-fc2175061a24",
"fields": {
"name": "training",
"dataset": "3a350d60-ce8d-4e26-a764-92b1ff02b3f8"
}
},
{
"model": "training.datasetset",
"pk": "8c412165-7e72-4509-afc8-e4e5d13f428c",
"fields": {
"name": "validation",
"dataset": "3a350d60-ce8d-4e26-a764-92b1ff02b3f8"
}
},
{
"model": "training.datasetset",
"pk": "da8eb663-d2f0-489f-bcb5-6660386ba80b",
"fields": {
"name": "test",
"dataset": "3a350d60-ce8d-4e26-a764-92b1ff02b3f8"
} }
} }
] ]
...@@ -20,6 +20,7 @@ from arkindex.process.models import ( ...@@ -20,6 +20,7 @@ from arkindex.process.models import (
WorkerVersionState, WorkerVersionState,
) )
from arkindex.project.tools import fake_now from arkindex.project.tools import fake_now
from arkindex.training.models import DatasetSet
from arkindex.users.models import Group, Right, Role, User from arkindex.users.models import Group, Right, Role, User
...@@ -271,8 +272,15 @@ class Command(BaseCommand): ...@@ -271,8 +272,15 @@ class Command(BaseCommand):
) )
# Create 2 datasets # Create 2 datasets
corpus.datasets.create(name="First Dataset", description="dataset number one", creator=user) dataset_1 = corpus.datasets.create(name="First Dataset", description="dataset number one", creator=user)
corpus.datasets.create(name="Second Dataset", description="dataset number two", creator=user) dataset_2 = corpus.datasets.create(name="Second Dataset", description="dataset number two", creator=user)
# Create their sets
DatasetSet.objects.bulk_create(
DatasetSet(name=name, dataset_id=dataset_1.id) for name in ["training", "validation", "test"]
)
DatasetSet.objects.bulk_create(
DatasetSet(name=name, dataset_id=dataset_2.id) for name in ["training", "validation", "test"]
)
# Create 2 volumes # Create 2 volumes
vol1 = Element.objects.create( vol1 = Element.objects.create(
......
...@@ -37,7 +37,7 @@ from arkindex.process.models import ( ...@@ -37,7 +37,7 @@ from arkindex.process.models import (
WorkerType, WorkerType,
WorkerVersion, WorkerVersion,
) )
from arkindex.training.models import Dataset, DatasetElement, Model from arkindex.training.models import Dataset, DatasetElement, DatasetSet, Model
from arkindex.users.models import Role, User from arkindex.users.models import Role, User
EXPORT_VERSION = 8 EXPORT_VERSION = 8
...@@ -320,17 +320,30 @@ class Command(BaseCommand): ...@@ -320,17 +320,30 @@ class Command(BaseCommand):
id=row["id"], id=row["id"],
corpus=self.corpus, corpus=self.corpus,
name=row["name"], name=row["name"],
sets=[r.strip() for r in row["sets"].split(",")],
creator=self.user, creator=self.user,
description="Imported dataset", description="Imported dataset",
)] )]
def convert_dataset_sets(self, row):
return [
DatasetSet(
name=set_name.strip(),
dataset_id=row["id"]
)
for set_name in row["sets"].split(",")
]
def map_dataset_sets(self):
return {
(str(set.dataset_id), set.name): set.id
for set in DatasetSet.objects.filter(dataset__corpus=self.corpus)
}
def convert_dataset_elements(self, row): def convert_dataset_elements(self, row):
return [DatasetElement( return [DatasetElement(
id=row["id"], id=row["id"],
element_id=row["element_id"], element_id=row["element_id"],
dataset_id=row["dataset_id"], set_id=self.dataset_sets_map[(row["dataset_id"], row["set_name"])]
set=row["set_name"],
)] )]
def bulk_create_objects(self, ModelClass, convert_method, sql_query, ignore_conflicts=True): def bulk_create_objects(self, ModelClass, convert_method, sql_query, ignore_conflicts=True):
...@@ -603,6 +616,12 @@ class Command(BaseCommand): ...@@ -603,6 +616,12 @@ class Command(BaseCommand):
# Create datasets # Create datasets
self.bulk_create_objects(Dataset, self.convert_datasets, SQL_DATASET_QUERY) self.bulk_create_objects(Dataset, self.convert_datasets, SQL_DATASET_QUERY)
# Create dataset sets
self.bulk_create_objects(DatasetSet, self.convert_dataset_sets, SQL_DATASET_QUERY)
# Create dataset sets mapping
self.dataset_sets_map = self.map_dataset_sets()
# Create dataset elements # Create dataset elements
self.bulk_create_objects(DatasetElement, self.convert_dataset_elements, SQL_ELEMENT_DATASET_QUERY) self.bulk_create_objects(DatasetElement, self.convert_dataset_elements, SQL_ELEMENT_DATASET_QUERY)
......
...@@ -24,7 +24,7 @@ from arkindex.documents.models import ( ...@@ -24,7 +24,7 @@ from arkindex.documents.models import (
) )
from arkindex.ponos.models import Task from arkindex.ponos.models import Task
from arkindex.process.models import Process, ProcessDataset, ProcessElement, WorkerActivity, WorkerRun from arkindex.process.models import Process, ProcessDataset, ProcessElement, WorkerActivity, WorkerRun
from arkindex.training.models import DatasetElement from arkindex.training.models import DatasetElement, DatasetSet
from arkindex.users.models import User from arkindex.users.models import User
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -73,7 +73,8 @@ def corpus_delete(corpus_id: str) -> None: ...@@ -73,7 +73,8 @@ def corpus_delete(corpus_id: str) -> None:
# ProcessDataset M2M # ProcessDataset M2M
ProcessDataset.objects.filter(dataset__corpus_id=corpus_id), ProcessDataset.objects.filter(dataset__corpus_id=corpus_id),
ProcessDataset.objects.filter(process__corpus_id=corpus_id), ProcessDataset.objects.filter(process__corpus_id=corpus_id),
DatasetElement.objects.filter(dataset__corpus_id=corpus_id), DatasetElement.objects.filter(set__dataset__corpus_id=corpus_id),
DatasetSet.objects.filter(dataset__corpus_id=corpus_id),
corpus.datasets.all(), corpus.datasets.all(),
# Delete the hidden M2M task parents table # Delete the hidden M2M task parents table
Task.parents.through.objects.filter(from_task__process__corpus_id=corpus_id), Task.parents.through.objects.filter(from_task__process__corpus_id=corpus_id),
......
...@@ -14,6 +14,7 @@ from arkindex.documents.tasks import corpus_delete ...@@ -14,6 +14,7 @@ from arkindex.documents.tasks import corpus_delete
from arkindex.images.models import Image, ImageServer from arkindex.images.models import Image, ImageServer
from arkindex.process.models import ProcessMode, Repository, Worker, WorkerRun, WorkerType, WorkerVersion from arkindex.process.models import ProcessMode, Repository, Worker, WorkerRun, WorkerType, WorkerVersion
from arkindex.project.tests import FixtureTestCase from arkindex.project.tests import FixtureTestCase
from arkindex.training.models import Dataset, DatasetElement
BASE_DIR = Path(__file__).absolute().parent BASE_DIR = Path(__file__).absolute().parent
...@@ -132,6 +133,9 @@ class TestLoadExport(FixtureTestCase): ...@@ -132,6 +133,9 @@ class TestLoadExport(FixtureTestCase):
dla_version = WorkerVersion.objects.get(worker__slug="dla") dla_version = WorkerVersion.objects.get(worker__slug="dla")
dla_run = dla_version.worker_runs.get(process__mode=ProcessMode.Workers) dla_run = dla_version.worker_runs.get(process__mode=ProcessMode.Workers)
dataset_set = Dataset.objects.first().sets.first()
DatasetElement.objects.create(set=dataset_set, element=element)
element.classifications.create( element.classifications.create(
ml_class=self.corpus.ml_classes.create(name="Blah"), ml_class=self.corpus.ml_classes.create(name="Blah"),
confidence=.55555555, confidence=.55555555,
...@@ -266,6 +270,9 @@ class TestLoadExport(FixtureTestCase): ...@@ -266,6 +270,9 @@ class TestLoadExport(FixtureTestCase):
confidence=.55555555, confidence=.55555555,
) )
dataset_set = Dataset.objects.first().sets.first()
DatasetElement.objects.create(set=dataset_set, element=element)
person_type = EntityType.objects.get( person_type = EntityType.objects.get(
name="person", name="person",
corpus=self.corpus corpus=self.corpus
......
...@@ -5,7 +5,7 @@ from arkindex.documents.tasks import corpus_delete ...@@ -5,7 +5,7 @@ from arkindex.documents.tasks import corpus_delete
from arkindex.ponos.models import Farm, State, Task from arkindex.ponos.models import Farm, State, Task
from arkindex.process.models import CorpusWorkerVersion, Process, ProcessDataset, ProcessMode, Repository, WorkerVersion from arkindex.process.models import CorpusWorkerVersion, Process, ProcessDataset, ProcessMode, Repository, WorkerVersion
from arkindex.project.tests import FixtureTestCase, force_constraints_immediate from arkindex.project.tests import FixtureTestCase, force_constraints_immediate
from arkindex.training.models import Dataset from arkindex.training.models import Dataset, DatasetSet
class TestDeleteCorpus(FixtureTestCase): class TestDeleteCorpus(FixtureTestCase):
...@@ -114,18 +114,25 @@ class TestDeleteCorpus(FixtureTestCase): ...@@ -114,18 +114,25 @@ class TestDeleteCorpus(FixtureTestCase):
cls.corpus2 = Corpus.objects.create(name="Other corpus") cls.corpus2 = Corpus.objects.create(name="Other corpus")
dataset1 = Dataset.objects.get(name="First Dataset") dataset1 = Dataset.objects.get(name="First Dataset")
dataset1.dataset_elements.create(element=element, set="test") test_set_1 = dataset1.sets.get(name="test")
test_set_1.set_elements.create(element=element)
cls.dataset2 = Dataset.objects.create(name="Dead Sea Scrolls", description="How to trigger a Third Impact", creator=cls.user, corpus=cls.corpus2) cls.dataset2 = Dataset.objects.create(name="Dead Sea Scrolls", description="How to trigger a Third Impact", creator=cls.user, corpus=cls.corpus2)
DatasetSet.objects.bulk_create(
DatasetSet(
dataset=cls.dataset2,
name=set_name
) for set_name in ["test", "training", "validation"]
)
# Process on cls.corpus and with a dataset from cls.corpus # Process on cls.corpus and with a dataset from cls.corpus
dataset_process1 = cls.corpus.processes.create(creator=cls.user, mode=ProcessMode.Dataset) dataset_process1 = cls.corpus.processes.create(creator=cls.user, mode=ProcessMode.Dataset)
ProcessDataset.objects.create(process=dataset_process1, dataset=dataset1, sets=dataset1.sets) ProcessDataset.objects.create(process=dataset_process1, dataset=dataset1, sets=list(dataset1.sets.values_list("name", flat=True)))
# Process on cls.corpus with a dataset from another corpus # Process on cls.corpus with a dataset from another corpus
dataset_process2 = cls.corpus.processes.create(creator=cls.user, mode=ProcessMode.Dataset) dataset_process2 = cls.corpus.processes.create(creator=cls.user, mode=ProcessMode.Dataset)
ProcessDataset.objects.create(process=dataset_process2, dataset=dataset1, sets=dataset1.sets) ProcessDataset.objects.create(process=dataset_process2, dataset=dataset1, sets=list(dataset1.sets.values_list("name", flat=True)))
ProcessDataset.objects.create(process=dataset_process2, dataset=cls.dataset2, sets=cls.dataset2.sets) ProcessDataset.objects.create(process=dataset_process2, dataset=cls.dataset2, sets=list(cls.dataset2.sets.values_list("name", flat=True)))
# Process on another corpus with a dataset from another corpus and none from cls.corpus # Process on another corpus with a dataset from another corpus and none from cls.corpus
cls.dataset_process3 = cls.corpus2.processes.create(creator=cls.user, mode=ProcessMode.Dataset) cls.dataset_process3 = cls.corpus2.processes.create(creator=cls.user, mode=ProcessMode.Dataset)
ProcessDataset.objects.create(process=cls.dataset_process3, dataset=cls.dataset2, sets=cls.dataset2.sets) ProcessDataset.objects.create(process=cls.dataset_process3, dataset=cls.dataset2, sets=list(cls.dataset2.sets.values_list("name", flat=True)))
cls.rev = cls.repo.revisions.create( cls.rev = cls.repo.revisions.create(
hash="42", hash="42",
......
...@@ -24,6 +24,7 @@ from arkindex.documents.models import ( ...@@ -24,6 +24,7 @@ from arkindex.documents.models import (
from arkindex.images.models import Image, ImageServer from arkindex.images.models import Image, ImageServer
from arkindex.process.models import Repository, WorkerType, WorkerVersion, WorkerVersionState from arkindex.process.models import Repository, WorkerType, WorkerVersion, WorkerVersionState
from arkindex.project.tests import FixtureTestCase from arkindex.project.tests import FixtureTestCase
from arkindex.training.models import DatasetElement
TABLE_NAMES = { TABLE_NAMES = {
"export_version", "export_version",
...@@ -131,8 +132,9 @@ class TestExport(FixtureTestCase): ...@@ -131,8 +132,9 @@ class TestExport(FixtureTestCase):
) )
dataset = self.corpus.datasets.get(name="First Dataset") dataset = self.corpus.datasets.get(name="First Dataset")
dataset.dataset_elements.create(element=element, set="train") _, train_set, validation_set = dataset.sets.all().order_by("name")
dataset.dataset_elements.create(element=element, set="validation") train_set.set_elements.create(element=element)
validation_set.set_elements.create(element=element)
export = self.corpus.exports.create(user=self.user) export = self.corpus.exports.create(user=self.user)
...@@ -488,7 +490,7 @@ class TestExport(FixtureTestCase): ...@@ -488,7 +490,7 @@ class TestExport(FixtureTestCase):
( (
str(dataset.id), str(dataset.id),
dataset.name, dataset.name,
",".join(dataset.sets), ",".join(list(dataset.sets.values_list("name", flat=True))),
) for dataset in self.corpus.datasets.all() ) for dataset in self.corpus.datasets.all()
] ]
) )
...@@ -506,9 +508,9 @@ class TestExport(FixtureTestCase): ...@@ -506,9 +508,9 @@ class TestExport(FixtureTestCase):
( (
str(dataset_element.id), str(dataset_element.id),
str(dataset_element.element_id), str(dataset_element.element_id),
str(dataset_element.dataset_id), str(dataset_element.set.dataset_id),
dataset_element.set dataset_element.set.name
) for dataset_element in dataset.dataset_elements.all() ) for dataset_element in DatasetElement.objects.filter(set__dataset_id=dataset.id)
] ]
) )
......
...@@ -183,7 +183,8 @@ class TestDeleteSelectionWorkerResults(FixtureTestCase): ...@@ -183,7 +183,8 @@ class TestDeleteSelectionWorkerResults(FixtureTestCase):
job_mock.return_value.user_id = self.user.id job_mock.return_value.user_id = self.user.id
self.page1.worker_version = self.version self.page1.worker_version = self.version
self.page1.save() self.page1.save()
Dataset.objects.get(name="First Dataset").dataset_elements.create(element=self.page1, set="test") dataset = Dataset.objects.get(name="First Dataset")
dataset.sets.get(name="test").set_elements.create(element=self.page1)
self.user.selected_elements.set([self.page1]) self.user.selected_elements.set([self.page1])
selection_worker_results_delete(corpus_id=self.corpus.id, version_id=self.version.id) selection_worker_results_delete(corpus_id=self.corpus.id, version_id=self.version.id)
......
...@@ -6,7 +6,7 @@ from arkindex.documents.models import Entity, EntityType, MLClass, Transcription ...@@ -6,7 +6,7 @@ from arkindex.documents.models import Entity, EntityType, MLClass, Transcription
from arkindex.documents.tasks import worker_results_delete from arkindex.documents.tasks import worker_results_delete
from arkindex.process.models import ProcessMode, WorkerVersion from arkindex.process.models import ProcessMode, WorkerVersion
from arkindex.project.tests import FixtureTestCase from arkindex.project.tests import FixtureTestCase
from arkindex.training.models import Dataset, Model, ModelVersionState from arkindex.training.models import DatasetSet, Model, ModelVersionState
class TestDeleteWorkerResults(FixtureTestCase): class TestDeleteWorkerResults(FixtureTestCase):
...@@ -270,7 +270,7 @@ class TestDeleteWorkerResults(FixtureTestCase): ...@@ -270,7 +270,7 @@ class TestDeleteWorkerResults(FixtureTestCase):
self.page1.worker_run = self.worker_run_1 self.page1.worker_run = self.worker_run_1
self.page1.worker_version = self.version_1 self.page1.worker_version = self.version_1
self.page1.save() self.page1.save()
Dataset.objects.get(name="First Dataset").dataset_elements.create(element=self.page1, set="test") DatasetSet.objects.get(name="test", dataset__name="First Dataset").set_elements.create(element=self.page1)
worker_results_delete(corpus_id=self.corpus.id) worker_results_delete(corpus_id=self.corpus.id)
# Prevent delaying constraints check at end of the test transaction # Prevent delaying constraints check at end of the test transaction
......
...@@ -148,7 +148,8 @@ class TestDestroyElements(FixtureAPITestCase): ...@@ -148,7 +148,8 @@ class TestDestroyElements(FixtureAPITestCase):
""" """
An element cannot be deleted via the API if linked to a dataset An element cannot be deleted via the API if linked to a dataset
""" """
Dataset.objects.get(name="First Dataset").dataset_elements.create(element=self.vol, set="test") dataset = Dataset.objects.get(name="First Dataset")
dataset.sets.get(name="test").set_elements.create(element=self.vol)
self.client.force_login(self.user) self.client.force_login(self.user)
with self.assertNumQueries(3): with self.assertNumQueries(3):
response = self.client.delete(reverse("api:element-retrieve", kwargs={"pk": str(self.vol.id)})) response = self.client.delete(reverse("api:element-retrieve", kwargs={"pk": str(self.vol.id)}))
...@@ -179,9 +180,9 @@ class TestDestroyElements(FixtureAPITestCase): ...@@ -179,9 +180,9 @@ class TestDestroyElements(FixtureAPITestCase):
""" """
Elements that are part of a dataset cannot be deleted Elements that are part of a dataset cannot be deleted
""" """
Dataset.objects.get(name="First Dataset").dataset_elements.create( dataset = Dataset.objects.get(name="First Dataset")
element=Element.objects.get_descending(self.vol.id).first(), dataset.sets.get(name="test").set_elements.create(
set="test", element=Element.objects.get_descending(self.vol.id).first()
) )
Element.objects.filter(id=self.vol.id).trash() Element.objects.filter(id=self.vol.id).trash()
......
...@@ -111,19 +111,18 @@ class TestAPI(FixtureAPITestCase): ...@@ -111,19 +111,18 @@ class TestAPI(FixtureAPITestCase):
resp = self.client.get(reverse("api:task-details", args=[self.task1.id])) resp = self.client.get(reverse("api:task-details", args=[self.task1.id]))
self.assertEqual(resp.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(resp.status_code, status.HTTP_403_FORBIDDEN)
@expectedFailure @patch("arkindex.project.mixins.get_max_level")
def test_task_details_requires_process_guest(self): def test_task_details_requires_process_guest(self, get_max_level_mock):
self.process.creator = self.superuser get_max_level_mock.return_value = None
self.process.save()
self.corpus.memberships.filter(user=self.user).delete()
self.corpus.public = False
self.corpus.save()
self.client.force_login(self.user) self.client.force_login(self.user)
with self.assertNumQueries(5): with self.assertNumQueries(3):
resp = self.client.get(reverse("api:task-details", args=[self.task1.id])) resp = self.client.get(reverse("api:task-details", args=[self.task1.id]))
self.assertEqual(resp.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(resp.status_code, status.HTTP_403_FORBIDDEN)
self.assertEqual(get_max_level_mock.call_count, 1)
self.assertEqual(get_max_level_mock.call_args, call(self.user, self.corpus))
@patch("arkindex.project.aws.s3") @patch("arkindex.project.aws.s3")
def test_task_details_process_level_corpus(self, s3_mock): def test_task_details_process_level_corpus(self, s3_mock):
s3_mock.Object.return_value.bucket_name = "ponos" s3_mock.Object.return_value.bucket_name = "ponos"
......
...@@ -706,6 +706,7 @@ class ProcessDatasets(ProcessACLMixin, ListAPIView): ...@@ -706,6 +706,7 @@ class ProcessDatasets(ProcessACLMixin, ListAPIView):
return ( return (
ProcessDataset.objects.filter(process_id=self.process.id) ProcessDataset.objects.filter(process_id=self.process.id)
.select_related("process__creator", "dataset__creator") .select_related("process__creator", "dataset__creator")
.prefetch_related("dataset__sets")
.order_by("dataset__name") .order_by("dataset__name")
) )
...@@ -715,8 +716,6 @@ class ProcessDatasets(ProcessACLMixin, ListAPIView): ...@@ -715,8 +716,6 @@ class ProcessDatasets(ProcessACLMixin, ListAPIView):
if not self.kwargs: if not self.kwargs:
return context return context
context["process"] = self.process context["process"] = self.process
# Disable set elements counts in serialized dataset
context["sets_count"] = False
return context return context
...@@ -751,6 +750,7 @@ class ProcessDatasetManage(CreateAPIView, UpdateAPIView, DestroyAPIView): ...@@ -751,6 +750,7 @@ class ProcessDatasetManage(CreateAPIView, UpdateAPIView, DestroyAPIView):
process_dataset = get_object_or_404( process_dataset = get_object_or_404(
ProcessDataset.objects ProcessDataset.objects
.select_related("dataset__creator", "process__corpus") .select_related("dataset__creator", "process__corpus")
.prefetch_related("dataset__sets")
# Required to check for a process that have already started # Required to check for a process that have already started
.annotate(process_has_tasks=Exists(Task.objects.filter(process_id=self.kwargs["process"]))), .annotate(process_has_tasks=Exists(Task.objects.filter(process_id=self.kwargs["process"]))),
dataset_id=self.kwargs["dataset"], process_id=self.kwargs["process"] dataset_id=self.kwargs["dataset"], process_id=self.kwargs["process"]
...@@ -759,12 +759,6 @@ class ProcessDatasetManage(CreateAPIView, UpdateAPIView, DestroyAPIView): ...@@ -759,12 +759,6 @@ class ProcessDatasetManage(CreateAPIView, UpdateAPIView, DestroyAPIView):
process_dataset.process.has_tasks = process_dataset.process_has_tasks process_dataset.process.has_tasks = process_dataset.process_has_tasks
return process_dataset return process_dataset
def get_serializer_context(self):
context = super().get_serializer_context()
# Disable set elements counts in serialized dataset
context["sets_count"] = False
return context
def destroy(self, request, *args, **kwargs): def destroy(self, request, *args, **kwargs):
serializer = self.get_serializer(data=request.data) serializer = self.get_serializer(data=request.data)
serializer.is_valid(raise_exception=True) serializer.is_valid(raise_exception=True)
......
import django.core.validators import django.core.validators
from django.db import migrations, models from django.db import migrations, models
import arkindex.process.models
import arkindex.project.fields import arkindex.project.fields
import arkindex.training.models
class Migration(migrations.Migration): class Migration(migrations.Migration):
...@@ -37,7 +37,7 @@ class Migration(migrations.Migration): ...@@ -37,7 +37,7 @@ class Migration(migrations.Migration):
validators=[django.core.validators.MinLengthValidator(1)] validators=[django.core.validators.MinLengthValidator(1)]
), ),
size=None, size=None,
validators=[django.core.validators.MinLengthValidator(1), arkindex.training.models.validate_unique_set_names] validators=[django.core.validators.MinLengthValidator(1), arkindex.process.models.validate_unique_set_names]
), ),
), ),
] ]
...@@ -5,6 +5,7 @@ from typing import Optional ...@@ -5,6 +5,7 @@ from typing import Optional
from django.conf import settings from django.conf import settings
from django.contrib.contenttypes.fields import GenericRelation from django.contrib.contenttypes.fields import GenericRelation
from django.core.exceptions import ValidationError
from django.core.validators import MinLengthValidator, MinValueValidator from django.core.validators import MinLengthValidator, MinValueValidator
from django.db import models, transaction from django.db import models, transaction
from django.db.models import F, Q from django.db.models import F, Q
...@@ -27,8 +28,9 @@ from arkindex.process.managers import ( ...@@ -27,8 +28,9 @@ from arkindex.process.managers import (
from arkindex.project.aws import S3FileMixin, S3FileStatus from arkindex.project.aws import S3FileMixin, S3FileStatus
from arkindex.project.fields import ArrayField, MD5HashField from arkindex.project.fields import ArrayField, MD5HashField
from arkindex.project.models import IndexableModel from arkindex.project.models import IndexableModel
from arkindex.project.tools import is_prefetched
from arkindex.project.validators import MaxValueValidator from arkindex.project.validators import MaxValueValidator
from arkindex.training.models import ModelVersion, ModelVersionState, validate_unique_set_names from arkindex.training.models import ModelVersion, ModelVersionState
from arkindex.users.models import Role from arkindex.users.models import Role
...@@ -40,6 +42,11 @@ def process_max_chunks(): ...@@ -40,6 +42,11 @@ def process_max_chunks():
return settings.MAX_CHUNKS return settings.MAX_CHUNKS
def validate_unique_set_names(sets):
if len(set(sets)) != len(sets):
raise ValidationError("Set names must be unique.")
class ActivityState(Enum): class ActivityState(Enum):
""" """
Store the state of the workers activity tracking for a process. Store the state of the workers activity tracking for a process.
...@@ -218,11 +225,7 @@ class Process(IndexableModel): ...@@ -218,11 +225,7 @@ class Process(IndexableModel):
See https://stackoverflow.com/a/19651840/5990435 See https://stackoverflow.com/a/19651840/5990435
""" """
return ( return is_prefetched(self.tasks)
hasattr(self, "_prefetched_objects_cache")
and self.tasks.field.remote_field.get_cache_name()
in self._prefetched_objects_cache
)
@property @property
def expiry(self): def expiry(self):
......
...@@ -89,7 +89,7 @@ class ProcessDatasetSerializer(ProcessACLMixin, serializers.ModelSerializer): ...@@ -89,7 +89,7 @@ class ProcessDatasetSerializer(ProcessACLMixin, serializers.ModelSerializer):
else: else:
dataset_qs = Dataset.objects.filter(corpus__in=Corpus.objects.readable(self._user)) dataset_qs = Dataset.objects.filter(corpus__in=Corpus.objects.readable(self._user))
try: try:
dataset = dataset_qs.select_related("creator").get(pk=data["dataset_id"]) dataset = dataset_qs.select_related("creator").prefetch_related("sets").get(pk=data["dataset_id"])
except Dataset.DoesNotExist: except Dataset.DoesNotExist:
raise ValidationError({"dataset": [f'Invalid pk "{str(data["dataset_id"])}" - object does not exist.']}) raise ValidationError({"dataset": [f'Invalid pk "{str(data["dataset_id"])}" - object does not exist.']})
else: else:
...@@ -109,11 +109,11 @@ class ProcessDatasetSerializer(ProcessACLMixin, serializers.ModelSerializer): ...@@ -109,11 +109,11 @@ class ProcessDatasetSerializer(ProcessACLMixin, serializers.ModelSerializer):
sets = data.get("sets") sets = data.get("sets")
if not sets or len(sets) == 0: if not sets or len(sets) == 0:
if not self.instance: if not self.instance:
data["sets"] = dataset.sets data["sets"] = [item.name for item in list(dataset.sets.all())]
else: else:
errors["sets"].append("This field cannot be empty.") errors["sets"].append("This field cannot be empty.")
else: else:
if any(s not in dataset.sets for s in sets): if any(s not in [item.name for item in list(dataset.sets.all())] for s in sets):
errors["sets"].append("The specified sets must all exist in the specified dataset.") errors["sets"].append("The specified sets must all exist in the specified dataset.")
if len(set(sets)) != len(sets): if len(set(sets)) != len(sets):
errors["sets"].append("Sets must be unique.") errors["sets"].append("Sets must be unique.")
......
...@@ -899,7 +899,8 @@ class TestCreateProcess(FixtureAPITestCase): ...@@ -899,7 +899,8 @@ class TestCreateProcess(FixtureAPITestCase):
self.client.force_login(self.user) self.client.force_login(self.user)
process = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset) process = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset)
dataset = self.corpus.datasets.first() dataset = self.corpus.datasets.first()
ProcessDataset.objects.create(process=process, dataset=dataset, sets=dataset.sets) test_sets = list(dataset.sets.values_list("name", flat=True))
ProcessDataset.objects.create(process=process, dataset=dataset, sets=test_sets)
process.versions.set([self.version_2, self.version_3]) process.versions.set([self.version_2, self.version_3])
with self.assertNumQueries(9): with self.assertNumQueries(9):
...@@ -929,7 +930,8 @@ class TestCreateProcess(FixtureAPITestCase): ...@@ -929,7 +930,8 @@ class TestCreateProcess(FixtureAPITestCase):
self.worker_1.save() self.worker_1.save()
process = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset) process = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset)
dataset = self.corpus.datasets.first() dataset = self.corpus.datasets.first()
ProcessDataset.objects.create(process=process, dataset=dataset, sets=dataset.sets) test_sets = list(dataset.sets.values_list("name", flat=True))
ProcessDataset.objects.create(process=process, dataset=dataset, sets=test_sets)
process.versions.add(self.version_1) process.versions.add(self.version_1)
with self.assertNumQueries(9): with self.assertNumQueries(9):
......
...@@ -9,7 +9,7 @@ from arkindex.documents.models import Corpus ...@@ -9,7 +9,7 @@ from arkindex.documents.models import Corpus
from arkindex.ponos.models import Farm from arkindex.ponos.models import Farm
from arkindex.process.models import Process, ProcessDataset, ProcessMode from arkindex.process.models import Process, ProcessDataset, ProcessMode
from arkindex.project.tests import FixtureAPITestCase from arkindex.project.tests import FixtureAPITestCase
from arkindex.training.models import Dataset from arkindex.training.models import Dataset, DatasetSet
from arkindex.users.models import Role, User from arkindex.users.models import Role, User
# Using the fake DB fixtures creation date when needed # Using the fake DB fixtures creation date when needed
...@@ -28,6 +28,10 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -28,6 +28,10 @@ class TestProcessDatasets(FixtureAPITestCase):
description="Human instrumentality manual", description="Human instrumentality manual",
creator=cls.user creator=cls.user
) )
DatasetSet.objects.bulk_create([
DatasetSet(dataset_id=cls.private_dataset.id, name=set_name)
for set_name in ["validation", "training", "test"]
])
cls.test_user = User.objects.create(email="katsuragi@nerv.co.jp", verified_email=True) cls.test_user = User.objects.create(email="katsuragi@nerv.co.jp", verified_email=True)
cls.private_corpus.memberships.create(user=cls.test_user, level=Role.Admin.value) cls.private_corpus.memberships.create(user=cls.test_user, level=Role.Admin.value)
...@@ -40,8 +44,8 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -40,8 +44,8 @@ class TestProcessDatasets(FixtureAPITestCase):
corpus_id=cls.private_corpus.id, corpus_id=cls.private_corpus.id,
farm=Farm.objects.get(name="Wheat farm") farm=Farm.objects.get(name="Wheat farm")
) )
cls.process_dataset_1 = ProcessDataset.objects.create(process=cls.dataset_process, dataset=cls.dataset1, sets=cls.dataset1.sets) cls.process_dataset_1 = ProcessDataset.objects.create(process=cls.dataset_process, dataset=cls.dataset1, sets=list(cls.dataset1.sets.values_list("name", flat=True)))
cls.process_dataset_2 = ProcessDataset.objects.create(process=cls.dataset_process, dataset=cls.private_dataset, sets=cls.private_dataset.sets) cls.process_dataset_2 = ProcessDataset.objects.create(process=cls.dataset_process, dataset=cls.private_dataset, sets=list(cls.private_dataset.sets.values_list("name", flat=True)))
# Control process to check that its datasets are not retrieved # Control process to check that its datasets are not retrieved
cls.dataset_process_2 = Process.objects.create( cls.dataset_process_2 = Process.objects.create(
...@@ -49,7 +53,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -49,7 +53,7 @@ class TestProcessDatasets(FixtureAPITestCase):
mode=ProcessMode.Dataset, mode=ProcessMode.Dataset,
corpus_id=cls.corpus.id corpus_id=cls.corpus.id
) )
ProcessDataset.objects.create(process=cls.dataset_process_2, dataset=cls.dataset2, sets=cls.dataset2.sets) ProcessDataset.objects.create(process=cls.dataset_process_2, dataset=cls.dataset2, sets=list(cls.dataset2.sets.values_list("name", flat=True)))
# List process datasets # List process datasets
...@@ -78,69 +82,84 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -78,69 +82,84 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_list(self): def test_list(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(5): with self.assertNumQueries(6):
response = self.client.get(reverse("api:process-datasets", kwargs={"pk": self.dataset_process.id})) response = self.client.get(reverse("api:process-datasets", kwargs={"pk": self.dataset_process.id}))
self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.json()["results"], [ sets_0 = response.json()["results"][0].pop("sets")
{ self.assertCountEqual(sets_0, ["validation", "training", "test"])
"id": str(self.process_dataset_2.id), self.assertDictEqual(response.json()["results"][0], {
"dataset": { "id": str(self.process_dataset_2.id),
"id": str(self.private_dataset.id), "dataset": {
"name": "Dead sea scrolls", "id": str(self.private_dataset.id),
"description": "Human instrumentality manual", "name": "Dead sea scrolls",
"creator": "Test user", "description": "Human instrumentality manual",
"sets": ["training", "test", "validation"], "creator": "Test user",
"set_elements": None, "sets": [
"corpus_id": str(self.private_corpus.id), {
"state": "open", "id": str(ds.id),
"task_id": None, "name": ds.name
"created": FAKE_CREATED, }
"updated": FAKE_CREATED for ds in self.private_dataset.sets.all()
}, ],
"sets": ["training", "test", "validation"] "set_elements": None,
}, "corpus_id": str(self.private_corpus.id),
{ "state": "open",
"id": str(self.process_dataset_1.id), "task_id": None,
"dataset": { "created": FAKE_CREATED,
"id": str(self.dataset1.id), "updated": FAKE_CREATED
"name": "First Dataset",
"description": "dataset number one",
"creator": "Test user",
"sets": ["training", "test", "validation"],
"set_elements": None,
"corpus_id": str(self.corpus.id),
"state": "open",
"task_id": None,
"created": FAKE_CREATED,
"updated": FAKE_CREATED
},
"sets": ["training", "test", "validation"]
} }
]) })
sets_1 = response.json()["results"][1].pop("sets")
self.assertCountEqual(sets_1, ["validation", "training", "test"])
self.assertDictEqual(response.json()["results"][1], {
"id": str(self.process_dataset_1.id),
"dataset": {
"id": str(self.dataset1.id),
"name": "First Dataset",
"description": "dataset number one",
"creator": "Test user",
"sets": [
{
"id": str(ds.id),
"name": ds.name
}
for ds in self.dataset1.sets.all()
],
"set_elements": None,
"corpus_id": str(self.corpus.id),
"state": "open",
"task_id": None,
"created": FAKE_CREATED,
"updated": FAKE_CREATED
}
})
# Create process dataset # Create process dataset
def test_create_requires_login(self): def test_create_requires_login(self):
test_sets = list(self.dataset2.sets.values_list("name", flat=True))
with self.assertNumQueries(0): with self.assertNumQueries(0):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}),
data={"sets": self.dataset2.sets} data={"sets": test_sets}
) )
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_create_requires_verified(self): def test_create_requires_verified(self):
unverified_user = User.objects.create(email="email@mail.com") unverified_user = User.objects.create(email="email@mail.com")
test_sets = list(self.dataset2.sets.values_list("name", flat=True))
self.client.force_login(unverified_user) self.client.force_login(unverified_user)
with self.assertNumQueries(2): with self.assertNumQueries(2):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}),
data={"sets": self.dataset2.sets} data={"sets": test_sets}
) )
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
@patch("arkindex.project.mixins.get_max_level") @patch("arkindex.project.mixins.get_max_level")
def test_create_access_level(self, get_max_level_mock): def test_create_access_level(self, get_max_level_mock):
cases = [None, Role.Guest.value, Role.Contributor.value] cases = [None, Role.Guest.value, Role.Contributor.value]
test_sets = list(self.dataset2.sets.values_list("name", flat=True))
for level in cases: for level in cases:
with self.subTest(level=level): with self.subTest(level=level):
get_max_level_mock.reset_mock() get_max_level_mock.reset_mock()
...@@ -150,7 +169,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -150,7 +169,7 @@ class TestProcessDatasets(FixtureAPITestCase):
with self.assertNumQueries(3): with self.assertNumQueries(3):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}),
data={"sets": self.dataset2.sets} data={"sets": test_sets}
) )
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
...@@ -161,16 +180,17 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -161,16 +180,17 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_create_process_mode(self): def test_create_process_mode(self):
cases = set(ProcessMode) - {ProcessMode.Dataset, ProcessMode.Local} cases = set(ProcessMode) - {ProcessMode.Dataset, ProcessMode.Local}
test_sets = list(self.dataset2.sets.values_list("name", flat=True))
for mode in cases: for mode in cases:
with self.subTest(mode=mode): with self.subTest(mode=mode):
self.dataset_process.mode = mode self.dataset_process.mode = mode
self.dataset_process.save() self.dataset_process.save()
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(5): with self.assertNumQueries(6):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}),
data={"sets": self.dataset2.sets} data={"sets": test_sets}
) )
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
...@@ -178,22 +198,24 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -178,22 +198,24 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_create_process_mode_local(self): def test_create_process_mode_local(self):
self.client.force_login(self.user) self.client.force_login(self.user)
test_sets = list(self.dataset2.sets.values_list("name", flat=True))
local_process = Process.objects.get(creator=self.user, mode=ProcessMode.Local) local_process = Process.objects.get(creator=self.user, mode=ProcessMode.Local)
with self.assertNumQueries(3): with self.assertNumQueries(3):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": local_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": local_process.id, "dataset": self.dataset2.id}),
data={"sets": self.dataset2.sets} data={"sets": test_sets}
) )
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
self.assertEqual(response.json(), {"detail": "You do not have admin access to this process."}) self.assertEqual(response.json(), {"detail": "You do not have admin access to this process."})
def test_create_wrong_process_uuid(self): def test_create_wrong_process_uuid(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
test_sets = list(self.dataset2.sets.values_list("name", flat=True))
wrong_id = uuid.uuid4() wrong_id = uuid.uuid4()
with self.assertNumQueries(3): with self.assertNumQueries(3):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": wrong_id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": wrong_id, "dataset": self.dataset2.id}),
data={"sets": self.dataset2.sets} data={"sets": test_sets}
) )
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertEqual(response.json(), {"process": [f'Invalid pk "{str(wrong_id)}" - object does not exist.']}) self.assertEqual(response.json(), {"process": [f'Invalid pk "{str(wrong_id)}" - object does not exist.']})
...@@ -213,12 +235,13 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -213,12 +235,13 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_create_dataset_access(self, filter_rights_mock): def test_create_dataset_access(self, filter_rights_mock):
new_corpus = Corpus.objects.create(name="NERV") new_corpus = Corpus.objects.create(name="NERV")
new_dataset = new_corpus.datasets.create(name="Eva series", description="We created the Evas from Adam", creator=self.user) new_dataset = new_corpus.datasets.create(name="Eva series", description="We created the Evas from Adam", creator=self.user)
test_sets = list(new_dataset.sets.values_list("name", flat=True))
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(3): with self.assertNumQueries(3):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": new_dataset.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": new_dataset.id}),
data={"sets": new_dataset.sets} data={"sets": test_sets}
) )
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
...@@ -229,12 +252,13 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -229,12 +252,13 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_create_unique(self): def test_create_unique(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
test_sets = list(self.dataset1.sets.values_list("name", flat=True))
self.assertTrue(self.dataset_process.datasets.filter(id=self.dataset1.id).exists()) self.assertTrue(self.dataset_process.datasets.filter(id=self.dataset1.id).exists())
with self.assertNumQueries(5): with self.assertNumQueries(6):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": self.dataset1.sets} data={"sets": test_sets}
) )
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
...@@ -243,11 +267,12 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -243,11 +267,12 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_create_started(self): def test_create_started(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
self.dataset_process.tasks.create(run=0, depth=0, slug="makrout") self.dataset_process.tasks.create(run=0, depth=0, slug="makrout")
test_sets = list(self.dataset2.sets.values_list("name", flat=True))
with self.assertNumQueries(5): with self.assertNumQueries(6):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}),
data={"sets": self.dataset2.sets} data={"sets": test_sets}
) )
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
...@@ -257,7 +282,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -257,7 +282,7 @@ class TestProcessDatasets(FixtureAPITestCase):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
self.assertEqual(ProcessDataset.objects.count(), 3) self.assertEqual(ProcessDataset.objects.count(), 3)
self.assertFalse(ProcessDataset.objects.filter(process=self.dataset_process.id, dataset=self.dataset2.id).exists()) self.assertFalse(ProcessDataset.objects.filter(process=self.dataset_process.id, dataset=self.dataset2.id).exists())
with self.assertNumQueries(6): with self.assertNumQueries(7):
response = self.client.post( response = self.client.post(
reverse( reverse(
"api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id} "api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}
...@@ -272,6 +297,8 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -272,6 +297,8 @@ class TestProcessDatasets(FixtureAPITestCase):
self.dataset2 self.dataset2
]) ])
created = ProcessDataset.objects.get(process=self.dataset_process.id, dataset=self.dataset2.id) created = ProcessDataset.objects.get(process=self.dataset_process.id, dataset=self.dataset2.id)
process_sets = response.json().pop("sets")
self.assertCountEqual(process_sets, ["validation", "training", "test"])
self.assertDictEqual(response.json(), { self.assertDictEqual(response.json(), {
"id": str(created.id), "id": str(created.id),
"dataset": { "dataset": {
...@@ -279,22 +306,27 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -279,22 +306,27 @@ class TestProcessDatasets(FixtureAPITestCase):
"name": "Second Dataset", "name": "Second Dataset",
"description": "dataset number two", "description": "dataset number two",
"creator": "Test user", "creator": "Test user",
"sets": ["training", "test", "validation"], "sets": [
{
"id": str(ds.id),
"name": ds.name
}
for ds in self.dataset2.sets.all()
],
"set_elements": None, "set_elements": None,
"corpus_id": str(self.corpus.id), "corpus_id": str(self.corpus.id),
"state": "open", "state": "open",
"task_id": None, "task_id": None,
"created": FAKE_CREATED, "created": FAKE_CREATED,
"updated": FAKE_CREATED "updated": FAKE_CREATED
}, }
"sets": ["training", "test", "validation"]
}) })
def test_create(self): def test_create(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
self.assertEqual(ProcessDataset.objects.count(), 3) self.assertEqual(ProcessDataset.objects.count(), 3)
self.assertFalse(ProcessDataset.objects.filter(process=self.dataset_process.id, dataset=self.dataset2.id).exists()) self.assertFalse(ProcessDataset.objects.filter(process=self.dataset_process.id, dataset=self.dataset2.id).exists())
with self.assertNumQueries(6): with self.assertNumQueries(7):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}),
data={"sets": ["validation", "test"]} data={"sets": ["validation", "test"]}
...@@ -315,7 +347,13 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -315,7 +347,13 @@ class TestProcessDatasets(FixtureAPITestCase):
"name": "Second Dataset", "name": "Second Dataset",
"description": "dataset number two", "description": "dataset number two",
"creator": "Test user", "creator": "Test user",
"sets": ["training", "test", "validation"], "sets": [
{
"id": str(ds.id),
"name": ds.name
}
for ds in self.dataset2.sets.all()
],
"set_elements": None, "set_elements": None,
"corpus_id": str(self.corpus.id), "corpus_id": str(self.corpus.id),
"state": "open", "state": "open",
...@@ -330,7 +368,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -330,7 +368,7 @@ class TestProcessDatasets(FixtureAPITestCase):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
self.assertEqual(ProcessDataset.objects.count(), 3) self.assertEqual(ProcessDataset.objects.count(), 3)
self.assertFalse(ProcessDataset.objects.filter(process=self.dataset_process.id, dataset=self.dataset2.id).exists()) self.assertFalse(ProcessDataset.objects.filter(process=self.dataset_process.id, dataset=self.dataset2.id).exists())
with self.assertNumQueries(5): with self.assertNumQueries(6):
response = self.client.post( response = self.client.post(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}),
data={"sets": ["Unit-01"]} data={"sets": ["Unit-01"]}
...@@ -367,7 +405,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -367,7 +405,7 @@ class TestProcessDatasets(FixtureAPITestCase):
if level: if level:
self.private_corpus.memberships.create(user=self.test_user, level=level.value) self.private_corpus.memberships.create(user=self.test_user, level=level.value)
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(4): with self.assertNumQueries(5):
response = self.client.put( response = self.client.put(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["test"]} data={"sets": ["test"]}
...@@ -403,7 +441,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -403,7 +441,7 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_update(self): def test_update(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(4): with self.assertNumQueries(5):
response = self.client.put( response = self.client.put(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["test"]} data={"sets": ["test"]}
...@@ -416,7 +454,13 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -416,7 +454,13 @@ class TestProcessDatasets(FixtureAPITestCase):
"name": "First Dataset", "name": "First Dataset",
"description": "dataset number one", "description": "dataset number one",
"creator": "Test user", "creator": "Test user",
"sets": ["training", "test", "validation"], "sets": [
{
"id": str(ds.id),
"name": ds.name
}
for ds in self.dataset1.sets.all()
],
"set_elements": None, "set_elements": None,
"corpus_id": str(self.corpus.id), "corpus_id": str(self.corpus.id),
"state": "open", "state": "open",
...@@ -429,7 +473,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -429,7 +473,7 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_update_wrong_sets(self): def test_update_wrong_sets(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(3): with self.assertNumQueries(4):
response = self.client.put( response = self.client.put(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["Unit-01", "Unit-02"]} data={"sets": ["Unit-01", "Unit-02"]}
...@@ -439,7 +483,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -439,7 +483,7 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_update_unique_sets(self): def test_update_unique_sets(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(3): with self.assertNumQueries(4):
response = self.client.put( response = self.client.put(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["test", "test"]} data={"sets": ["test", "test"]}
...@@ -455,7 +499,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -455,7 +499,7 @@ class TestProcessDatasets(FixtureAPITestCase):
expiry=datetime(1970, 1, 1, tzinfo=timezone.utc), expiry=datetime(1970, 1, 1, tzinfo=timezone.utc),
) )
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(3): with self.assertNumQueries(4):
response = self.client.put( response = self.client.put(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["test"]} data={"sets": ["test"]}
...@@ -468,7 +512,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -468,7 +512,7 @@ class TestProcessDatasets(FixtureAPITestCase):
Non "sets" fields in the update request are ignored Non "sets" fields in the update request are ignored
""" """
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(4): with self.assertNumQueries(5):
response = self.client.put( response = self.client.put(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"process": str(self.dataset_process_2.id), "dataset": str(self.dataset2.id), "sets": ["test"]} data={"process": str(self.dataset_process_2.id), "dataset": str(self.dataset2.id), "sets": ["test"]}
...@@ -481,7 +525,13 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -481,7 +525,13 @@ class TestProcessDatasets(FixtureAPITestCase):
"name": "First Dataset", "name": "First Dataset",
"description": "dataset number one", "description": "dataset number one",
"creator": "Test user", "creator": "Test user",
"sets": ["training", "test", "validation"], "sets": [
{
"id": str(ds.id),
"name": ds.name
}
for ds in self.dataset1.sets.all()
],
"set_elements": None, "set_elements": None,
"corpus_id": str(self.corpus.id), "corpus_id": str(self.corpus.id),
"state": "open", "state": "open",
...@@ -520,7 +570,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -520,7 +570,7 @@ class TestProcessDatasets(FixtureAPITestCase):
if level: if level:
self.private_corpus.memberships.create(user=self.test_user, level=level.value) self.private_corpus.memberships.create(user=self.test_user, level=level.value)
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(4): with self.assertNumQueries(5):
response = self.client.patch( response = self.client.patch(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["test"]} data={"sets": ["test"]}
...@@ -556,7 +606,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -556,7 +606,7 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_partial_update(self): def test_partial_update(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(4): with self.assertNumQueries(5):
response = self.client.patch( response = self.client.patch(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["test"]} data={"sets": ["test"]}
...@@ -569,7 +619,13 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -569,7 +619,13 @@ class TestProcessDatasets(FixtureAPITestCase):
"name": "First Dataset", "name": "First Dataset",
"description": "dataset number one", "description": "dataset number one",
"creator": "Test user", "creator": "Test user",
"sets": ["training", "test", "validation"], "sets": [
{
"id": str(ds.id),
"name": ds.name
}
for ds in self.dataset1.sets.all()
],
"set_elements": None, "set_elements": None,
"corpus_id": str(self.corpus.id), "corpus_id": str(self.corpus.id),
"state": "open", "state": "open",
...@@ -582,7 +638,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -582,7 +638,7 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_partial_update_wrong_sets(self): def test_partial_update_wrong_sets(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(3): with self.assertNumQueries(4):
response = self.client.patch( response = self.client.patch(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["Unit-01", "Unit-02"]} data={"sets": ["Unit-01", "Unit-02"]}
...@@ -592,7 +648,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -592,7 +648,7 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_partial_update_unique_sets(self): def test_partial_update_unique_sets(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(3): with self.assertNumQueries(4):
response = self.client.patch( response = self.client.patch(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["test", "test"]} data={"sets": ["test", "test"]}
...@@ -608,7 +664,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -608,7 +664,7 @@ class TestProcessDatasets(FixtureAPITestCase):
expiry=datetime(1970, 1, 1, tzinfo=timezone.utc), expiry=datetime(1970, 1, 1, tzinfo=timezone.utc),
) )
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(3): with self.assertNumQueries(4):
response = self.client.patch( response = self.client.patch(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"sets": ["test"]} data={"sets": ["test"]}
...@@ -621,7 +677,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -621,7 +677,7 @@ class TestProcessDatasets(FixtureAPITestCase):
Non "sets" fields in the partial update request are ignored Non "sets" fields in the partial update request are ignored
""" """
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(4): with self.assertNumQueries(5):
response = self.client.patch( response = self.client.patch(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
data={"process": str(self.dataset_process_2.id), "dataset": str(self.dataset2.id), "sets": ["test"]} data={"process": str(self.dataset_process_2.id), "dataset": str(self.dataset2.id), "sets": ["test"]}
...@@ -634,7 +690,13 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -634,7 +690,13 @@ class TestProcessDatasets(FixtureAPITestCase):
"name": "First Dataset", "name": "First Dataset",
"description": "dataset number one", "description": "dataset number one",
"creator": "Test user", "creator": "Test user",
"sets": ["training", "test", "validation"], "sets": [
{
"id": str(ds.id),
"name": ds.name
}
for ds in self.dataset1.sets.all()
],
"set_elements": None, "set_elements": None,
"corpus_id": str(self.corpus.id), "corpus_id": str(self.corpus.id),
"state": "open", "state": "open",
...@@ -677,7 +739,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -677,7 +739,7 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_destroy_not_found(self): def test_destroy_not_found(self):
self.assertFalse(self.dataset_process.datasets.filter(id=self.dataset2.id).exists()) self.assertFalse(self.dataset_process.datasets.filter(id=self.dataset2.id).exists())
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(5): with self.assertNumQueries(6):
response = self.client.delete( response = self.client.delete(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}),
) )
...@@ -700,10 +762,11 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -700,10 +762,11 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_destroy_no_dataset_access_requirement(self): def test_destroy_no_dataset_access_requirement(self):
new_corpus = Corpus.objects.create(name="NERV") new_corpus = Corpus.objects.create(name="NERV")
new_dataset = new_corpus.datasets.create(name="Eva series", description="We created the Evas from Adam", creator=self.user) new_dataset = new_corpus.datasets.create(name="Eva series", description="We created the Evas from Adam", creator=self.user)
ProcessDataset.objects.create(process=self.dataset_process, dataset=new_dataset, sets=new_dataset.sets) test_sets = list(new_dataset.sets.values_list("name", flat=True))
ProcessDataset.objects.create(process=self.dataset_process, dataset=new_dataset, sets=test_sets)
self.assertTrue(ProcessDataset.objects.filter(process=self.dataset_process, dataset=new_dataset).exists()) self.assertTrue(ProcessDataset.objects.filter(process=self.dataset_process, dataset=new_dataset).exists())
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(6): with self.assertNumQueries(7):
response = self.client.delete( response = self.client.delete(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": new_dataset.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": new_dataset.id}),
) )
...@@ -718,7 +781,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -718,7 +781,7 @@ class TestProcessDatasets(FixtureAPITestCase):
self.dataset_process.save() self.dataset_process.save()
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(4): with self.assertNumQueries(5):
response = self.client.delete( response = self.client.delete(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset2.id}),
) )
...@@ -740,7 +803,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -740,7 +803,7 @@ class TestProcessDatasets(FixtureAPITestCase):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
self.dataset_process.tasks.create(run=0, depth=0, slug="makrout") self.dataset_process.tasks.create(run=0, depth=0, slug="makrout")
with self.assertNumQueries(4): with self.assertNumQueries(5):
response = self.client.delete( response = self.client.delete(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
) )
...@@ -750,7 +813,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -750,7 +813,7 @@ class TestProcessDatasets(FixtureAPITestCase):
def test_destroy(self): def test_destroy(self):
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(6): with self.assertNumQueries(7):
response = self.client.delete( response = self.client.delete(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
) )
...@@ -765,7 +828,7 @@ class TestProcessDatasets(FixtureAPITestCase): ...@@ -765,7 +828,7 @@ class TestProcessDatasets(FixtureAPITestCase):
self.process_dataset_1.sets = ["test"] self.process_dataset_1.sets = ["test"]
self.process_dataset_1.save() self.process_dataset_1.save()
self.client.force_login(self.test_user) self.client.force_login(self.test_user)
with self.assertNumQueries(6): with self.assertNumQueries(7):
response = self.client.delete( response = self.client.delete(
reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}), reverse("api:process-dataset", kwargs={"process": self.dataset_process.id, "dataset": self.dataset1.id}),
) )
......
...@@ -2324,7 +2324,7 @@ class TestProcesses(FixtureAPITestCase): ...@@ -2324,7 +2324,7 @@ class TestProcesses(FixtureAPITestCase):
def test_start_process_dataset_requires_dataset_in_same_corpus(self): def test_start_process_dataset_requires_dataset_in_same_corpus(self):
process2 = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset) process2 = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset)
ProcessDataset.objects.create(process=process2, dataset=self.private_dataset, sets=self.private_dataset.sets) ProcessDataset.objects.create(process=process2, dataset=self.private_dataset, sets=list(self.private_dataset.sets.values_list("name", flat=True)))
process2.worker_runs.create(version=self.recognizer, parents=[], configuration=None) process2.worker_runs.create(version=self.recognizer, parents=[], configuration=None)
self.assertFalse(process2.tasks.exists()) self.assertFalse(process2.tasks.exists())
...@@ -2341,8 +2341,8 @@ class TestProcesses(FixtureAPITestCase): ...@@ -2341,8 +2341,8 @@ class TestProcesses(FixtureAPITestCase):
def test_start_process_dataset_unsupported_parameters(self): def test_start_process_dataset_unsupported_parameters(self):
process2 = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset) process2 = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset)
ProcessDataset.objects.create(process=process2, dataset=self.dataset1, sets=self.dataset1.sets) ProcessDataset.objects.create(process=process2, dataset=self.dataset1, sets=list(self.dataset1.sets.values_list("name", flat=True)))
ProcessDataset.objects.create(process=process2, dataset=self.private_dataset, sets=self.dataset2.sets) ProcessDataset.objects.create(process=process2, dataset=self.private_dataset, sets=list(self.dataset2.sets.values_list("name", flat=True)))
process2.worker_runs.create(version=self.recognizer, parents=[], configuration=None) process2.worker_runs.create(version=self.recognizer, parents=[], configuration=None)
self.client.force_login(self.user) self.client.force_login(self.user)
...@@ -2366,8 +2366,8 @@ class TestProcesses(FixtureAPITestCase): ...@@ -2366,8 +2366,8 @@ class TestProcesses(FixtureAPITestCase):
def test_start_process_dataset(self): def test_start_process_dataset(self):
process2 = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset) process2 = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset)
ProcessDataset.objects.create(process=process2, dataset=self.dataset1, sets=self.dataset1.sets) ProcessDataset.objects.create(process=process2, dataset=self.dataset1, sets=list(self.dataset1.sets.values_list("name", flat=True)))
ProcessDataset.objects.create(process=process2, dataset=self.private_dataset, sets=self.private_dataset.sets) ProcessDataset.objects.create(process=process2, dataset=self.private_dataset, sets=list(self.private_dataset.sets.values_list("name", flat=True)))
run = process2.worker_runs.create(version=self.recognizer, parents=[], configuration=None) run = process2.worker_runs.create(version=self.recognizer, parents=[], configuration=None)
self.assertFalse(process2.tasks.exists()) self.assertFalse(process2.tasks.exists())
...@@ -2562,8 +2562,8 @@ class TestProcesses(FixtureAPITestCase): ...@@ -2562,8 +2562,8 @@ class TestProcesses(FixtureAPITestCase):
It should be possible to pass chunks when starting a dataset process It should be possible to pass chunks when starting a dataset process
""" """
process = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset) process = self.corpus.processes.create(creator=self.user, mode=ProcessMode.Dataset)
ProcessDataset.objects.create(process=process, dataset=self.dataset1, sets=self.dataset1.sets) ProcessDataset.objects.create(process=process, dataset=self.dataset1, sets=list(self.dataset1.sets.values_list("name", flat=True)))
ProcessDataset.objects.create(process=process, dataset=self.dataset2, sets=self.dataset2.sets) ProcessDataset.objects.create(process=process, dataset=self.dataset2, sets=list(self.dataset2.sets.values_list("name", flat=True)))
# Add a worker run to this process # Add a worker run to this process
run = process.worker_runs.create(version=self.recognizer, parents=[], configuration=None) run = process.worker_runs.create(version=self.recognizer, parents=[], configuration=None)
......