Coverage for tests\test_get_api_projects_constraints.py: 100.00%

121 statements  

« prev     ^ index     » next       coverage.py v7.4.3, created at 2024-03-22 23:23 +0100

1# -*- coding: utf-8 -*- 

2 

3""" 

4* Name: interactive-clustering-gui/tests/test_get_api_projects_constraints.py 

5* Description: Unittests for `app` module on the `GET /api/projects/{project_id}/constraints` route. 

6* Author: Erwan Schild 

7* Created: 22/02/2022 

8* Licence: CeCILL (https://cecill.info/licences.fr.html) 

9""" 

10 

11# ============================================================================== 

12# IMPORT PYTHON DEPENDENCIES 

13# ============================================================================== 

14 

15import pytest 

16 

17from tests.dummies_utils import create_dummy_projects 

18 

19# ============================================================================== 

20# test_ko_not_found 

21# ============================================================================== 

22 

23 

24@pytest.mark.asyncio() 

25async def test_ko_not_found(async_client): 

26 """ 

27 Test the `GET /api/projects/{project_id}/constraints` route with not existing project. 

28 

29 Arguments: 

30 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

31 """ 

32 # Assert HTTP client is created. 

33 assert async_client 

34 

35 # Assert route `GET /api/projects/{project_id}/constraints` works. 

36 response_get = await async_client.get(url="/api/projects/UNKNOWN_PROJECT/constraints") 

37 assert response_get.status_code == 404 

38 assert response_get.json() == { 

39 "detail": "The project with id 'UNKNOWN_PROJECT' doesn't exist.", 

40 } 

41 

42 

43# ============================================================================== 

44# test_ok_default 

45# ============================================================================== 

46 

47 

48@pytest.mark.asyncio() 

49async def test_ok_default(async_client, tmp_path): 

50 """ 

51 Test the `GET /api/projects/{project_id}/constraints` route. 

52 

53 Arguments: 

54 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

55 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

56 """ 

57 # Assert HTTP client is created. 

58 assert async_client 

59 

60 # Create dummy projects. 

61 create_dummy_projects( 

62 tmp_path=tmp_path, 

63 list_of_dummy_project_ids=[ 

64 "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

65 ], 

66 ) 

67 

68 # Assert route `GET /api/projects/{project_id}/constraints` works. 

69 response_get = await async_client.get(url="/api/projects/1l_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints") 

70 assert response_get.status_code == 200 

71 list_of_hidden_marks = [ 

72 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

73 ] 

74 assert True not in list_of_hidden_marks 

75 assert response_get.json() == { 

76 "project_id": "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

77 "constraints": { 

78 "(0,4)": { 

79 "data": {"id_1": "0", "id_2": "4"}, 

80 "constraint_type": "MUST_LINK", 

81 "constraint_type_previous": [ 

82 None, 

83 "MUST_LINK", 

84 None, 

85 "MUST_LINK", 

86 None, 

87 None, 

88 None, 

89 "MUST_LINK", 

90 "MUST_LINK", 

91 "CANNOT_LINK", 

92 ], 

93 "is_hidden": False, 

94 "to_annotate": False, 

95 "to_review": False, 

96 "to_fix_conflict": False, 

97 "comment": "", 

98 "date_of_update": 1657545443.884245, 

99 "iteration_of_sampling": 1, 

100 }, 

101 "(1,2)": { 

102 "data": {"id_1": "1", "id_2": "2"}, 

103 "constraint_type": "MUST_LINK", 

104 "constraint_type_previous": [None], 

105 "is_hidden": False, 

106 "to_annotate": False, 

107 "to_review": False, 

108 "to_fix_conflict": False, 

109 "comment": "", 

110 "date_of_update": 1657543438.389156, 

111 "iteration_of_sampling": 1, 

112 }, 

113 "(1,3)": { 

114 "data": {"id_1": "1", "id_2": "3"}, 

115 "constraint_type": "MUST_LINK", 

116 "constraint_type_previous": [None], 

117 "is_hidden": False, 

118 "to_annotate": False, 

119 "to_review": False, 

120 "to_fix_conflict": False, 

121 "comment": "", 

122 "date_of_update": 1657543464.28536, 

123 "iteration_of_sampling": 1, 

124 }, 

125 "(1,6)": { 

126 "data": {"id_1": "1", "id_2": "6"}, 

127 "constraint_type": "MUST_LINK", 

128 "constraint_type_previous": [None], 

129 "is_hidden": False, 

130 "to_annotate": False, 

131 "to_review": True, 

132 "to_fix_conflict": False, 

133 "comment": "", 

134 "date_of_update": 1657543490.330898, 

135 "iteration_of_sampling": 1, 

136 }, 

137 "(1,7)": { 

138 "data": {"id_1": "1", "id_2": "7"}, 

139 "constraint_type": "MUST_LINK", 

140 "constraint_type_previous": [None], 

141 "is_hidden": False, 

142 "to_annotate": False, 

143 "to_review": True, 

144 "to_fix_conflict": False, 

145 "comment": "", 

146 "date_of_update": 1657543507.347849, 

147 "iteration_of_sampling": 1, 

148 }, 

149 "(10,11)": { 

150 "data": {"id_1": "10", "id_2": "11"}, 

151 "constraint_type": "MUST_LINK", 

152 "constraint_type_previous": [None], 

153 "is_hidden": False, 

154 "to_annotate": False, 

155 "to_review": False, 

156 "to_fix_conflict": False, 

157 "comment": "", 

158 "date_of_update": 1657543487.605554, 

159 "iteration_of_sampling": 1, 

160 }, 

161 "(10,9)": { 

162 "data": {"id_1": "10", "id_2": "9"}, 

163 "constraint_type": "MUST_LINK", 

164 "constraint_type_previous": [None], 

165 "is_hidden": False, 

166 "to_annotate": False, 

167 "to_review": False, 

168 "to_fix_conflict": False, 

169 "comment": "", 

170 "date_of_update": 1657543432.412055, 

171 "iteration_of_sampling": 1, 

172 }, 

173 "(11,12)": { 

174 "data": {"id_1": "11", "id_2": "12"}, 

175 "constraint_type": "MUST_LINK", 

176 "constraint_type_previous": [None], 

177 "is_hidden": False, 

178 "to_annotate": False, 

179 "to_review": False, 

180 "to_fix_conflict": False, 

181 "comment": "", 

182 "date_of_update": 1657543475.46025, 

183 "iteration_of_sampling": 1, 

184 }, 

185 "(12,9)": { 

186 "data": {"id_1": "12", "id_2": "9"}, 

187 "constraint_type": "MUST_LINK", 

188 "constraint_type_previous": [None, "CANNOT_LINK"], 

189 "is_hidden": False, 

190 "to_annotate": False, 

191 "to_review": False, 

192 "to_fix_conflict": False, 

193 "comment": "", 

194 "date_of_update": 1657543315.242459, 

195 "iteration_of_sampling": 1, 

196 }, 

197 "(13,16)": { 

198 "data": {"id_1": "13", "id_2": "16"}, 

199 "constraint_type": "CANNOT_LINK", 

200 "constraint_type_previous": [None], 

201 "is_hidden": False, 

202 "to_annotate": False, 

203 "to_review": False, 

204 "to_fix_conflict": False, 

205 "comment": "", 

206 "date_of_update": 1657545332.124029, 

207 "iteration_of_sampling": 1, 

208 }, 

209 "(15,16)": { 

210 "data": {"id_1": "15", "id_2": "16"}, 

211 "constraint_type": "CANNOT_LINK", 

212 "constraint_type_previous": [None], 

213 "is_hidden": False, 

214 "to_annotate": False, 

215 "to_review": False, 

216 "to_fix_conflict": False, 

217 "comment": "", 

218 "date_of_update": 1657545325.795985, 

219 "iteration_of_sampling": 1, 

220 }, 

221 "(17,22)": { 

222 "data": {"id_1": "17", "id_2": "22"}, 

223 "constraint_type": "MUST_LINK", 

224 "constraint_type_previous": [None], 

225 "is_hidden": False, 

226 "to_annotate": False, 

227 "to_review": False, 

228 "to_fix_conflict": False, 

229 "comment": "", 

230 "date_of_update": 1657543500.755786, 

231 "iteration_of_sampling": 1, 

232 }, 

233 "(18,22)": { 

234 "data": {"id_1": "18", "id_2": "22"}, 

235 "constraint_type": "MUST_LINK", 

236 "constraint_type_previous": [None], 

237 "is_hidden": False, 

238 "to_annotate": False, 

239 "to_review": False, 

240 "to_fix_conflict": False, 

241 "comment": "", 

242 "date_of_update": 1657543537.76648, 

243 "iteration_of_sampling": 1, 

244 }, 

245 "(18,8)": { 

246 "data": {"id_1": "18", "id_2": "8"}, 

247 "constraint_type": "CANNOT_LINK", 

248 "constraint_type_previous": [None], 

249 "is_hidden": False, 

250 "to_annotate": False, 

251 "to_review": False, 

252 "to_fix_conflict": False, 

253 "comment": "", 

254 "date_of_update": 1657545348.247546, 

255 "iteration_of_sampling": 1, 

256 }, 

257 "(19,22)": { 

258 "data": {"id_1": "19", "id_2": "22"}, 

259 "constraint_type": "MUST_LINK", 

260 "constraint_type_previous": [None], 

261 "is_hidden": False, 

262 "to_annotate": False, 

263 "to_review": False, 

264 "to_fix_conflict": False, 

265 "comment": "", 

266 "date_of_update": 1657543503.891212, 

267 "iteration_of_sampling": 1, 

268 }, 

269 "(2,4)": { 

270 "data": {"id_1": "2", "id_2": "4"}, 

271 "constraint_type": "MUST_LINK", 

272 "constraint_type_previous": [None], 

273 "is_hidden": False, 

274 "to_annotate": False, 

275 "to_review": False, 

276 "to_fix_conflict": False, 

277 "comment": "", 

278 "date_of_update": 1657543493.240642, 

279 "iteration_of_sampling": 1, 

280 }, 

281 "(20,22)": { 

282 "data": {"id_1": "20", "id_2": "22"}, 

283 "constraint_type": "MUST_LINK", 

284 "constraint_type_previous": [None], 

285 "is_hidden": False, 

286 "to_annotate": False, 

287 "to_review": False, 

288 "to_fix_conflict": False, 

289 "comment": "", 

290 "date_of_update": 1657543457.282708, 

291 "iteration_of_sampling": 1, 

292 }, 

293 "(21,22)": { 

294 "data": {"id_1": "21", "id_2": "22"}, 

295 "constraint_type": "MUST_LINK", 

296 "constraint_type_previous": [None], 

297 "is_hidden": False, 

298 "to_annotate": False, 

299 "to_review": False, 

300 "to_fix_conflict": False, 

301 "comment": "", 

302 "date_of_update": 1657543471.789491, 

303 "iteration_of_sampling": 1, 

304 }, 

305 "(22,6)": { 

306 "data": {"id_1": "22", "id_2": "6"}, 

307 "constraint_type": "CANNOT_LINK", 

308 "constraint_type_previous": [None], 

309 "is_hidden": False, 

310 "to_annotate": False, 

311 "to_review": False, 

312 "to_fix_conflict": False, 

313 "comment": "", 

314 "date_of_update": 1657543454.547808, 

315 "iteration_of_sampling": 1, 

316 }, 

317 "(22,8)": { 

318 "data": {"id_1": "22", "id_2": "8"}, 

319 "constraint_type": "CANNOT_LINK", 

320 "constraint_type_previous": [None], 

321 "is_hidden": False, 

322 "to_annotate": False, 

323 "to_review": False, 

324 "to_fix_conflict": False, 

325 "comment": "", 

326 "date_of_update": 1657543535.036781, 

327 "iteration_of_sampling": 1, 

328 }, 

329 "(4,6)": { 

330 "data": {"id_1": "4", "id_2": "6"}, 

331 "constraint_type": "MUST_LINK", 

332 "constraint_type_previous": [None], 

333 "is_hidden": False, 

334 "to_annotate": False, 

335 "to_review": True, 

336 "to_fix_conflict": False, 

337 "comment": "", 

338 "date_of_update": 1657545344.703469, 

339 "iteration_of_sampling": 1, 

340 }, 

341 "(4,7)": { 

342 "data": {"id_1": "4", "id_2": "7"}, 

343 "constraint_type": "MUST_LINK", 

344 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

345 "is_hidden": False, 

346 "to_annotate": False, 

347 "to_review": True, 

348 "to_fix_conflict": False, 

349 "comment": "Même intention (gestion carte virtuelle).", 

350 "date_of_update": 1657546214.538204, 

351 "iteration_of_sampling": 1, 

352 }, 

353 "(8,9)": { 

354 "data": {"id_1": "8", "id_2": "9"}, 

355 "constraint_type": "MUST_LINK", 

356 "constraint_type_previous": [None], 

357 "is_hidden": False, 

358 "to_annotate": False, 

359 "to_review": False, 

360 "to_fix_conflict": False, 

361 "comment": "", 

362 "date_of_update": 1657543496.268081, 

363 "iteration_of_sampling": 1, 

364 }, 

365 }, 

366 "parameters": { 

367 "without_hidden_constraints": True, 

368 "sorted_by": "id", 

369 "sorted_reverse": False, 

370 }, 

371 } 

372 

373 

374# ============================================================================== 

375# test_ok_with_hidden 

376# ============================================================================== 

377 

378 

379@pytest.mark.asyncio() 

380async def test_ok_with_hidden(async_client, tmp_path): 

381 """ 

382 Test the `GET /api/projects/{project_id}/constraints` route. 

383 

384 Arguments: 

385 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

386 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

387 """ 

388 # Assert HTTP client is created. 

389 assert async_client 

390 

391 # Create dummy projects. 

392 create_dummy_projects( 

393 tmp_path=tmp_path, 

394 list_of_dummy_project_ids=[ 

395 "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

396 ], 

397 ) 

398 

399 # Assert route `GET /api/projects/{project_id}/constraints` works. 

400 response_get = await async_client.get( 

401 url="/api/projects/1l_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints?without_hidden_constraints=False" 

402 ) 

403 assert response_get.status_code == 200 

404 list_of_hidden_marks = [ 

405 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

406 ] 

407 assert True in list_of_hidden_marks 

408 assert response_get.json() == { 

409 "project_id": "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

410 "constraints": { 

411 "(0,4)": { 

412 "data": {"id_1": "0", "id_2": "4"}, 

413 "constraint_type": "MUST_LINK", 

414 "constraint_type_previous": [ 

415 None, 

416 "MUST_LINK", 

417 None, 

418 "MUST_LINK", 

419 None, 

420 None, 

421 None, 

422 "MUST_LINK", 

423 "MUST_LINK", 

424 "CANNOT_LINK", 

425 ], 

426 "is_hidden": False, 

427 "to_annotate": False, 

428 "to_review": False, 

429 "to_fix_conflict": False, 

430 "comment": "", 

431 "date_of_update": 1657545443.884245, 

432 "iteration_of_sampling": 1, 

433 }, 

434 "(1,2)": { 

435 "data": {"id_1": "1", "id_2": "2"}, 

436 "constraint_type": "MUST_LINK", 

437 "constraint_type_previous": [None], 

438 "is_hidden": False, 

439 "to_annotate": False, 

440 "to_review": False, 

441 "to_fix_conflict": False, 

442 "comment": "", 

443 "date_of_update": 1657543438.389156, 

444 "iteration_of_sampling": 1, 

445 }, 

446 "(1,3)": { 

447 "data": {"id_1": "1", "id_2": "3"}, 

448 "constraint_type": "MUST_LINK", 

449 "constraint_type_previous": [None], 

450 "is_hidden": False, 

451 "to_annotate": False, 

452 "to_review": False, 

453 "to_fix_conflict": False, 

454 "comment": "", 

455 "date_of_update": 1657543464.28536, 

456 "iteration_of_sampling": 1, 

457 }, 

458 "(1,6)": { 

459 "data": {"id_1": "1", "id_2": "6"}, 

460 "constraint_type": "MUST_LINK", 

461 "constraint_type_previous": [None], 

462 "is_hidden": False, 

463 "to_annotate": False, 

464 "to_review": True, 

465 "to_fix_conflict": False, 

466 "comment": "", 

467 "date_of_update": 1657543490.330898, 

468 "iteration_of_sampling": 1, 

469 }, 

470 "(1,7)": { 

471 "data": {"id_1": "1", "id_2": "7"}, 

472 "constraint_type": "MUST_LINK", 

473 "constraint_type_previous": [None], 

474 "is_hidden": False, 

475 "to_annotate": False, 

476 "to_review": True, 

477 "to_fix_conflict": False, 

478 "comment": "", 

479 "date_of_update": 1657543507.347849, 

480 "iteration_of_sampling": 1, 

481 }, 

482 "(10,11)": { 

483 "data": {"id_1": "10", "id_2": "11"}, 

484 "constraint_type": "MUST_LINK", 

485 "constraint_type_previous": [None], 

486 "is_hidden": False, 

487 "to_annotate": False, 

488 "to_review": False, 

489 "to_fix_conflict": False, 

490 "comment": "", 

491 "date_of_update": 1657543487.605554, 

492 "iteration_of_sampling": 1, 

493 }, 

494 "(10,9)": { 

495 "data": {"id_1": "10", "id_2": "9"}, 

496 "constraint_type": "MUST_LINK", 

497 "constraint_type_previous": [None], 

498 "is_hidden": False, 

499 "to_annotate": False, 

500 "to_review": False, 

501 "to_fix_conflict": False, 

502 "comment": "", 

503 "date_of_update": 1657543432.412055, 

504 "iteration_of_sampling": 1, 

505 }, 

506 "(11,12)": { 

507 "data": {"id_1": "11", "id_2": "12"}, 

508 "constraint_type": "MUST_LINK", 

509 "constraint_type_previous": [None], 

510 "is_hidden": False, 

511 "to_annotate": False, 

512 "to_review": False, 

513 "to_fix_conflict": False, 

514 "comment": "", 

515 "date_of_update": 1657543475.46025, 

516 "iteration_of_sampling": 1, 

517 }, 

518 "(11,14)": { 

519 "data": {"id_1": "11", "id_2": "14"}, 

520 "constraint_type": None, 

521 "constraint_type_previous": [], 

522 "is_hidden": True, 

523 "to_annotate": True, 

524 "to_review": False, 

525 "to_fix_conflict": False, 

526 "comment": "", 

527 "date_of_update": None, 

528 "iteration_of_sampling": 1, 

529 }, 

530 "(12,9)": { 

531 "data": {"id_1": "12", "id_2": "9"}, 

532 "constraint_type": "MUST_LINK", 

533 "constraint_type_previous": [None, "CANNOT_LINK"], 

534 "is_hidden": False, 

535 "to_annotate": False, 

536 "to_review": False, 

537 "to_fix_conflict": False, 

538 "comment": "", 

539 "date_of_update": 1657543315.242459, 

540 "iteration_of_sampling": 1, 

541 }, 

542 "(13,16)": { 

543 "data": {"id_1": "13", "id_2": "16"}, 

544 "constraint_type": "CANNOT_LINK", 

545 "constraint_type_previous": [None], 

546 "is_hidden": False, 

547 "to_annotate": False, 

548 "to_review": False, 

549 "to_fix_conflict": False, 

550 "comment": "", 

551 "date_of_update": 1657545332.124029, 

552 "iteration_of_sampling": 1, 

553 }, 

554 "(14,9)": { 

555 "data": {"id_1": "14", "id_2": "9"}, 

556 "constraint_type": None, 

557 "constraint_type_previous": [], 

558 "is_hidden": True, 

559 "to_annotate": True, 

560 "to_review": False, 

561 "to_fix_conflict": False, 

562 "comment": "", 

563 "date_of_update": None, 

564 "iteration_of_sampling": 1, 

565 }, 

566 "(15,16)": { 

567 "data": {"id_1": "15", "id_2": "16"}, 

568 "constraint_type": "CANNOT_LINK", 

569 "constraint_type_previous": [None], 

570 "is_hidden": False, 

571 "to_annotate": False, 

572 "to_review": False, 

573 "to_fix_conflict": False, 

574 "comment": "", 

575 "date_of_update": 1657545325.795985, 

576 "iteration_of_sampling": 1, 

577 }, 

578 "(17,22)": { 

579 "data": {"id_1": "17", "id_2": "22"}, 

580 "constraint_type": "MUST_LINK", 

581 "constraint_type_previous": [None], 

582 "is_hidden": False, 

583 "to_annotate": False, 

584 "to_review": False, 

585 "to_fix_conflict": False, 

586 "comment": "", 

587 "date_of_update": 1657543500.755786, 

588 "iteration_of_sampling": 1, 

589 }, 

590 "(18,22)": { 

591 "data": {"id_1": "18", "id_2": "22"}, 

592 "constraint_type": "MUST_LINK", 

593 "constraint_type_previous": [None], 

594 "is_hidden": False, 

595 "to_annotate": False, 

596 "to_review": False, 

597 "to_fix_conflict": False, 

598 "comment": "", 

599 "date_of_update": 1657543537.76648, 

600 "iteration_of_sampling": 1, 

601 }, 

602 "(18,8)": { 

603 "data": {"id_1": "18", "id_2": "8"}, 

604 "constraint_type": "CANNOT_LINK", 

605 "constraint_type_previous": [None], 

606 "is_hidden": False, 

607 "to_annotate": False, 

608 "to_review": False, 

609 "to_fix_conflict": False, 

610 "comment": "", 

611 "date_of_update": 1657545348.247546, 

612 "iteration_of_sampling": 1, 

613 }, 

614 "(19,22)": { 

615 "data": {"id_1": "19", "id_2": "22"}, 

616 "constraint_type": "MUST_LINK", 

617 "constraint_type_previous": [None], 

618 "is_hidden": False, 

619 "to_annotate": False, 

620 "to_review": False, 

621 "to_fix_conflict": False, 

622 "comment": "", 

623 "date_of_update": 1657543503.891212, 

624 "iteration_of_sampling": 1, 

625 }, 

626 "(2,4)": { 

627 "data": {"id_1": "2", "id_2": "4"}, 

628 "constraint_type": "MUST_LINK", 

629 "constraint_type_previous": [None], 

630 "is_hidden": False, 

631 "to_annotate": False, 

632 "to_review": False, 

633 "to_fix_conflict": False, 

634 "comment": "", 

635 "date_of_update": 1657543493.240642, 

636 "iteration_of_sampling": 1, 

637 }, 

638 "(20,22)": { 

639 "data": {"id_1": "20", "id_2": "22"}, 

640 "constraint_type": "MUST_LINK", 

641 "constraint_type_previous": [None], 

642 "is_hidden": False, 

643 "to_annotate": False, 

644 "to_review": False, 

645 "to_fix_conflict": False, 

646 "comment": "", 

647 "date_of_update": 1657543457.282708, 

648 "iteration_of_sampling": 1, 

649 }, 

650 "(21,22)": { 

651 "data": {"id_1": "21", "id_2": "22"}, 

652 "constraint_type": "MUST_LINK", 

653 "constraint_type_previous": [None], 

654 "is_hidden": False, 

655 "to_annotate": False, 

656 "to_review": False, 

657 "to_fix_conflict": False, 

658 "comment": "", 

659 "date_of_update": 1657543471.789491, 

660 "iteration_of_sampling": 1, 

661 }, 

662 "(22,6)": { 

663 "data": {"id_1": "22", "id_2": "6"}, 

664 "constraint_type": "CANNOT_LINK", 

665 "constraint_type_previous": [None], 

666 "is_hidden": False, 

667 "to_annotate": False, 

668 "to_review": False, 

669 "to_fix_conflict": False, 

670 "comment": "", 

671 "date_of_update": 1657543454.547808, 

672 "iteration_of_sampling": 1, 

673 }, 

674 "(22,8)": { 

675 "data": {"id_1": "22", "id_2": "8"}, 

676 "constraint_type": "CANNOT_LINK", 

677 "constraint_type_previous": [None], 

678 "is_hidden": False, 

679 "to_annotate": False, 

680 "to_review": False, 

681 "to_fix_conflict": False, 

682 "comment": "", 

683 "date_of_update": 1657543535.036781, 

684 "iteration_of_sampling": 1, 

685 }, 

686 "(4,6)": { 

687 "data": {"id_1": "4", "id_2": "6"}, 

688 "constraint_type": "MUST_LINK", 

689 "constraint_type_previous": [None], 

690 "is_hidden": False, 

691 "to_annotate": False, 

692 "to_review": True, 

693 "to_fix_conflict": False, 

694 "comment": "", 

695 "date_of_update": 1657545344.703469, 

696 "iteration_of_sampling": 1, 

697 }, 

698 "(4,7)": { 

699 "data": {"id_1": "4", "id_2": "7"}, 

700 "constraint_type": "MUST_LINK", 

701 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

702 "is_hidden": False, 

703 "to_annotate": False, 

704 "to_review": True, 

705 "to_fix_conflict": False, 

706 "comment": "Même intention (gestion carte virtuelle).", 

707 "date_of_update": 1657546214.538204, 

708 "iteration_of_sampling": 1, 

709 }, 

710 "(8,9)": { 

711 "data": {"id_1": "8", "id_2": "9"}, 

712 "constraint_type": "MUST_LINK", 

713 "constraint_type_previous": [None], 

714 "is_hidden": False, 

715 "to_annotate": False, 

716 "to_review": False, 

717 "to_fix_conflict": False, 

718 "comment": "", 

719 "date_of_update": 1657543496.268081, 

720 "iteration_of_sampling": 1, 

721 }, 

722 }, 

723 "parameters": { 

724 "without_hidden_constraints": False, 

725 "sorted_by": "id", 

726 "sorted_reverse": False, 

727 }, 

728 } 

729 

730 

731# ============================================================================== 

732# test_ok_by_id 

733# ============================================================================== 

734 

735 

736@pytest.mark.asyncio() 

737async def test_ok_by_id(async_client, tmp_path): 

738 """ 

739 Test the `GET /api/projects/{project_id}/constraints` route. 

740 

741 Arguments: 

742 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

743 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

744 """ 

745 # Assert HTTP client is created. 

746 assert async_client 

747 

748 # Create dummy projects. 

749 create_dummy_projects( 

750 tmp_path=tmp_path, 

751 list_of_dummy_project_ids=[ 

752 "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

753 ], 

754 ) 

755 

756 # Assert route `GET /api/projects/{project_id}/constraints` works. 

757 response_get = await async_client.get( 

758 url="/api/projects/1l_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints?sorted_by=id" 

759 ) 

760 assert response_get.status_code == 200 

761 list_of_hidden_marks = [ 

762 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

763 ] 

764 assert True not in list_of_hidden_marks 

765 list_of_ids = list(response_get.json()["constraints"].keys()) 

766 assert list_of_ids == sorted(list_of_ids) 

767 assert response_get.json() == { 

768 "project_id": "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

769 "constraints": { 

770 "(0,4)": { 

771 "data": {"id_1": "0", "id_2": "4"}, 

772 "constraint_type": "MUST_LINK", 

773 "constraint_type_previous": [ 

774 None, 

775 "MUST_LINK", 

776 None, 

777 "MUST_LINK", 

778 None, 

779 None, 

780 None, 

781 "MUST_LINK", 

782 "MUST_LINK", 

783 "CANNOT_LINK", 

784 ], 

785 "is_hidden": False, 

786 "to_annotate": False, 

787 "to_review": False, 

788 "to_fix_conflict": False, 

789 "comment": "", 

790 "date_of_update": 1657545443.884245, 

791 "iteration_of_sampling": 1, 

792 }, 

793 "(1,2)": { 

794 "data": {"id_1": "1", "id_2": "2"}, 

795 "constraint_type": "MUST_LINK", 

796 "constraint_type_previous": [None], 

797 "is_hidden": False, 

798 "to_annotate": False, 

799 "to_review": False, 

800 "to_fix_conflict": False, 

801 "comment": "", 

802 "date_of_update": 1657543438.389156, 

803 "iteration_of_sampling": 1, 

804 }, 

805 "(1,3)": { 

806 "data": {"id_1": "1", "id_2": "3"}, 

807 "constraint_type": "MUST_LINK", 

808 "constraint_type_previous": [None], 

809 "is_hidden": False, 

810 "to_annotate": False, 

811 "to_review": False, 

812 "to_fix_conflict": False, 

813 "comment": "", 

814 "date_of_update": 1657543464.28536, 

815 "iteration_of_sampling": 1, 

816 }, 

817 "(1,6)": { 

818 "data": {"id_1": "1", "id_2": "6"}, 

819 "constraint_type": "MUST_LINK", 

820 "constraint_type_previous": [None], 

821 "is_hidden": False, 

822 "to_annotate": False, 

823 "to_review": True, 

824 "to_fix_conflict": False, 

825 "comment": "", 

826 "date_of_update": 1657543490.330898, 

827 "iteration_of_sampling": 1, 

828 }, 

829 "(1,7)": { 

830 "data": {"id_1": "1", "id_2": "7"}, 

831 "constraint_type": "MUST_LINK", 

832 "constraint_type_previous": [None], 

833 "is_hidden": False, 

834 "to_annotate": False, 

835 "to_review": True, 

836 "to_fix_conflict": False, 

837 "comment": "", 

838 "date_of_update": 1657543507.347849, 

839 "iteration_of_sampling": 1, 

840 }, 

841 "(10,11)": { 

842 "data": {"id_1": "10", "id_2": "11"}, 

843 "constraint_type": "MUST_LINK", 

844 "constraint_type_previous": [None], 

845 "is_hidden": False, 

846 "to_annotate": False, 

847 "to_review": False, 

848 "to_fix_conflict": False, 

849 "comment": "", 

850 "date_of_update": 1657543487.605554, 

851 "iteration_of_sampling": 1, 

852 }, 

853 "(10,9)": { 

854 "data": {"id_1": "10", "id_2": "9"}, 

855 "constraint_type": "MUST_LINK", 

856 "constraint_type_previous": [None], 

857 "is_hidden": False, 

858 "to_annotate": False, 

859 "to_review": False, 

860 "to_fix_conflict": False, 

861 "comment": "", 

862 "date_of_update": 1657543432.412055, 

863 "iteration_of_sampling": 1, 

864 }, 

865 "(11,12)": { 

866 "data": {"id_1": "11", "id_2": "12"}, 

867 "constraint_type": "MUST_LINK", 

868 "constraint_type_previous": [None], 

869 "is_hidden": False, 

870 "to_annotate": False, 

871 "to_review": False, 

872 "to_fix_conflict": False, 

873 "comment": "", 

874 "date_of_update": 1657543475.46025, 

875 "iteration_of_sampling": 1, 

876 }, 

877 "(12,9)": { 

878 "data": {"id_1": "12", "id_2": "9"}, 

879 "constraint_type": "MUST_LINK", 

880 "constraint_type_previous": [None, "CANNOT_LINK"], 

881 "is_hidden": False, 

882 "to_annotate": False, 

883 "to_review": False, 

884 "to_fix_conflict": False, 

885 "comment": "", 

886 "date_of_update": 1657543315.242459, 

887 "iteration_of_sampling": 1, 

888 }, 

889 "(13,16)": { 

890 "data": {"id_1": "13", "id_2": "16"}, 

891 "constraint_type": "CANNOT_LINK", 

892 "constraint_type_previous": [None], 

893 "is_hidden": False, 

894 "to_annotate": False, 

895 "to_review": False, 

896 "to_fix_conflict": False, 

897 "comment": "", 

898 "date_of_update": 1657545332.124029, 

899 "iteration_of_sampling": 1, 

900 }, 

901 "(15,16)": { 

902 "data": {"id_1": "15", "id_2": "16"}, 

903 "constraint_type": "CANNOT_LINK", 

904 "constraint_type_previous": [None], 

905 "is_hidden": False, 

906 "to_annotate": False, 

907 "to_review": False, 

908 "to_fix_conflict": False, 

909 "comment": "", 

910 "date_of_update": 1657545325.795985, 

911 "iteration_of_sampling": 1, 

912 }, 

913 "(17,22)": { 

914 "data": {"id_1": "17", "id_2": "22"}, 

915 "constraint_type": "MUST_LINK", 

916 "constraint_type_previous": [None], 

917 "is_hidden": False, 

918 "to_annotate": False, 

919 "to_review": False, 

920 "to_fix_conflict": False, 

921 "comment": "", 

922 "date_of_update": 1657543500.755786, 

923 "iteration_of_sampling": 1, 

924 }, 

925 "(18,22)": { 

926 "data": {"id_1": "18", "id_2": "22"}, 

927 "constraint_type": "MUST_LINK", 

928 "constraint_type_previous": [None], 

929 "is_hidden": False, 

930 "to_annotate": False, 

931 "to_review": False, 

932 "to_fix_conflict": False, 

933 "comment": "", 

934 "date_of_update": 1657543537.76648, 

935 "iteration_of_sampling": 1, 

936 }, 

937 "(18,8)": { 

938 "data": {"id_1": "18", "id_2": "8"}, 

939 "constraint_type": "CANNOT_LINK", 

940 "constraint_type_previous": [None], 

941 "is_hidden": False, 

942 "to_annotate": False, 

943 "to_review": False, 

944 "to_fix_conflict": False, 

945 "comment": "", 

946 "date_of_update": 1657545348.247546, 

947 "iteration_of_sampling": 1, 

948 }, 

949 "(19,22)": { 

950 "data": {"id_1": "19", "id_2": "22"}, 

951 "constraint_type": "MUST_LINK", 

952 "constraint_type_previous": [None], 

953 "is_hidden": False, 

954 "to_annotate": False, 

955 "to_review": False, 

956 "to_fix_conflict": False, 

957 "comment": "", 

958 "date_of_update": 1657543503.891212, 

959 "iteration_of_sampling": 1, 

960 }, 

961 "(2,4)": { 

962 "data": {"id_1": "2", "id_2": "4"}, 

963 "constraint_type": "MUST_LINK", 

964 "constraint_type_previous": [None], 

965 "is_hidden": False, 

966 "to_annotate": False, 

967 "to_review": False, 

968 "to_fix_conflict": False, 

969 "comment": "", 

970 "date_of_update": 1657543493.240642, 

971 "iteration_of_sampling": 1, 

972 }, 

973 "(20,22)": { 

974 "data": {"id_1": "20", "id_2": "22"}, 

975 "constraint_type": "MUST_LINK", 

976 "constraint_type_previous": [None], 

977 "is_hidden": False, 

978 "to_annotate": False, 

979 "to_review": False, 

980 "to_fix_conflict": False, 

981 "comment": "", 

982 "date_of_update": 1657543457.282708, 

983 "iteration_of_sampling": 1, 

984 }, 

985 "(21,22)": { 

986 "data": {"id_1": "21", "id_2": "22"}, 

987 "constraint_type": "MUST_LINK", 

988 "constraint_type_previous": [None], 

989 "is_hidden": False, 

990 "to_annotate": False, 

991 "to_review": False, 

992 "to_fix_conflict": False, 

993 "comment": "", 

994 "date_of_update": 1657543471.789491, 

995 "iteration_of_sampling": 1, 

996 }, 

997 "(22,6)": { 

998 "data": {"id_1": "22", "id_2": "6"}, 

999 "constraint_type": "CANNOT_LINK", 

1000 "constraint_type_previous": [None], 

1001 "is_hidden": False, 

1002 "to_annotate": False, 

1003 "to_review": False, 

1004 "to_fix_conflict": False, 

1005 "comment": "", 

1006 "date_of_update": 1657543454.547808, 

1007 "iteration_of_sampling": 1, 

1008 }, 

1009 "(22,8)": { 

1010 "data": {"id_1": "22", "id_2": "8"}, 

1011 "constraint_type": "CANNOT_LINK", 

1012 "constraint_type_previous": [None], 

1013 "is_hidden": False, 

1014 "to_annotate": False, 

1015 "to_review": False, 

1016 "to_fix_conflict": False, 

1017 "comment": "", 

1018 "date_of_update": 1657543535.036781, 

1019 "iteration_of_sampling": 1, 

1020 }, 

1021 "(4,6)": { 

1022 "data": {"id_1": "4", "id_2": "6"}, 

1023 "constraint_type": "MUST_LINK", 

1024 "constraint_type_previous": [None], 

1025 "is_hidden": False, 

1026 "to_annotate": False, 

1027 "to_review": True, 

1028 "to_fix_conflict": False, 

1029 "comment": "", 

1030 "date_of_update": 1657545344.703469, 

1031 "iteration_of_sampling": 1, 

1032 }, 

1033 "(4,7)": { 

1034 "data": {"id_1": "4", "id_2": "7"}, 

1035 "constraint_type": "MUST_LINK", 

1036 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

1037 "is_hidden": False, 

1038 "to_annotate": False, 

1039 "to_review": True, 

1040 "to_fix_conflict": False, 

1041 "comment": "Même intention (gestion carte virtuelle).", 

1042 "date_of_update": 1657546214.538204, 

1043 "iteration_of_sampling": 1, 

1044 }, 

1045 "(8,9)": { 

1046 "data": {"id_1": "8", "id_2": "9"}, 

1047 "constraint_type": "MUST_LINK", 

1048 "constraint_type_previous": [None], 

1049 "is_hidden": False, 

1050 "to_annotate": False, 

1051 "to_review": False, 

1052 "to_fix_conflict": False, 

1053 "comment": "", 

1054 "date_of_update": 1657543496.268081, 

1055 "iteration_of_sampling": 1, 

1056 }, 

1057 }, 

1058 "parameters": { 

1059 "without_hidden_constraints": True, 

1060 "sorted_by": "id", 

1061 "sorted_reverse": False, 

1062 }, 

1063 } 

1064 

1065 

1066# ============================================================================== 

1067# test_ok_by_text 

1068# ============================================================================== 

1069 

1070 

1071@pytest.mark.asyncio() 

1072async def test_ok_by_text(async_client, tmp_path): 

1073 """ 

1074 Test the `GET /api/projects/{project_id}/constraints` route. 

1075 

1076 Arguments: 

1077 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

1078 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

1079 """ 

1080 # Assert HTTP client is created. 

1081 assert async_client 

1082 

1083 # Create dummy projects. 

1084 create_dummy_projects( 

1085 tmp_path=tmp_path, 

1086 list_of_dummy_project_ids=[ 

1087 "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

1088 ], 

1089 ) 

1090 

1091 # Assert route `GET /api/projects/{project_id}/constraints` works. 

1092 response_get = await async_client.get( 

1093 url="/api/projects/1l_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints?sorted_by=text" 

1094 ) 

1095 assert response_get.status_code == 200 

1096 list_of_hidden_marks = [ 

1097 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

1098 ] 

1099 assert True not in list_of_hidden_marks 

1100 assert response_get.json() == { 

1101 "project_id": "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

1102 "constraints": { 

1103 "(8,9)": { 

1104 "data": {"id_1": "8", "id_2": "9"}, 

1105 "constraint_type": "MUST_LINK", 

1106 "constraint_type_previous": [None], 

1107 "is_hidden": False, 

1108 "to_annotate": False, 

1109 "to_review": False, 

1110 "to_fix_conflict": False, 

1111 "comment": "", 

1112 "date_of_update": 1657543496.268081, 

1113 "iteration_of_sampling": 1, 

1114 }, 

1115 "(2,4)": { 

1116 "data": {"id_1": "2", "id_2": "4"}, 

1117 "constraint_type": "MUST_LINK", 

1118 "constraint_type_previous": [None], 

1119 "is_hidden": False, 

1120 "to_annotate": False, 

1121 "to_review": False, 

1122 "to_fix_conflict": False, 

1123 "comment": "", 

1124 "date_of_update": 1657543493.240642, 

1125 "iteration_of_sampling": 1, 

1126 }, 

1127 "(18,8)": { 

1128 "data": {"id_1": "18", "id_2": "8"}, 

1129 "constraint_type": "CANNOT_LINK", 

1130 "constraint_type_previous": [None], 

1131 "is_hidden": False, 

1132 "to_annotate": False, 

1133 "to_review": False, 

1134 "to_fix_conflict": False, 

1135 "comment": "", 

1136 "date_of_update": 1657545348.247546, 

1137 "iteration_of_sampling": 1, 

1138 }, 

1139 "(18,22)": { 

1140 "data": {"id_1": "18", "id_2": "22"}, 

1141 "constraint_type": "MUST_LINK", 

1142 "constraint_type_previous": [None], 

1143 "is_hidden": False, 

1144 "to_annotate": False, 

1145 "to_review": False, 

1146 "to_fix_conflict": False, 

1147 "comment": "", 

1148 "date_of_update": 1657543537.76648, 

1149 "iteration_of_sampling": 1, 

1150 }, 

1151 "(11,12)": { 

1152 "data": {"id_1": "11", "id_2": "12"}, 

1153 "constraint_type": "MUST_LINK", 

1154 "constraint_type_previous": [None], 

1155 "is_hidden": False, 

1156 "to_annotate": False, 

1157 "to_review": False, 

1158 "to_fix_conflict": False, 

1159 "comment": "", 

1160 "date_of_update": 1657543475.46025, 

1161 "iteration_of_sampling": 1, 

1162 }, 

1163 "(20,22)": { 

1164 "data": {"id_1": "20", "id_2": "22"}, 

1165 "constraint_type": "MUST_LINK", 

1166 "constraint_type_previous": [None], 

1167 "is_hidden": False, 

1168 "to_annotate": False, 

1169 "to_review": False, 

1170 "to_fix_conflict": False, 

1171 "comment": "", 

1172 "date_of_update": 1657543457.282708, 

1173 "iteration_of_sampling": 1, 

1174 }, 

1175 "(19,22)": { 

1176 "data": {"id_1": "19", "id_2": "22"}, 

1177 "constraint_type": "MUST_LINK", 

1178 "constraint_type_previous": [None], 

1179 "is_hidden": False, 

1180 "to_annotate": False, 

1181 "to_review": False, 

1182 "to_fix_conflict": False, 

1183 "comment": "", 

1184 "date_of_update": 1657543503.891212, 

1185 "iteration_of_sampling": 1, 

1186 }, 

1187 "(17,22)": { 

1188 "data": {"id_1": "17", "id_2": "22"}, 

1189 "constraint_type": "MUST_LINK", 

1190 "constraint_type_previous": [None], 

1191 "is_hidden": False, 

1192 "to_annotate": False, 

1193 "to_review": False, 

1194 "to_fix_conflict": False, 

1195 "comment": "", 

1196 "date_of_update": 1657543500.755786, 

1197 "iteration_of_sampling": 1, 

1198 }, 

1199 "(10,9)": { 

1200 "data": {"id_1": "10", "id_2": "9"}, 

1201 "constraint_type": "MUST_LINK", 

1202 "constraint_type_previous": [None], 

1203 "is_hidden": False, 

1204 "to_annotate": False, 

1205 "to_review": False, 

1206 "to_fix_conflict": False, 

1207 "comment": "", 

1208 "date_of_update": 1657543432.412055, 

1209 "iteration_of_sampling": 1, 

1210 }, 

1211 "(10,11)": { 

1212 "data": {"id_1": "10", "id_2": "11"}, 

1213 "constraint_type": "MUST_LINK", 

1214 "constraint_type_previous": [None], 

1215 "is_hidden": False, 

1216 "to_annotate": False, 

1217 "to_review": False, 

1218 "to_fix_conflict": False, 

1219 "comment": "", 

1220 "date_of_update": 1657543487.605554, 

1221 "iteration_of_sampling": 1, 

1222 }, 

1223 "(15,16)": { 

1224 "data": {"id_1": "15", "id_2": "16"}, 

1225 "constraint_type": "CANNOT_LINK", 

1226 "constraint_type_previous": [None], 

1227 "is_hidden": False, 

1228 "to_annotate": False, 

1229 "to_review": False, 

1230 "to_fix_conflict": False, 

1231 "comment": "", 

1232 "date_of_update": 1657545325.795985, 

1233 "iteration_of_sampling": 1, 

1234 }, 

1235 "(21,22)": { 

1236 "data": {"id_1": "21", "id_2": "22"}, 

1237 "constraint_type": "MUST_LINK", 

1238 "constraint_type_previous": [None], 

1239 "is_hidden": False, 

1240 "to_annotate": False, 

1241 "to_review": False, 

1242 "to_fix_conflict": False, 

1243 "comment": "", 

1244 "date_of_update": 1657543471.789491, 

1245 "iteration_of_sampling": 1, 

1246 }, 

1247 "(22,8)": { 

1248 "data": {"id_1": "22", "id_2": "8"}, 

1249 "constraint_type": "CANNOT_LINK", 

1250 "constraint_type_previous": [None], 

1251 "is_hidden": False, 

1252 "to_annotate": False, 

1253 "to_review": False, 

1254 "to_fix_conflict": False, 

1255 "comment": "", 

1256 "date_of_update": 1657543535.036781, 

1257 "iteration_of_sampling": 1, 

1258 }, 

1259 "(22,6)": { 

1260 "data": {"id_1": "22", "id_2": "6"}, 

1261 "constraint_type": "CANNOT_LINK", 

1262 "constraint_type_previous": [None], 

1263 "is_hidden": False, 

1264 "to_annotate": False, 

1265 "to_review": False, 

1266 "to_fix_conflict": False, 

1267 "comment": "", 

1268 "date_of_update": 1657543454.547808, 

1269 "iteration_of_sampling": 1, 

1270 }, 

1271 "(12,9)": { 

1272 "data": {"id_1": "12", "id_2": "9"}, 

1273 "constraint_type": "MUST_LINK", 

1274 "constraint_type_previous": [None, "CANNOT_LINK"], 

1275 "is_hidden": False, 

1276 "to_annotate": False, 

1277 "to_review": False, 

1278 "to_fix_conflict": False, 

1279 "comment": "", 

1280 "date_of_update": 1657543315.242459, 

1281 "iteration_of_sampling": 1, 

1282 }, 

1283 "(13,16)": { 

1284 "data": {"id_1": "13", "id_2": "16"}, 

1285 "constraint_type": "CANNOT_LINK", 

1286 "constraint_type_previous": [None], 

1287 "is_hidden": False, 

1288 "to_annotate": False, 

1289 "to_review": False, 

1290 "to_fix_conflict": False, 

1291 "comment": "", 

1292 "date_of_update": 1657545332.124029, 

1293 "iteration_of_sampling": 1, 

1294 }, 

1295 "(1,2)": { 

1296 "data": {"id_1": "1", "id_2": "2"}, 

1297 "constraint_type": "MUST_LINK", 

1298 "constraint_type_previous": [None], 

1299 "is_hidden": False, 

1300 "to_annotate": False, 

1301 "to_review": False, 

1302 "to_fix_conflict": False, 

1303 "comment": "", 

1304 "date_of_update": 1657543438.389156, 

1305 "iteration_of_sampling": 1, 

1306 }, 

1307 "(1,6)": { 

1308 "data": {"id_1": "1", "id_2": "6"}, 

1309 "constraint_type": "MUST_LINK", 

1310 "constraint_type_previous": [None], 

1311 "is_hidden": False, 

1312 "to_annotate": False, 

1313 "to_review": True, 

1314 "to_fix_conflict": False, 

1315 "comment": "", 

1316 "date_of_update": 1657543490.330898, 

1317 "iteration_of_sampling": 1, 

1318 }, 

1319 "(1,3)": { 

1320 "data": {"id_1": "1", "id_2": "3"}, 

1321 "constraint_type": "MUST_LINK", 

1322 "constraint_type_previous": [None], 

1323 "is_hidden": False, 

1324 "to_annotate": False, 

1325 "to_review": False, 

1326 "to_fix_conflict": False, 

1327 "comment": "", 

1328 "date_of_update": 1657543464.28536, 

1329 "iteration_of_sampling": 1, 

1330 }, 

1331 "(1,7)": { 

1332 "data": {"id_1": "1", "id_2": "7"}, 

1333 "constraint_type": "MUST_LINK", 

1334 "constraint_type_previous": [None], 

1335 "is_hidden": False, 

1336 "to_annotate": False, 

1337 "to_review": True, 

1338 "to_fix_conflict": False, 

1339 "comment": "", 

1340 "date_of_update": 1657543507.347849, 

1341 "iteration_of_sampling": 1, 

1342 }, 

1343 "(0,4)": { 

1344 "data": {"id_1": "0", "id_2": "4"}, 

1345 "constraint_type": "MUST_LINK", 

1346 "constraint_type_previous": [ 

1347 None, 

1348 "MUST_LINK", 

1349 None, 

1350 "MUST_LINK", 

1351 None, 

1352 None, 

1353 None, 

1354 "MUST_LINK", 

1355 "MUST_LINK", 

1356 "CANNOT_LINK", 

1357 ], 

1358 "is_hidden": False, 

1359 "to_annotate": False, 

1360 "to_review": False, 

1361 "to_fix_conflict": False, 

1362 "comment": "", 

1363 "date_of_update": 1657545443.884245, 

1364 "iteration_of_sampling": 1, 

1365 }, 

1366 "(4,6)": { 

1367 "data": {"id_1": "4", "id_2": "6"}, 

1368 "constraint_type": "MUST_LINK", 

1369 "constraint_type_previous": [None], 

1370 "is_hidden": False, 

1371 "to_annotate": False, 

1372 "to_review": True, 

1373 "to_fix_conflict": False, 

1374 "comment": "", 

1375 "date_of_update": 1657545344.703469, 

1376 "iteration_of_sampling": 1, 

1377 }, 

1378 "(4,7)": { 

1379 "data": {"id_1": "4", "id_2": "7"}, 

1380 "constraint_type": "MUST_LINK", 

1381 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

1382 "is_hidden": False, 

1383 "to_annotate": False, 

1384 "to_review": True, 

1385 "to_fix_conflict": False, 

1386 "comment": "Même intention (gestion carte virtuelle).", 

1387 "date_of_update": 1657546214.538204, 

1388 "iteration_of_sampling": 1, 

1389 }, 

1390 }, 

1391 "parameters": { 

1392 "without_hidden_constraints": True, 

1393 "sorted_by": "text", 

1394 "sorted_reverse": False, 

1395 }, 

1396 } 

1397 

1398 

1399# ============================================================================== 

1400# test_ok_by_constraint_type 

1401# ============================================================================== 

1402 

1403 

1404@pytest.mark.asyncio() 

1405async def test_ok_by_constraint_type(async_client, tmp_path): 

1406 """ 

1407 Test the `GET /api/projects/{project_id}/constraints` route. 

1408 

1409 Arguments: 

1410 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

1411 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

1412 """ 

1413 # Assert HTTP client is created. 

1414 assert async_client 

1415 

1416 # Create dummy projects. 

1417 create_dummy_projects( 

1418 tmp_path=tmp_path, 

1419 list_of_dummy_project_ids=[ 

1420 "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

1421 ], 

1422 ) 

1423 

1424 # Assert route `GET /api/projects/{project_id}/constraints` works. 

1425 response_get = await async_client.get( 

1426 url="/api/projects/1l_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints?sorted_by=constraint_type" 

1427 ) 

1428 assert response_get.status_code == 200 

1429 list_of_hidden_marks = [ 

1430 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

1431 ] 

1432 assert True not in list_of_hidden_marks 

1433 list_of_constraint_types = [ 

1434 (constraint_value["constraint_type"] if constraint_value["constraint_type"] is not None else "") 

1435 for constraint_value in response_get.json()["constraints"].values() 

1436 ] 

1437 assert list_of_constraint_types == sorted(list_of_constraint_types, reverse=True) 

1438 assert response_get.json() == { 

1439 "project_id": "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

1440 "constraints": { 

1441 "(0,4)": { 

1442 "data": {"id_1": "0", "id_2": "4"}, 

1443 "constraint_type": "MUST_LINK", 

1444 "constraint_type_previous": [ 

1445 None, 

1446 "MUST_LINK", 

1447 None, 

1448 "MUST_LINK", 

1449 None, 

1450 None, 

1451 None, 

1452 "MUST_LINK", 

1453 "MUST_LINK", 

1454 "CANNOT_LINK", 

1455 ], 

1456 "is_hidden": False, 

1457 "to_annotate": False, 

1458 "to_review": False, 

1459 "to_fix_conflict": False, 

1460 "comment": "", 

1461 "date_of_update": 1657545443.884245, 

1462 "iteration_of_sampling": 1, 

1463 }, 

1464 "(12,9)": { 

1465 "data": {"id_1": "12", "id_2": "9"}, 

1466 "constraint_type": "MUST_LINK", 

1467 "constraint_type_previous": [None, "CANNOT_LINK"], 

1468 "is_hidden": False, 

1469 "to_annotate": False, 

1470 "to_review": False, 

1471 "to_fix_conflict": False, 

1472 "comment": "", 

1473 "date_of_update": 1657543315.242459, 

1474 "iteration_of_sampling": 1, 

1475 }, 

1476 "(10,9)": { 

1477 "data": {"id_1": "10", "id_2": "9"}, 

1478 "constraint_type": "MUST_LINK", 

1479 "constraint_type_previous": [None], 

1480 "is_hidden": False, 

1481 "to_annotate": False, 

1482 "to_review": False, 

1483 "to_fix_conflict": False, 

1484 "comment": "", 

1485 "date_of_update": 1657543432.412055, 

1486 "iteration_of_sampling": 1, 

1487 }, 

1488 "(1,2)": { 

1489 "data": {"id_1": "1", "id_2": "2"}, 

1490 "constraint_type": "MUST_LINK", 

1491 "constraint_type_previous": [None], 

1492 "is_hidden": False, 

1493 "to_annotate": False, 

1494 "to_review": False, 

1495 "to_fix_conflict": False, 

1496 "comment": "", 

1497 "date_of_update": 1657543438.389156, 

1498 "iteration_of_sampling": 1, 

1499 }, 

1500 "(20,22)": { 

1501 "data": {"id_1": "20", "id_2": "22"}, 

1502 "constraint_type": "MUST_LINK", 

1503 "constraint_type_previous": [None], 

1504 "is_hidden": False, 

1505 "to_annotate": False, 

1506 "to_review": False, 

1507 "to_fix_conflict": False, 

1508 "comment": "", 

1509 "date_of_update": 1657543457.282708, 

1510 "iteration_of_sampling": 1, 

1511 }, 

1512 "(1,3)": { 

1513 "data": {"id_1": "1", "id_2": "3"}, 

1514 "constraint_type": "MUST_LINK", 

1515 "constraint_type_previous": [None], 

1516 "is_hidden": False, 

1517 "to_annotate": False, 

1518 "to_review": False, 

1519 "to_fix_conflict": False, 

1520 "comment": "", 

1521 "date_of_update": 1657543464.28536, 

1522 "iteration_of_sampling": 1, 

1523 }, 

1524 "(4,7)": { 

1525 "data": {"id_1": "4", "id_2": "7"}, 

1526 "constraint_type": "MUST_LINK", 

1527 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

1528 "is_hidden": False, 

1529 "to_annotate": False, 

1530 "to_review": True, 

1531 "to_fix_conflict": False, 

1532 "comment": "Même intention (gestion carte virtuelle).", 

1533 "date_of_update": 1657546214.538204, 

1534 "iteration_of_sampling": 1, 

1535 }, 

1536 "(21,22)": { 

1537 "data": {"id_1": "21", "id_2": "22"}, 

1538 "constraint_type": "MUST_LINK", 

1539 "constraint_type_previous": [None], 

1540 "is_hidden": False, 

1541 "to_annotate": False, 

1542 "to_review": False, 

1543 "to_fix_conflict": False, 

1544 "comment": "", 

1545 "date_of_update": 1657543471.789491, 

1546 "iteration_of_sampling": 1, 

1547 }, 

1548 "(11,12)": { 

1549 "data": {"id_1": "11", "id_2": "12"}, 

1550 "constraint_type": "MUST_LINK", 

1551 "constraint_type_previous": [None], 

1552 "is_hidden": False, 

1553 "to_annotate": False, 

1554 "to_review": False, 

1555 "to_fix_conflict": False, 

1556 "comment": "", 

1557 "date_of_update": 1657543475.46025, 

1558 "iteration_of_sampling": 1, 

1559 }, 

1560 "(10,11)": { 

1561 "data": {"id_1": "10", "id_2": "11"}, 

1562 "constraint_type": "MUST_LINK", 

1563 "constraint_type_previous": [None], 

1564 "is_hidden": False, 

1565 "to_annotate": False, 

1566 "to_review": False, 

1567 "to_fix_conflict": False, 

1568 "comment": "", 

1569 "date_of_update": 1657543487.605554, 

1570 "iteration_of_sampling": 1, 

1571 }, 

1572 "(1,6)": { 

1573 "data": {"id_1": "1", "id_2": "6"}, 

1574 "constraint_type": "MUST_LINK", 

1575 "constraint_type_previous": [None], 

1576 "is_hidden": False, 

1577 "to_annotate": False, 

1578 "to_review": True, 

1579 "to_fix_conflict": False, 

1580 "comment": "", 

1581 "date_of_update": 1657543490.330898, 

1582 "iteration_of_sampling": 1, 

1583 }, 

1584 "(2,4)": { 

1585 "data": {"id_1": "2", "id_2": "4"}, 

1586 "constraint_type": "MUST_LINK", 

1587 "constraint_type_previous": [None], 

1588 "is_hidden": False, 

1589 "to_annotate": False, 

1590 "to_review": False, 

1591 "to_fix_conflict": False, 

1592 "comment": "", 

1593 "date_of_update": 1657543493.240642, 

1594 "iteration_of_sampling": 1, 

1595 }, 

1596 "(8,9)": { 

1597 "data": {"id_1": "8", "id_2": "9"}, 

1598 "constraint_type": "MUST_LINK", 

1599 "constraint_type_previous": [None], 

1600 "is_hidden": False, 

1601 "to_annotate": False, 

1602 "to_review": False, 

1603 "to_fix_conflict": False, 

1604 "comment": "", 

1605 "date_of_update": 1657543496.268081, 

1606 "iteration_of_sampling": 1, 

1607 }, 

1608 "(17,22)": { 

1609 "data": {"id_1": "17", "id_2": "22"}, 

1610 "constraint_type": "MUST_LINK", 

1611 "constraint_type_previous": [None], 

1612 "is_hidden": False, 

1613 "to_annotate": False, 

1614 "to_review": False, 

1615 "to_fix_conflict": False, 

1616 "comment": "", 

1617 "date_of_update": 1657543500.755786, 

1618 "iteration_of_sampling": 1, 

1619 }, 

1620 "(19,22)": { 

1621 "data": {"id_1": "19", "id_2": "22"}, 

1622 "constraint_type": "MUST_LINK", 

1623 "constraint_type_previous": [None], 

1624 "is_hidden": False, 

1625 "to_annotate": False, 

1626 "to_review": False, 

1627 "to_fix_conflict": False, 

1628 "comment": "", 

1629 "date_of_update": 1657543503.891212, 

1630 "iteration_of_sampling": 1, 

1631 }, 

1632 "(1,7)": { 

1633 "data": {"id_1": "1", "id_2": "7"}, 

1634 "constraint_type": "MUST_LINK", 

1635 "constraint_type_previous": [None], 

1636 "is_hidden": False, 

1637 "to_annotate": False, 

1638 "to_review": True, 

1639 "to_fix_conflict": False, 

1640 "comment": "", 

1641 "date_of_update": 1657543507.347849, 

1642 "iteration_of_sampling": 1, 

1643 }, 

1644 "(18,22)": { 

1645 "data": {"id_1": "18", "id_2": "22"}, 

1646 "constraint_type": "MUST_LINK", 

1647 "constraint_type_previous": [None], 

1648 "is_hidden": False, 

1649 "to_annotate": False, 

1650 "to_review": False, 

1651 "to_fix_conflict": False, 

1652 "comment": "", 

1653 "date_of_update": 1657543537.76648, 

1654 "iteration_of_sampling": 1, 

1655 }, 

1656 "(4,6)": { 

1657 "data": {"id_1": "4", "id_2": "6"}, 

1658 "constraint_type": "MUST_LINK", 

1659 "constraint_type_previous": [None], 

1660 "is_hidden": False, 

1661 "to_annotate": False, 

1662 "to_review": True, 

1663 "to_fix_conflict": False, 

1664 "comment": "", 

1665 "date_of_update": 1657545344.703469, 

1666 "iteration_of_sampling": 1, 

1667 }, 

1668 "(22,6)": { 

1669 "data": {"id_1": "22", "id_2": "6"}, 

1670 "constraint_type": "CANNOT_LINK", 

1671 "constraint_type_previous": [None], 

1672 "is_hidden": False, 

1673 "to_annotate": False, 

1674 "to_review": False, 

1675 "to_fix_conflict": False, 

1676 "comment": "", 

1677 "date_of_update": 1657543454.547808, 

1678 "iteration_of_sampling": 1, 

1679 }, 

1680 "(22,8)": { 

1681 "data": {"id_1": "22", "id_2": "8"}, 

1682 "constraint_type": "CANNOT_LINK", 

1683 "constraint_type_previous": [None], 

1684 "is_hidden": False, 

1685 "to_annotate": False, 

1686 "to_review": False, 

1687 "to_fix_conflict": False, 

1688 "comment": "", 

1689 "date_of_update": 1657543535.036781, 

1690 "iteration_of_sampling": 1, 

1691 }, 

1692 "(15,16)": { 

1693 "data": {"id_1": "15", "id_2": "16"}, 

1694 "constraint_type": "CANNOT_LINK", 

1695 "constraint_type_previous": [None], 

1696 "is_hidden": False, 

1697 "to_annotate": False, 

1698 "to_review": False, 

1699 "to_fix_conflict": False, 

1700 "comment": "", 

1701 "date_of_update": 1657545325.795985, 

1702 "iteration_of_sampling": 1, 

1703 }, 

1704 "(13,16)": { 

1705 "data": {"id_1": "13", "id_2": "16"}, 

1706 "constraint_type": "CANNOT_LINK", 

1707 "constraint_type_previous": [None], 

1708 "is_hidden": False, 

1709 "to_annotate": False, 

1710 "to_review": False, 

1711 "to_fix_conflict": False, 

1712 "comment": "", 

1713 "date_of_update": 1657545332.124029, 

1714 "iteration_of_sampling": 1, 

1715 }, 

1716 "(18,8)": { 

1717 "data": {"id_1": "18", "id_2": "8"}, 

1718 "constraint_type": "CANNOT_LINK", 

1719 "constraint_type_previous": [None], 

1720 "is_hidden": False, 

1721 "to_annotate": False, 

1722 "to_review": False, 

1723 "to_fix_conflict": False, 

1724 "comment": "", 

1725 "date_of_update": 1657545348.247546, 

1726 "iteration_of_sampling": 1, 

1727 }, 

1728 }, 

1729 "parameters": { 

1730 "without_hidden_constraints": True, 

1731 "sorted_by": "constraint_type", 

1732 "sorted_reverse": False, 

1733 }, 

1734 } 

1735 

1736 

1737# ============================================================================== 

1738# test_ok_by_date_of_update 

1739# ============================================================================== 

1740 

1741 

1742@pytest.mark.asyncio() 

1743async def test_ok_by_date_of_update(async_client, tmp_path): 

1744 """ 

1745 Test the `GET /api/projects/{project_id}/constraints` route. 

1746 

1747 Arguments: 

1748 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

1749 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

1750 """ 

1751 # Assert HTTP client is created. 

1752 assert async_client 

1753 

1754 # Create dummy projects. 

1755 create_dummy_projects( 

1756 tmp_path=tmp_path, 

1757 list_of_dummy_project_ids=[ 

1758 "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

1759 ], 

1760 ) 

1761 

1762 # Assert route `GET /api/projects/{project_id}/constraints` works. 

1763 response_get = await async_client.get( 

1764 url="/api/projects/1l_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints?sorted_by=date_of_update" 

1765 ) 

1766 assert response_get.status_code == 200 

1767 list_of_hidden_marks = [ 

1768 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

1769 ] 

1770 assert True not in list_of_hidden_marks 

1771 assert response_get.json() == { 

1772 "project_id": "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

1773 "constraints": { 

1774 "(12,9)": { 

1775 "data": {"id_1": "12", "id_2": "9"}, 

1776 "constraint_type": "MUST_LINK", 

1777 "constraint_type_previous": [None, "CANNOT_LINK"], 

1778 "is_hidden": False, 

1779 "to_annotate": False, 

1780 "to_review": False, 

1781 "to_fix_conflict": False, 

1782 "comment": "", 

1783 "date_of_update": 1657543315.242459, 

1784 "iteration_of_sampling": 1, 

1785 }, 

1786 "(10,9)": { 

1787 "data": {"id_1": "10", "id_2": "9"}, 

1788 "constraint_type": "MUST_LINK", 

1789 "constraint_type_previous": [None], 

1790 "is_hidden": False, 

1791 "to_annotate": False, 

1792 "to_review": False, 

1793 "to_fix_conflict": False, 

1794 "comment": "", 

1795 "date_of_update": 1657543432.412055, 

1796 "iteration_of_sampling": 1, 

1797 }, 

1798 "(1,2)": { 

1799 "data": {"id_1": "1", "id_2": "2"}, 

1800 "constraint_type": "MUST_LINK", 

1801 "constraint_type_previous": [None], 

1802 "is_hidden": False, 

1803 "to_annotate": False, 

1804 "to_review": False, 

1805 "to_fix_conflict": False, 

1806 "comment": "", 

1807 "date_of_update": 1657543438.389156, 

1808 "iteration_of_sampling": 1, 

1809 }, 

1810 "(22,6)": { 

1811 "data": {"id_1": "22", "id_2": "6"}, 

1812 "constraint_type": "CANNOT_LINK", 

1813 "constraint_type_previous": [None], 

1814 "is_hidden": False, 

1815 "to_annotate": False, 

1816 "to_review": False, 

1817 "to_fix_conflict": False, 

1818 "comment": "", 

1819 "date_of_update": 1657543454.547808, 

1820 "iteration_of_sampling": 1, 

1821 }, 

1822 "(20,22)": { 

1823 "data": {"id_1": "20", "id_2": "22"}, 

1824 "constraint_type": "MUST_LINK", 

1825 "constraint_type_previous": [None], 

1826 "is_hidden": False, 

1827 "to_annotate": False, 

1828 "to_review": False, 

1829 "to_fix_conflict": False, 

1830 "comment": "", 

1831 "date_of_update": 1657543457.282708, 

1832 "iteration_of_sampling": 1, 

1833 }, 

1834 "(1,3)": { 

1835 "data": {"id_1": "1", "id_2": "3"}, 

1836 "constraint_type": "MUST_LINK", 

1837 "constraint_type_previous": [None], 

1838 "is_hidden": False, 

1839 "to_annotate": False, 

1840 "to_review": False, 

1841 "to_fix_conflict": False, 

1842 "comment": "", 

1843 "date_of_update": 1657543464.28536, 

1844 "iteration_of_sampling": 1, 

1845 }, 

1846 "(21,22)": { 

1847 "data": {"id_1": "21", "id_2": "22"}, 

1848 "constraint_type": "MUST_LINK", 

1849 "constraint_type_previous": [None], 

1850 "is_hidden": False, 

1851 "to_annotate": False, 

1852 "to_review": False, 

1853 "to_fix_conflict": False, 

1854 "comment": "", 

1855 "date_of_update": 1657543471.789491, 

1856 "iteration_of_sampling": 1, 

1857 }, 

1858 "(11,12)": { 

1859 "data": {"id_1": "11", "id_2": "12"}, 

1860 "constraint_type": "MUST_LINK", 

1861 "constraint_type_previous": [None], 

1862 "is_hidden": False, 

1863 "to_annotate": False, 

1864 "to_review": False, 

1865 "to_fix_conflict": False, 

1866 "comment": "", 

1867 "date_of_update": 1657543475.46025, 

1868 "iteration_of_sampling": 1, 

1869 }, 

1870 "(10,11)": { 

1871 "data": {"id_1": "10", "id_2": "11"}, 

1872 "constraint_type": "MUST_LINK", 

1873 "constraint_type_previous": [None], 

1874 "is_hidden": False, 

1875 "to_annotate": False, 

1876 "to_review": False, 

1877 "to_fix_conflict": False, 

1878 "comment": "", 

1879 "date_of_update": 1657543487.605554, 

1880 "iteration_of_sampling": 1, 

1881 }, 

1882 "(1,6)": { 

1883 "data": {"id_1": "1", "id_2": "6"}, 

1884 "constraint_type": "MUST_LINK", 

1885 "constraint_type_previous": [None], 

1886 "is_hidden": False, 

1887 "to_annotate": False, 

1888 "to_review": True, 

1889 "to_fix_conflict": False, 

1890 "comment": "", 

1891 "date_of_update": 1657543490.330898, 

1892 "iteration_of_sampling": 1, 

1893 }, 

1894 "(2,4)": { 

1895 "data": {"id_1": "2", "id_2": "4"}, 

1896 "constraint_type": "MUST_LINK", 

1897 "constraint_type_previous": [None], 

1898 "is_hidden": False, 

1899 "to_annotate": False, 

1900 "to_review": False, 

1901 "to_fix_conflict": False, 

1902 "comment": "", 

1903 "date_of_update": 1657543493.240642, 

1904 "iteration_of_sampling": 1, 

1905 }, 

1906 "(8,9)": { 

1907 "data": {"id_1": "8", "id_2": "9"}, 

1908 "constraint_type": "MUST_LINK", 

1909 "constraint_type_previous": [None], 

1910 "is_hidden": False, 

1911 "to_annotate": False, 

1912 "to_review": False, 

1913 "to_fix_conflict": False, 

1914 "comment": "", 

1915 "date_of_update": 1657543496.268081, 

1916 "iteration_of_sampling": 1, 

1917 }, 

1918 "(17,22)": { 

1919 "data": {"id_1": "17", "id_2": "22"}, 

1920 "constraint_type": "MUST_LINK", 

1921 "constraint_type_previous": [None], 

1922 "is_hidden": False, 

1923 "to_annotate": False, 

1924 "to_review": False, 

1925 "to_fix_conflict": False, 

1926 "comment": "", 

1927 "date_of_update": 1657543500.755786, 

1928 "iteration_of_sampling": 1, 

1929 }, 

1930 "(19,22)": { 

1931 "data": {"id_1": "19", "id_2": "22"}, 

1932 "constraint_type": "MUST_LINK", 

1933 "constraint_type_previous": [None], 

1934 "is_hidden": False, 

1935 "to_annotate": False, 

1936 "to_review": False, 

1937 "to_fix_conflict": False, 

1938 "comment": "", 

1939 "date_of_update": 1657543503.891212, 

1940 "iteration_of_sampling": 1, 

1941 }, 

1942 "(1,7)": { 

1943 "data": {"id_1": "1", "id_2": "7"}, 

1944 "constraint_type": "MUST_LINK", 

1945 "constraint_type_previous": [None], 

1946 "is_hidden": False, 

1947 "to_annotate": False, 

1948 "to_review": True, 

1949 "to_fix_conflict": False, 

1950 "comment": "", 

1951 "date_of_update": 1657543507.347849, 

1952 "iteration_of_sampling": 1, 

1953 }, 

1954 "(22,8)": { 

1955 "data": {"id_1": "22", "id_2": "8"}, 

1956 "constraint_type": "CANNOT_LINK", 

1957 "constraint_type_previous": [None], 

1958 "is_hidden": False, 

1959 "to_annotate": False, 

1960 "to_review": False, 

1961 "to_fix_conflict": False, 

1962 "comment": "", 

1963 "date_of_update": 1657543535.036781, 

1964 "iteration_of_sampling": 1, 

1965 }, 

1966 "(18,22)": { 

1967 "data": {"id_1": "18", "id_2": "22"}, 

1968 "constraint_type": "MUST_LINK", 

1969 "constraint_type_previous": [None], 

1970 "is_hidden": False, 

1971 "to_annotate": False, 

1972 "to_review": False, 

1973 "to_fix_conflict": False, 

1974 "comment": "", 

1975 "date_of_update": 1657543537.76648, 

1976 "iteration_of_sampling": 1, 

1977 }, 

1978 "(15,16)": { 

1979 "data": {"id_1": "15", "id_2": "16"}, 

1980 "constraint_type": "CANNOT_LINK", 

1981 "constraint_type_previous": [None], 

1982 "is_hidden": False, 

1983 "to_annotate": False, 

1984 "to_review": False, 

1985 "to_fix_conflict": False, 

1986 "comment": "", 

1987 "date_of_update": 1657545325.795985, 

1988 "iteration_of_sampling": 1, 

1989 }, 

1990 "(13,16)": { 

1991 "data": {"id_1": "13", "id_2": "16"}, 

1992 "constraint_type": "CANNOT_LINK", 

1993 "constraint_type_previous": [None], 

1994 "is_hidden": False, 

1995 "to_annotate": False, 

1996 "to_review": False, 

1997 "to_fix_conflict": False, 

1998 "comment": "", 

1999 "date_of_update": 1657545332.124029, 

2000 "iteration_of_sampling": 1, 

2001 }, 

2002 "(4,6)": { 

2003 "data": {"id_1": "4", "id_2": "6"}, 

2004 "constraint_type": "MUST_LINK", 

2005 "constraint_type_previous": [None], 

2006 "is_hidden": False, 

2007 "to_annotate": False, 

2008 "to_review": True, 

2009 "to_fix_conflict": False, 

2010 "comment": "", 

2011 "date_of_update": 1657545344.703469, 

2012 "iteration_of_sampling": 1, 

2013 }, 

2014 "(18,8)": { 

2015 "data": {"id_1": "18", "id_2": "8"}, 

2016 "constraint_type": "CANNOT_LINK", 

2017 "constraint_type_previous": [None], 

2018 "is_hidden": False, 

2019 "to_annotate": False, 

2020 "to_review": False, 

2021 "to_fix_conflict": False, 

2022 "comment": "", 

2023 "date_of_update": 1657545348.247546, 

2024 "iteration_of_sampling": 1, 

2025 }, 

2026 "(0,4)": { 

2027 "data": {"id_1": "0", "id_2": "4"}, 

2028 "constraint_type": "MUST_LINK", 

2029 "constraint_type_previous": [ 

2030 None, 

2031 "MUST_LINK", 

2032 None, 

2033 "MUST_LINK", 

2034 None, 

2035 None, 

2036 None, 

2037 "MUST_LINK", 

2038 "MUST_LINK", 

2039 "CANNOT_LINK", 

2040 ], 

2041 "is_hidden": False, 

2042 "to_annotate": False, 

2043 "to_review": False, 

2044 "to_fix_conflict": False, 

2045 "comment": "", 

2046 "date_of_update": 1657545443.884245, 

2047 "iteration_of_sampling": 1, 

2048 }, 

2049 "(4,7)": { 

2050 "data": {"id_1": "4", "id_2": "7"}, 

2051 "constraint_type": "MUST_LINK", 

2052 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

2053 "is_hidden": False, 

2054 "to_annotate": False, 

2055 "to_review": True, 

2056 "to_fix_conflict": False, 

2057 "comment": "Même intention (gestion carte virtuelle).", 

2058 "date_of_update": 1657546214.538204, 

2059 "iteration_of_sampling": 1, 

2060 }, 

2061 }, 

2062 "parameters": { 

2063 "without_hidden_constraints": True, 

2064 "sorted_by": "date_of_update", 

2065 "sorted_reverse": False, 

2066 }, 

2067 } 

2068 

2069 

2070# ============================================================================== 

2071# test_ok_by_iteration_of_sampling 

2072# ============================================================================== 

2073 

2074 

2075@pytest.mark.asyncio() 

2076async def test_ok_by_iteration_of_sampling(async_client, tmp_path): 

2077 """ 

2078 Test the `GET /api/projects/{project_id}/constraints` route. 

2079 

2080 Arguments: 

2081 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

2082 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

2083 """ 

2084 # Assert HTTP client is created. 

2085 assert async_client 

2086 

2087 # Create dummy projects. 

2088 create_dummy_projects( 

2089 tmp_path=tmp_path, 

2090 list_of_dummy_project_ids=[ 

2091 "2d_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

2092 ], 

2093 ) 

2094 

2095 # Assert route `GET /api/projects/{project_id}/constraints` works. 

2096 response_get = await async_client.get( 

2097 url="/api/projects/2d_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints?sorted_by=iteration_of_sampling" 

2098 ) 

2099 assert response_get.status_code == 200 

2100 list_of_hidden_marks = [ 

2101 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

2102 ] 

2103 assert True not in list_of_hidden_marks 

2104 list_of_iteration_of_sampling = [ 

2105 constraint_value["iteration_of_sampling"] for constraint_value in response_get.json()["constraints"].values() 

2106 ] 

2107 assert list_of_iteration_of_sampling == sorted(list_of_iteration_of_sampling) 

2108 assert response_get.json() == { 

2109 "project_id": "2d_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

2110 "constraints": { 

2111 "(0,4)": { 

2112 "data": {"id_1": "0", "id_2": "4"}, 

2113 "constraint_type": "MUST_LINK", 

2114 "constraint_type_previous": [ 

2115 None, 

2116 "MUST_LINK", 

2117 None, 

2118 "MUST_LINK", 

2119 None, 

2120 None, 

2121 None, 

2122 "MUST_LINK", 

2123 "MUST_LINK", 

2124 "CANNOT_LINK", 

2125 ], 

2126 "is_hidden": False, 

2127 "to_annotate": False, 

2128 "to_review": False, 

2129 "to_fix_conflict": False, 

2130 "comment": "", 

2131 "date_of_update": 1657545443.884245, 

2132 "iteration_of_sampling": 1, 

2133 }, 

2134 "(12,9)": { 

2135 "data": {"id_1": "12", "id_2": "9"}, 

2136 "constraint_type": "MUST_LINK", 

2137 "constraint_type_previous": [None, "CANNOT_LINK"], 

2138 "is_hidden": False, 

2139 "to_annotate": False, 

2140 "to_review": False, 

2141 "to_fix_conflict": False, 

2142 "comment": "", 

2143 "date_of_update": 1657543315.242459, 

2144 "iteration_of_sampling": 1, 

2145 }, 

2146 "(10,9)": { 

2147 "data": {"id_1": "10", "id_2": "9"}, 

2148 "constraint_type": "MUST_LINK", 

2149 "constraint_type_previous": [None], 

2150 "is_hidden": False, 

2151 "to_annotate": False, 

2152 "to_review": False, 

2153 "to_fix_conflict": False, 

2154 "comment": "", 

2155 "date_of_update": 1657543432.412055, 

2156 "iteration_of_sampling": 1, 

2157 }, 

2158 "(1,2)": { 

2159 "data": {"id_1": "1", "id_2": "2"}, 

2160 "constraint_type": "MUST_LINK", 

2161 "constraint_type_previous": [None], 

2162 "is_hidden": False, 

2163 "to_annotate": False, 

2164 "to_review": False, 

2165 "to_fix_conflict": False, 

2166 "comment": "", 

2167 "date_of_update": 1657543438.389156, 

2168 "iteration_of_sampling": 1, 

2169 }, 

2170 "(22,6)": { 

2171 "data": {"id_1": "22", "id_2": "6"}, 

2172 "constraint_type": "CANNOT_LINK", 

2173 "constraint_type_previous": [None], 

2174 "is_hidden": False, 

2175 "to_annotate": False, 

2176 "to_review": False, 

2177 "to_fix_conflict": False, 

2178 "comment": "", 

2179 "date_of_update": 1657543454.547808, 

2180 "iteration_of_sampling": 1, 

2181 }, 

2182 "(20,22)": { 

2183 "data": {"id_1": "20", "id_2": "22"}, 

2184 "constraint_type": "MUST_LINK", 

2185 "constraint_type_previous": [None], 

2186 "is_hidden": False, 

2187 "to_annotate": False, 

2188 "to_review": False, 

2189 "to_fix_conflict": False, 

2190 "comment": "", 

2191 "date_of_update": 1657543457.282708, 

2192 "iteration_of_sampling": 1, 

2193 }, 

2194 "(1,3)": { 

2195 "data": {"id_1": "1", "id_2": "3"}, 

2196 "constraint_type": "MUST_LINK", 

2197 "constraint_type_previous": [None], 

2198 "is_hidden": False, 

2199 "to_annotate": False, 

2200 "to_review": False, 

2201 "to_fix_conflict": False, 

2202 "comment": "", 

2203 "date_of_update": 1657543464.28536, 

2204 "iteration_of_sampling": 1, 

2205 }, 

2206 "(4,7)": { 

2207 "data": {"id_1": "4", "id_2": "7"}, 

2208 "constraint_type": "MUST_LINK", 

2209 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

2210 "is_hidden": False, 

2211 "to_annotate": False, 

2212 "to_review": True, 

2213 "to_fix_conflict": False, 

2214 "comment": "Même intention (gestion carte virtuelle).", 

2215 "date_of_update": 1657546214.538204, 

2216 "iteration_of_sampling": 1, 

2217 }, 

2218 "(21,22)": { 

2219 "data": {"id_1": "21", "id_2": "22"}, 

2220 "constraint_type": "MUST_LINK", 

2221 "constraint_type_previous": [None], 

2222 "is_hidden": False, 

2223 "to_annotate": False, 

2224 "to_review": False, 

2225 "to_fix_conflict": False, 

2226 "comment": "", 

2227 "date_of_update": 1657543471.789491, 

2228 "iteration_of_sampling": 1, 

2229 }, 

2230 "(11,12)": { 

2231 "data": {"id_1": "11", "id_2": "12"}, 

2232 "constraint_type": "MUST_LINK", 

2233 "constraint_type_previous": [None], 

2234 "is_hidden": False, 

2235 "to_annotate": False, 

2236 "to_review": False, 

2237 "to_fix_conflict": False, 

2238 "comment": "", 

2239 "date_of_update": 1657543475.46025, 

2240 "iteration_of_sampling": 1, 

2241 }, 

2242 "(10,11)": { 

2243 "data": {"id_1": "10", "id_2": "11"}, 

2244 "constraint_type": "MUST_LINK", 

2245 "constraint_type_previous": [None], 

2246 "is_hidden": False, 

2247 "to_annotate": False, 

2248 "to_review": False, 

2249 "to_fix_conflict": False, 

2250 "comment": "", 

2251 "date_of_update": 1657543487.605554, 

2252 "iteration_of_sampling": 1, 

2253 }, 

2254 "(1,6)": { 

2255 "data": {"id_1": "1", "id_2": "6"}, 

2256 "constraint_type": "MUST_LINK", 

2257 "constraint_type_previous": [None], 

2258 "is_hidden": False, 

2259 "to_annotate": False, 

2260 "to_review": True, 

2261 "to_fix_conflict": False, 

2262 "comment": "", 

2263 "date_of_update": 1657543490.330898, 

2264 "iteration_of_sampling": 1, 

2265 }, 

2266 "(2,4)": { 

2267 "data": {"id_1": "2", "id_2": "4"}, 

2268 "constraint_type": "MUST_LINK", 

2269 "constraint_type_previous": [None], 

2270 "is_hidden": False, 

2271 "to_annotate": False, 

2272 "to_review": False, 

2273 "to_fix_conflict": False, 

2274 "comment": "", 

2275 "date_of_update": 1657543493.240642, 

2276 "iteration_of_sampling": 1, 

2277 }, 

2278 "(8,9)": { 

2279 "data": {"id_1": "8", "id_2": "9"}, 

2280 "constraint_type": "MUST_LINK", 

2281 "constraint_type_previous": [None], 

2282 "is_hidden": False, 

2283 "to_annotate": False, 

2284 "to_review": False, 

2285 "to_fix_conflict": False, 

2286 "comment": "", 

2287 "date_of_update": 1657543496.268081, 

2288 "iteration_of_sampling": 1, 

2289 }, 

2290 "(17,22)": { 

2291 "data": {"id_1": "17", "id_2": "22"}, 

2292 "constraint_type": "MUST_LINK", 

2293 "constraint_type_previous": [None], 

2294 "is_hidden": False, 

2295 "to_annotate": False, 

2296 "to_review": False, 

2297 "to_fix_conflict": False, 

2298 "comment": "", 

2299 "date_of_update": 1657543500.755786, 

2300 "iteration_of_sampling": 1, 

2301 }, 

2302 "(19,22)": { 

2303 "data": {"id_1": "19", "id_2": "22"}, 

2304 "constraint_type": "MUST_LINK", 

2305 "constraint_type_previous": [None], 

2306 "is_hidden": False, 

2307 "to_annotate": False, 

2308 "to_review": False, 

2309 "to_fix_conflict": False, 

2310 "comment": "", 

2311 "date_of_update": 1657543503.891212, 

2312 "iteration_of_sampling": 1, 

2313 }, 

2314 "(1,7)": { 

2315 "data": {"id_1": "1", "id_2": "7"}, 

2316 "constraint_type": "MUST_LINK", 

2317 "constraint_type_previous": [None], 

2318 "is_hidden": False, 

2319 "to_annotate": False, 

2320 "to_review": True, 

2321 "to_fix_conflict": False, 

2322 "comment": "", 

2323 "date_of_update": 1657543507.347849, 

2324 "iteration_of_sampling": 1, 

2325 }, 

2326 "(22,8)": { 

2327 "data": {"id_1": "22", "id_2": "8"}, 

2328 "constraint_type": "CANNOT_LINK", 

2329 "constraint_type_previous": [None], 

2330 "is_hidden": False, 

2331 "to_annotate": False, 

2332 "to_review": False, 

2333 "to_fix_conflict": False, 

2334 "comment": "", 

2335 "date_of_update": 1657543535.036781, 

2336 "iteration_of_sampling": 1, 

2337 }, 

2338 "(18,22)": { 

2339 "data": {"id_1": "18", "id_2": "22"}, 

2340 "constraint_type": "MUST_LINK", 

2341 "constraint_type_previous": [None], 

2342 "is_hidden": False, 

2343 "to_annotate": False, 

2344 "to_review": False, 

2345 "to_fix_conflict": False, 

2346 "comment": "", 

2347 "date_of_update": 1657543537.76648, 

2348 "iteration_of_sampling": 1, 

2349 }, 

2350 "(15,16)": { 

2351 "data": {"id_1": "15", "id_2": "16"}, 

2352 "constraint_type": "CANNOT_LINK", 

2353 "constraint_type_previous": [None], 

2354 "is_hidden": False, 

2355 "to_annotate": False, 

2356 "to_review": False, 

2357 "to_fix_conflict": False, 

2358 "comment": "", 

2359 "date_of_update": 1657545325.795985, 

2360 "iteration_of_sampling": 1, 

2361 }, 

2362 "(13,16)": { 

2363 "data": {"id_1": "13", "id_2": "16"}, 

2364 "constraint_type": "CANNOT_LINK", 

2365 "constraint_type_previous": [None], 

2366 "is_hidden": False, 

2367 "to_annotate": False, 

2368 "to_review": False, 

2369 "to_fix_conflict": False, 

2370 "comment": "", 

2371 "date_of_update": 1657545332.124029, 

2372 "iteration_of_sampling": 1, 

2373 }, 

2374 "(4,6)": { 

2375 "data": {"id_1": "4", "id_2": "6"}, 

2376 "constraint_type": "MUST_LINK", 

2377 "constraint_type_previous": [None], 

2378 "is_hidden": False, 

2379 "to_annotate": False, 

2380 "to_review": True, 

2381 "to_fix_conflict": False, 

2382 "comment": "", 

2383 "date_of_update": 1657545344.703469, 

2384 "iteration_of_sampling": 1, 

2385 }, 

2386 "(18,8)": { 

2387 "data": {"id_1": "18", "id_2": "8"}, 

2388 "constraint_type": "CANNOT_LINK", 

2389 "constraint_type_previous": [None], 

2390 "is_hidden": False, 

2391 "to_annotate": False, 

2392 "to_review": False, 

2393 "to_fix_conflict": False, 

2394 "comment": "", 

2395 "date_of_update": 1657545348.247546, 

2396 "iteration_of_sampling": 1, 

2397 }, 

2398 "(13,15)": { 

2399 "data": {"id_1": "13", "id_2": "15"}, 

2400 "constraint_type": None, 

2401 "constraint_type_previous": [], 

2402 "is_hidden": False, 

2403 "to_annotate": True, 

2404 "to_review": False, 

2405 "to_fix_conflict": False, 

2406 "comment": "", 

2407 "date_of_update": None, 

2408 "iteration_of_sampling": 2, 

2409 }, 

2410 "(17,23)": { 

2411 "data": {"id_1": "17", "id_2": "23"}, 

2412 "constraint_type": None, 

2413 "constraint_type_previous": [], 

2414 "is_hidden": False, 

2415 "to_annotate": True, 

2416 "to_review": False, 

2417 "to_fix_conflict": False, 

2418 "comment": "", 

2419 "date_of_update": None, 

2420 "iteration_of_sampling": 2, 

2421 }, 

2422 "(12,13)": { 

2423 "data": {"id_1": "12", "id_2": "13"}, 

2424 "constraint_type": None, 

2425 "constraint_type_previous": [], 

2426 "is_hidden": False, 

2427 "to_annotate": True, 

2428 "to_review": False, 

2429 "to_fix_conflict": False, 

2430 "comment": "", 

2431 "date_of_update": None, 

2432 "iteration_of_sampling": 2, 

2433 }, 

2434 "(10,15)": { 

2435 "data": {"id_1": "10", "id_2": "15"}, 

2436 "constraint_type": None, 

2437 "constraint_type_previous": [], 

2438 "is_hidden": False, 

2439 "to_annotate": True, 

2440 "to_review": False, 

2441 "to_fix_conflict": False, 

2442 "comment": "", 

2443 "date_of_update": None, 

2444 "iteration_of_sampling": 2, 

2445 }, 

2446 "(21,23)": { 

2447 "data": {"id_1": "21", "id_2": "23"}, 

2448 "constraint_type": None, 

2449 "constraint_type_previous": [], 

2450 "is_hidden": False, 

2451 "to_annotate": True, 

2452 "to_review": False, 

2453 "to_fix_conflict": False, 

2454 "comment": "", 

2455 "date_of_update": None, 

2456 "iteration_of_sampling": 2, 

2457 }, 

2458 "(11,5)": { 

2459 "data": {"id_1": "11", "id_2": "5"}, 

2460 "constraint_type": None, 

2461 "constraint_type_previous": [], 

2462 "is_hidden": False, 

2463 "to_annotate": True, 

2464 "to_review": False, 

2465 "to_fix_conflict": False, 

2466 "comment": "", 

2467 "date_of_update": None, 

2468 "iteration_of_sampling": 2, 

2469 }, 

2470 "(1,5)": { 

2471 "data": {"id_1": "1", "id_2": "5"}, 

2472 "constraint_type": None, 

2473 "constraint_type_previous": [], 

2474 "is_hidden": False, 

2475 "to_annotate": True, 

2476 "to_review": False, 

2477 "to_fix_conflict": False, 

2478 "comment": "", 

2479 "date_of_update": None, 

2480 "iteration_of_sampling": 2, 

2481 }, 

2482 "(15,8)": { 

2483 "data": {"id_1": "15", "id_2": "8"}, 

2484 "constraint_type": None, 

2485 "constraint_type_previous": [], 

2486 "is_hidden": False, 

2487 "to_annotate": True, 

2488 "to_review": False, 

2489 "to_fix_conflict": False, 

2490 "comment": "", 

2491 "date_of_update": None, 

2492 "iteration_of_sampling": 2, 

2493 }, 

2494 "(19,23)": { 

2495 "data": {"id_1": "19", "id_2": "23"}, 

2496 "constraint_type": None, 

2497 "constraint_type_previous": [], 

2498 "is_hidden": False, 

2499 "to_annotate": True, 

2500 "to_review": False, 

2501 "to_fix_conflict": False, 

2502 "comment": "", 

2503 "date_of_update": None, 

2504 "iteration_of_sampling": 2, 

2505 }, 

2506 "(12,15)": { 

2507 "data": {"id_1": "12", "id_2": "15"}, 

2508 "constraint_type": None, 

2509 "constraint_type_previous": [], 

2510 "is_hidden": False, 

2511 "to_annotate": True, 

2512 "to_review": False, 

2513 "to_fix_conflict": False, 

2514 "comment": "", 

2515 "date_of_update": None, 

2516 "iteration_of_sampling": 2, 

2517 }, 

2518 "(4,5)": { 

2519 "data": {"id_1": "4", "id_2": "5"}, 

2520 "constraint_type": None, 

2521 "constraint_type_previous": [], 

2522 "is_hidden": False, 

2523 "to_annotate": True, 

2524 "to_review": False, 

2525 "to_fix_conflict": False, 

2526 "comment": "", 

2527 "date_of_update": None, 

2528 "iteration_of_sampling": 2, 

2529 }, 

2530 "(10,13)": { 

2531 "data": {"id_1": "10", "id_2": "13"}, 

2532 "constraint_type": None, 

2533 "constraint_type_previous": [], 

2534 "is_hidden": False, 

2535 "to_annotate": True, 

2536 "to_review": False, 

2537 "to_fix_conflict": False, 

2538 "comment": "", 

2539 "date_of_update": None, 

2540 "iteration_of_sampling": 2, 

2541 }, 

2542 "(5,9)": { 

2543 "data": {"id_1": "5", "id_2": "9"}, 

2544 "constraint_type": None, 

2545 "constraint_type_previous": [], 

2546 "is_hidden": False, 

2547 "to_annotate": True, 

2548 "to_review": False, 

2549 "to_fix_conflict": False, 

2550 "comment": "", 

2551 "date_of_update": None, 

2552 "iteration_of_sampling": 2, 

2553 }, 

2554 "(10,3)": { 

2555 "data": {"id_1": "10", "id_2": "3"}, 

2556 "constraint_type": None, 

2557 "constraint_type_previous": [], 

2558 "is_hidden": False, 

2559 "to_annotate": True, 

2560 "to_review": False, 

2561 "to_fix_conflict": False, 

2562 "comment": "", 

2563 "date_of_update": None, 

2564 "iteration_of_sampling": 2, 

2565 }, 

2566 "(15,9)": { 

2567 "data": {"id_1": "15", "id_2": "9"}, 

2568 "constraint_type": None, 

2569 "constraint_type_previous": [], 

2570 "is_hidden": False, 

2571 "to_annotate": True, 

2572 "to_review": False, 

2573 "to_fix_conflict": False, 

2574 "comment": "", 

2575 "date_of_update": None, 

2576 "iteration_of_sampling": 2, 

2577 }, 

2578 "(13,9)": { 

2579 "data": {"id_1": "13", "id_2": "9"}, 

2580 "constraint_type": None, 

2581 "constraint_type_previous": [], 

2582 "is_hidden": False, 

2583 "to_annotate": True, 

2584 "to_review": False, 

2585 "to_fix_conflict": False, 

2586 "comment": "", 

2587 "date_of_update": None, 

2588 "iteration_of_sampling": 2, 

2589 }, 

2590 "(11,4)": { 

2591 "data": {"id_1": "11", "id_2": "4"}, 

2592 "constraint_type": None, 

2593 "constraint_type_previous": [], 

2594 "is_hidden": False, 

2595 "to_annotate": True, 

2596 "to_review": False, 

2597 "to_fix_conflict": False, 

2598 "comment": "", 

2599 "date_of_update": None, 

2600 "iteration_of_sampling": 2, 

2601 }, 

2602 "(10,4)": { 

2603 "data": {"id_1": "10", "id_2": "4"}, 

2604 "constraint_type": None, 

2605 "constraint_type_previous": [], 

2606 "is_hidden": False, 

2607 "to_annotate": True, 

2608 "to_review": False, 

2609 "to_fix_conflict": False, 

2610 "comment": "", 

2611 "date_of_update": None, 

2612 "iteration_of_sampling": 2, 

2613 }, 

2614 "(13,8)": { 

2615 "data": {"id_1": "13", "id_2": "8"}, 

2616 "constraint_type": None, 

2617 "constraint_type_previous": [], 

2618 "is_hidden": False, 

2619 "to_annotate": True, 

2620 "to_review": False, 

2621 "to_fix_conflict": False, 

2622 "comment": "", 

2623 "date_of_update": None, 

2624 "iteration_of_sampling": 2, 

2625 }, 

2626 "(15,6)": { 

2627 "data": {"id_1": "15", "id_2": "6"}, 

2628 "constraint_type": None, 

2629 "constraint_type_previous": [], 

2630 "is_hidden": False, 

2631 "to_annotate": True, 

2632 "to_review": False, 

2633 "to_fix_conflict": False, 

2634 "comment": "", 

2635 "date_of_update": None, 

2636 "iteration_of_sampling": 2, 

2637 }, 

2638 "(13,6)": { 

2639 "data": {"id_1": "13", "id_2": "6"}, 

2640 "constraint_type": None, 

2641 "constraint_type_previous": [], 

2642 "is_hidden": False, 

2643 "to_annotate": True, 

2644 "to_review": False, 

2645 "to_fix_conflict": False, 

2646 "comment": "", 

2647 "date_of_update": None, 

2648 "iteration_of_sampling": 2, 

2649 }, 

2650 "(11,3)": { 

2651 "data": {"id_1": "11", "id_2": "3"}, 

2652 "constraint_type": None, 

2653 "constraint_type_previous": [], 

2654 "is_hidden": False, 

2655 "to_annotate": True, 

2656 "to_review": False, 

2657 "to_fix_conflict": False, 

2658 "comment": "", 

2659 "date_of_update": None, 

2660 "iteration_of_sampling": 2, 

2661 }, 

2662 "(11,15)": { 

2663 "data": {"id_1": "11", "id_2": "15"}, 

2664 "constraint_type": None, 

2665 "constraint_type_previous": [], 

2666 "is_hidden": False, 

2667 "to_annotate": True, 

2668 "to_review": False, 

2669 "to_fix_conflict": False, 

2670 "comment": "", 

2671 "date_of_update": None, 

2672 "iteration_of_sampling": 2, 

2673 }, 

2674 "(11,13)": { 

2675 "data": {"id_1": "11", "id_2": "13"}, 

2676 "constraint_type": None, 

2677 "constraint_type_previous": [], 

2678 "is_hidden": False, 

2679 "to_annotate": True, 

2680 "to_review": False, 

2681 "to_fix_conflict": False, 

2682 "comment": "", 

2683 "date_of_update": None, 

2684 "iteration_of_sampling": 2, 

2685 }, 

2686 "(12,3)": { 

2687 "data": {"id_1": "12", "id_2": "3"}, 

2688 "constraint_type": None, 

2689 "constraint_type_previous": [], 

2690 "is_hidden": False, 

2691 "to_annotate": True, 

2692 "to_review": False, 

2693 "to_fix_conflict": False, 

2694 "comment": "", 

2695 "date_of_update": None, 

2696 "iteration_of_sampling": 2, 

2697 }, 

2698 "(3,9)": { 

2699 "data": {"id_1": "3", "id_2": "9"}, 

2700 "constraint_type": None, 

2701 "constraint_type_previous": [], 

2702 "is_hidden": False, 

2703 "to_annotate": True, 

2704 "to_review": False, 

2705 "to_fix_conflict": False, 

2706 "comment": "", 

2707 "date_of_update": None, 

2708 "iteration_of_sampling": 2, 

2709 }, 

2710 "(22,23)": { 

2711 "data": {"id_1": "22", "id_2": "23"}, 

2712 "constraint_type": None, 

2713 "constraint_type_previous": [], 

2714 "is_hidden": False, 

2715 "to_annotate": True, 

2716 "to_review": False, 

2717 "to_fix_conflict": False, 

2718 "comment": "", 

2719 "date_of_update": None, 

2720 "iteration_of_sampling": 2, 

2721 }, 

2722 "(1,11)": { 

2723 "data": {"id_1": "1", "id_2": "11"}, 

2724 "constraint_type": None, 

2725 "constraint_type_previous": [], 

2726 "is_hidden": False, 

2727 "to_annotate": True, 

2728 "to_review": False, 

2729 "to_fix_conflict": False, 

2730 "comment": "", 

2731 "date_of_update": None, 

2732 "iteration_of_sampling": 2, 

2733 }, 

2734 "(11,7)": { 

2735 "data": {"id_1": "11", "id_2": "7"}, 

2736 "constraint_type": None, 

2737 "constraint_type_previous": [], 

2738 "is_hidden": False, 

2739 "to_annotate": True, 

2740 "to_review": False, 

2741 "to_fix_conflict": False, 

2742 "comment": "", 

2743 "date_of_update": None, 

2744 "iteration_of_sampling": 2, 

2745 }, 

2746 "(1,12)": { 

2747 "data": {"id_1": "1", "id_2": "12"}, 

2748 "constraint_type": None, 

2749 "constraint_type_previous": [], 

2750 "is_hidden": False, 

2751 "to_annotate": True, 

2752 "to_review": False, 

2753 "to_fix_conflict": False, 

2754 "comment": "", 

2755 "date_of_update": None, 

2756 "iteration_of_sampling": 2, 

2757 }, 

2758 "(1,9)": { 

2759 "data": {"id_1": "1", "id_2": "9"}, 

2760 "constraint_type": None, 

2761 "constraint_type_previous": [], 

2762 "is_hidden": False, 

2763 "to_annotate": True, 

2764 "to_review": False, 

2765 "to_fix_conflict": False, 

2766 "comment": "", 

2767 "date_of_update": None, 

2768 "iteration_of_sampling": 2, 

2769 }, 

2770 "(11,2)": { 

2771 "data": {"id_1": "11", "id_2": "2"}, 

2772 "constraint_type": None, 

2773 "constraint_type_previous": [], 

2774 "is_hidden": False, 

2775 "to_annotate": True, 

2776 "to_review": False, 

2777 "to_fix_conflict": False, 

2778 "comment": "", 

2779 "date_of_update": None, 

2780 "iteration_of_sampling": 2, 

2781 }, 

2782 "(1,10)": { 

2783 "data": {"id_1": "1", "id_2": "10"}, 

2784 "constraint_type": None, 

2785 "constraint_type_previous": [], 

2786 "is_hidden": False, 

2787 "to_annotate": True, 

2788 "to_review": False, 

2789 "to_fix_conflict": False, 

2790 "comment": "", 

2791 "date_of_update": None, 

2792 "iteration_of_sampling": 2, 

2793 }, 

2794 "(12,7)": { 

2795 "data": {"id_1": "12", "id_2": "7"}, 

2796 "constraint_type": None, 

2797 "constraint_type_previous": [], 

2798 "is_hidden": False, 

2799 "to_annotate": True, 

2800 "to_review": False, 

2801 "to_fix_conflict": False, 

2802 "comment": "", 

2803 "date_of_update": None, 

2804 "iteration_of_sampling": 2, 

2805 }, 

2806 "(7,9)": { 

2807 "data": {"id_1": "7", "id_2": "9"}, 

2808 "constraint_type": None, 

2809 "constraint_type_previous": [], 

2810 "is_hidden": False, 

2811 "to_annotate": True, 

2812 "to_review": False, 

2813 "to_fix_conflict": False, 

2814 "comment": "", 

2815 "date_of_update": None, 

2816 "iteration_of_sampling": 2, 

2817 }, 

2818 "(18,23)": { 

2819 "data": {"id_1": "18", "id_2": "23"}, 

2820 "constraint_type": None, 

2821 "constraint_type_previous": [], 

2822 "is_hidden": False, 

2823 "to_annotate": True, 

2824 "to_review": False, 

2825 "to_fix_conflict": False, 

2826 "comment": "", 

2827 "date_of_update": None, 

2828 "iteration_of_sampling": 2, 

2829 }, 

2830 "(10,7)": { 

2831 "data": {"id_1": "10", "id_2": "7"}, 

2832 "constraint_type": None, 

2833 "constraint_type_previous": [], 

2834 "is_hidden": False, 

2835 "to_annotate": True, 

2836 "to_review": False, 

2837 "to_fix_conflict": False, 

2838 "comment": "", 

2839 "date_of_update": None, 

2840 "iteration_of_sampling": 2, 

2841 }, 

2842 "(12,2)": { 

2843 "data": {"id_1": "12", "id_2": "2"}, 

2844 "constraint_type": None, 

2845 "constraint_type_previous": [], 

2846 "is_hidden": False, 

2847 "to_annotate": True, 

2848 "to_review": False, 

2849 "to_fix_conflict": False, 

2850 "comment": "", 

2851 "date_of_update": None, 

2852 "iteration_of_sampling": 2, 

2853 }, 

2854 "(20,23)": { 

2855 "data": {"id_1": "20", "id_2": "23"}, 

2856 "constraint_type": None, 

2857 "constraint_type_previous": [], 

2858 "is_hidden": False, 

2859 "to_annotate": True, 

2860 "to_review": False, 

2861 "to_fix_conflict": False, 

2862 "comment": "", 

2863 "date_of_update": None, 

2864 "iteration_of_sampling": 2, 

2865 }, 

2866 "(2,9)": { 

2867 "data": {"id_1": "2", "id_2": "9"}, 

2868 "constraint_type": None, 

2869 "constraint_type_previous": [], 

2870 "is_hidden": False, 

2871 "to_annotate": True, 

2872 "to_review": False, 

2873 "to_fix_conflict": False, 

2874 "comment": "", 

2875 "date_of_update": None, 

2876 "iteration_of_sampling": 2, 

2877 }, 

2878 "(10,2)": { 

2879 "data": {"id_1": "10", "id_2": "2"}, 

2880 "constraint_type": None, 

2881 "constraint_type_previous": [], 

2882 "is_hidden": False, 

2883 "to_annotate": True, 

2884 "to_review": False, 

2885 "to_fix_conflict": False, 

2886 "comment": "", 

2887 "date_of_update": None, 

2888 "iteration_of_sampling": 2, 

2889 }, 

2890 "(0,11)": { 

2891 "data": {"id_1": "0", "id_2": "11"}, 

2892 "constraint_type": None, 

2893 "constraint_type_previous": [], 

2894 "is_hidden": False, 

2895 "to_annotate": True, 

2896 "to_review": False, 

2897 "to_fix_conflict": False, 

2898 "comment": "", 

2899 "date_of_update": None, 

2900 "iteration_of_sampling": 2, 

2901 }, 

2902 "(0,15)": { 

2903 "data": {"id_1": "0", "id_2": "15"}, 

2904 "constraint_type": None, 

2905 "constraint_type_previous": [], 

2906 "is_hidden": False, 

2907 "to_annotate": True, 

2908 "to_review": False, 

2909 "to_fix_conflict": False, 

2910 "comment": "", 

2911 "date_of_update": None, 

2912 "iteration_of_sampling": 2, 

2913 }, 

2914 "(1,15)": { 

2915 "data": {"id_1": "1", "id_2": "15"}, 

2916 "constraint_type": None, 

2917 "constraint_type_previous": [], 

2918 "is_hidden": False, 

2919 "to_annotate": True, 

2920 "to_review": False, 

2921 "to_fix_conflict": False, 

2922 "comment": "", 

2923 "date_of_update": None, 

2924 "iteration_of_sampling": 2, 

2925 }, 

2926 "(6,8)": { 

2927 "data": {"id_1": "6", "id_2": "8"}, 

2928 "constraint_type": None, 

2929 "constraint_type_previous": [], 

2930 "is_hidden": False, 

2931 "to_annotate": True, 

2932 "to_review": False, 

2933 "to_fix_conflict": False, 

2934 "comment": "", 

2935 "date_of_update": None, 

2936 "iteration_of_sampling": 2, 

2937 }, 

2938 "(6,9)": { 

2939 "data": {"id_1": "6", "id_2": "9"}, 

2940 "constraint_type": None, 

2941 "constraint_type_previous": [], 

2942 "is_hidden": False, 

2943 "to_annotate": True, 

2944 "to_review": False, 

2945 "to_fix_conflict": False, 

2946 "comment": "", 

2947 "date_of_update": None, 

2948 "iteration_of_sampling": 2, 

2949 }, 

2950 "(11,6)": { 

2951 "data": {"id_1": "11", "id_2": "6"}, 

2952 "constraint_type": None, 

2953 "constraint_type_previous": [], 

2954 "is_hidden": False, 

2955 "to_annotate": True, 

2956 "to_review": False, 

2957 "to_fix_conflict": False, 

2958 "comment": "", 

2959 "date_of_update": None, 

2960 "iteration_of_sampling": 2, 

2961 }, 

2962 "(12,6)": { 

2963 "data": {"id_1": "12", "id_2": "6"}, 

2964 "constraint_type": None, 

2965 "constraint_type_previous": [], 

2966 "is_hidden": False, 

2967 "to_annotate": True, 

2968 "to_review": False, 

2969 "to_fix_conflict": False, 

2970 "comment": "", 

2971 "date_of_update": None, 

2972 "iteration_of_sampling": 2, 

2973 }, 

2974 "(15,3)": { 

2975 "data": {"id_1": "15", "id_2": "3"}, 

2976 "constraint_type": None, 

2977 "constraint_type_previous": [], 

2978 "is_hidden": False, 

2979 "to_annotate": True, 

2980 "to_review": False, 

2981 "to_fix_conflict": False, 

2982 "comment": "", 

2983 "date_of_update": None, 

2984 "iteration_of_sampling": 2, 

2985 }, 

2986 "(15,7)": { 

2987 "data": {"id_1": "15", "id_2": "7"}, 

2988 "constraint_type": None, 

2989 "constraint_type_previous": [], 

2990 "is_hidden": False, 

2991 "to_annotate": True, 

2992 "to_review": False, 

2993 "to_fix_conflict": False, 

2994 "comment": "", 

2995 "date_of_update": None, 

2996 "iteration_of_sampling": 2, 

2997 }, 

2998 "(0,5)": { 

2999 "data": {"id_1": "0", "id_2": "5"}, 

3000 "constraint_type": None, 

3001 "constraint_type_previous": [], 

3002 "is_hidden": False, 

3003 "to_annotate": True, 

3004 "to_review": False, 

3005 "to_fix_conflict": False, 

3006 "comment": "", 

3007 "date_of_update": None, 

3008 "iteration_of_sampling": 2, 

3009 }, 

3010 "(0,8)": { 

3011 "data": {"id_1": "0", "id_2": "8"}, 

3012 "constraint_type": None, 

3013 "constraint_type_previous": [], 

3014 "is_hidden": False, 

3015 "to_annotate": True, 

3016 "to_review": False, 

3017 "to_fix_conflict": False, 

3018 "comment": "", 

3019 "date_of_update": None, 

3020 "iteration_of_sampling": 2, 

3021 }, 

3022 "(0,9)": { 

3023 "data": {"id_1": "0", "id_2": "9"}, 

3024 "constraint_type": None, 

3025 "constraint_type_previous": [], 

3026 "is_hidden": False, 

3027 "to_annotate": True, 

3028 "to_review": False, 

3029 "to_fix_conflict": False, 

3030 "comment": "", 

3031 "date_of_update": None, 

3032 "iteration_of_sampling": 2, 

3033 }, 

3034 "(0,10)": { 

3035 "data": {"id_1": "0", "id_2": "10"}, 

3036 "constraint_type": None, 

3037 "constraint_type_previous": [], 

3038 "is_hidden": False, 

3039 "to_annotate": True, 

3040 "to_review": False, 

3041 "to_fix_conflict": False, 

3042 "comment": "", 

3043 "date_of_update": None, 

3044 "iteration_of_sampling": 2, 

3045 }, 

3046 "(0,12)": { 

3047 "data": {"id_1": "0", "id_2": "12"}, 

3048 "constraint_type": None, 

3049 "constraint_type_previous": [], 

3050 "is_hidden": False, 

3051 "to_annotate": True, 

3052 "to_review": False, 

3053 "to_fix_conflict": False, 

3054 "comment": "", 

3055 "date_of_update": None, 

3056 "iteration_of_sampling": 2, 

3057 }, 

3058 "(0,13)": { 

3059 "data": {"id_1": "0", "id_2": "13"}, 

3060 "constraint_type": None, 

3061 "constraint_type_previous": [], 

3062 "is_hidden": False, 

3063 "to_annotate": True, 

3064 "to_review": False, 

3065 "to_fix_conflict": False, 

3066 "comment": "", 

3067 "date_of_update": None, 

3068 "iteration_of_sampling": 2, 

3069 }, 

3070 "(1,8)": { 

3071 "data": {"id_1": "1", "id_2": "8"}, 

3072 "constraint_type": None, 

3073 "constraint_type_previous": [], 

3074 "is_hidden": False, 

3075 "to_annotate": True, 

3076 "to_review": False, 

3077 "to_fix_conflict": False, 

3078 "comment": "", 

3079 "date_of_update": None, 

3080 "iteration_of_sampling": 2, 

3081 }, 

3082 "(1,13)": { 

3083 "data": {"id_1": "1", "id_2": "13"}, 

3084 "constraint_type": None, 

3085 "constraint_type_previous": [], 

3086 "is_hidden": False, 

3087 "to_annotate": True, 

3088 "to_review": False, 

3089 "to_fix_conflict": False, 

3090 "comment": "", 

3091 "date_of_update": None, 

3092 "iteration_of_sampling": 2, 

3093 }, 

3094 "(2,5)": { 

3095 "data": {"id_1": "2", "id_2": "5"}, 

3096 "constraint_type": None, 

3097 "constraint_type_previous": [], 

3098 "is_hidden": False, 

3099 "to_annotate": True, 

3100 "to_review": False, 

3101 "to_fix_conflict": False, 

3102 "comment": "", 

3103 "date_of_update": None, 

3104 "iteration_of_sampling": 2, 

3105 }, 

3106 "(2,8)": { 

3107 "data": {"id_1": "2", "id_2": "8"}, 

3108 "constraint_type": None, 

3109 "constraint_type_previous": [], 

3110 "is_hidden": False, 

3111 "to_annotate": True, 

3112 "to_review": False, 

3113 "to_fix_conflict": False, 

3114 "comment": "", 

3115 "date_of_update": None, 

3116 "iteration_of_sampling": 2, 

3117 }, 

3118 "(3,5)": { 

3119 "data": {"id_1": "3", "id_2": "5"}, 

3120 "constraint_type": None, 

3121 "constraint_type_previous": [], 

3122 "is_hidden": False, 

3123 "to_annotate": True, 

3124 "to_review": False, 

3125 "to_fix_conflict": False, 

3126 "comment": "", 

3127 "date_of_update": None, 

3128 "iteration_of_sampling": 2, 

3129 }, 

3130 "(3,8)": { 

3131 "data": {"id_1": "3", "id_2": "8"}, 

3132 "constraint_type": None, 

3133 "constraint_type_previous": [], 

3134 "is_hidden": False, 

3135 "to_annotate": True, 

3136 "to_review": False, 

3137 "to_fix_conflict": False, 

3138 "comment": "", 

3139 "date_of_update": None, 

3140 "iteration_of_sampling": 2, 

3141 }, 

3142 "(4,8)": { 

3143 "data": {"id_1": "4", "id_2": "8"}, 

3144 "constraint_type": None, 

3145 "constraint_type_previous": [], 

3146 "is_hidden": False, 

3147 "to_annotate": True, 

3148 "to_review": False, 

3149 "to_fix_conflict": False, 

3150 "comment": "", 

3151 "date_of_update": None, 

3152 "iteration_of_sampling": 2, 

3153 }, 

3154 "(4,9)": { 

3155 "data": {"id_1": "4", "id_2": "9"}, 

3156 "constraint_type": None, 

3157 "constraint_type_previous": [], 

3158 "is_hidden": False, 

3159 "to_annotate": True, 

3160 "to_review": False, 

3161 "to_fix_conflict": False, 

3162 "comment": "", 

3163 "date_of_update": None, 

3164 "iteration_of_sampling": 2, 

3165 }, 

3166 "(5,6)": { 

3167 "data": {"id_1": "5", "id_2": "6"}, 

3168 "constraint_type": None, 

3169 "constraint_type_previous": [], 

3170 "is_hidden": False, 

3171 "to_annotate": True, 

3172 "to_review": False, 

3173 "to_fix_conflict": False, 

3174 "comment": "", 

3175 "date_of_update": None, 

3176 "iteration_of_sampling": 2, 

3177 }, 

3178 "(5,7)": { 

3179 "data": {"id_1": "5", "id_2": "7"}, 

3180 "constraint_type": None, 

3181 "constraint_type_previous": [], 

3182 "is_hidden": False, 

3183 "to_annotate": True, 

3184 "to_review": False, 

3185 "to_fix_conflict": False, 

3186 "comment": "", 

3187 "date_of_update": None, 

3188 "iteration_of_sampling": 2, 

3189 }, 

3190 "(5,8)": { 

3191 "data": {"id_1": "5", "id_2": "8"}, 

3192 "constraint_type": None, 

3193 "constraint_type_previous": [], 

3194 "is_hidden": False, 

3195 "to_annotate": True, 

3196 "to_review": False, 

3197 "to_fix_conflict": False, 

3198 "comment": "", 

3199 "date_of_update": None, 

3200 "iteration_of_sampling": 2, 

3201 }, 

3202 "(7,8)": { 

3203 "data": {"id_1": "7", "id_2": "8"}, 

3204 "constraint_type": None, 

3205 "constraint_type_previous": [], 

3206 "is_hidden": False, 

3207 "to_annotate": True, 

3208 "to_review": False, 

3209 "to_fix_conflict": False, 

3210 "comment": "", 

3211 "date_of_update": None, 

3212 "iteration_of_sampling": 2, 

3213 }, 

3214 "(10,6)": { 

3215 "data": {"id_1": "10", "id_2": "6"}, 

3216 "constraint_type": None, 

3217 "constraint_type_previous": [], 

3218 "is_hidden": False, 

3219 "to_annotate": True, 

3220 "to_review": False, 

3221 "to_fix_conflict": False, 

3222 "comment": "", 

3223 "date_of_update": None, 

3224 "iteration_of_sampling": 2, 

3225 }, 

3226 "(12,4)": { 

3227 "data": {"id_1": "12", "id_2": "4"}, 

3228 "constraint_type": None, 

3229 "constraint_type_previous": [], 

3230 "is_hidden": False, 

3231 "to_annotate": True, 

3232 "to_review": False, 

3233 "to_fix_conflict": False, 

3234 "comment": "", 

3235 "date_of_update": None, 

3236 "iteration_of_sampling": 2, 

3237 }, 

3238 "(12,5)": { 

3239 "data": {"id_1": "12", "id_2": "5"}, 

3240 "constraint_type": None, 

3241 "constraint_type_previous": [], 

3242 "is_hidden": False, 

3243 "to_annotate": True, 

3244 "to_review": False, 

3245 "to_fix_conflict": False, 

3246 "comment": "", 

3247 "date_of_update": None, 

3248 "iteration_of_sampling": 2, 

3249 }, 

3250 "(13,2)": { 

3251 "data": {"id_1": "13", "id_2": "2"}, 

3252 "constraint_type": None, 

3253 "constraint_type_previous": [], 

3254 "is_hidden": False, 

3255 "to_annotate": True, 

3256 "to_review": False, 

3257 "to_fix_conflict": False, 

3258 "comment": "", 

3259 "date_of_update": None, 

3260 "iteration_of_sampling": 2, 

3261 }, 

3262 "(13,3)": { 

3263 "data": {"id_1": "13", "id_2": "3"}, 

3264 "constraint_type": None, 

3265 "constraint_type_previous": [], 

3266 "is_hidden": False, 

3267 "to_annotate": True, 

3268 "to_review": False, 

3269 "to_fix_conflict": False, 

3270 "comment": "", 

3271 "date_of_update": None, 

3272 "iteration_of_sampling": 2, 

3273 }, 

3274 "(13,4)": { 

3275 "data": {"id_1": "13", "id_2": "4"}, 

3276 "constraint_type": None, 

3277 "constraint_type_previous": [], 

3278 "is_hidden": False, 

3279 "to_annotate": True, 

3280 "to_review": False, 

3281 "to_fix_conflict": False, 

3282 "comment": "", 

3283 "date_of_update": None, 

3284 "iteration_of_sampling": 2, 

3285 }, 

3286 "(13,5)": { 

3287 "data": {"id_1": "13", "id_2": "5"}, 

3288 "constraint_type": None, 

3289 "constraint_type_previous": [], 

3290 "is_hidden": False, 

3291 "to_annotate": True, 

3292 "to_review": False, 

3293 "to_fix_conflict": False, 

3294 "comment": "", 

3295 "date_of_update": None, 

3296 "iteration_of_sampling": 2, 

3297 }, 

3298 "(13,7)": { 

3299 "data": {"id_1": "13", "id_2": "7"}, 

3300 "constraint_type": None, 

3301 "constraint_type_previous": [], 

3302 "is_hidden": False, 

3303 "to_annotate": True, 

3304 "to_review": False, 

3305 "to_fix_conflict": False, 

3306 "comment": "", 

3307 "date_of_update": None, 

3308 "iteration_of_sampling": 2, 

3309 }, 

3310 "(15,2)": { 

3311 "data": {"id_1": "15", "id_2": "2"}, 

3312 "constraint_type": None, 

3313 "constraint_type_previous": [], 

3314 "is_hidden": False, 

3315 "to_annotate": True, 

3316 "to_review": False, 

3317 "to_fix_conflict": False, 

3318 "comment": "", 

3319 "date_of_update": None, 

3320 "iteration_of_sampling": 2, 

3321 }, 

3322 "(15,4)": { 

3323 "data": {"id_1": "15", "id_2": "4"}, 

3324 "constraint_type": None, 

3325 "constraint_type_previous": [], 

3326 "is_hidden": False, 

3327 "to_annotate": True, 

3328 "to_review": False, 

3329 "to_fix_conflict": False, 

3330 "comment": "", 

3331 "date_of_update": None, 

3332 "iteration_of_sampling": 2, 

3333 }, 

3334 "(15,5)": { 

3335 "data": {"id_1": "15", "id_2": "5"}, 

3336 "constraint_type": None, 

3337 "constraint_type_previous": [], 

3338 "is_hidden": False, 

3339 "to_annotate": True, 

3340 "to_review": False, 

3341 "to_fix_conflict": False, 

3342 "comment": "", 

3343 "date_of_update": None, 

3344 "iteration_of_sampling": 2, 

3345 }, 

3346 "(10,5)": { 

3347 "data": {"id_1": "10", "id_2": "5"}, 

3348 "constraint_type": None, 

3349 "constraint_type_previous": [], 

3350 "is_hidden": False, 

3351 "to_annotate": True, 

3352 "to_review": False, 

3353 "to_fix_conflict": False, 

3354 "comment": "", 

3355 "date_of_update": None, 

3356 "iteration_of_sampling": 2, 

3357 }, 

3358 "(11,23)": { 

3359 "data": {"id_1": "11", "id_2": "23"}, 

3360 "constraint_type": None, 

3361 "constraint_type_previous": [], 

3362 "is_hidden": False, 

3363 "to_annotate": True, 

3364 "to_review": False, 

3365 "to_fix_conflict": False, 

3366 "comment": "", 

3367 "date_of_update": None, 

3368 "iteration_of_sampling": 2, 

3369 }, 

3370 "(15,19)": { 

3371 "data": {"id_1": "15", "id_2": "19"}, 

3372 "constraint_type": None, 

3373 "constraint_type_previous": [], 

3374 "is_hidden": False, 

3375 "to_annotate": True, 

3376 "to_review": False, 

3377 "to_fix_conflict": False, 

3378 "comment": "", 

3379 "date_of_update": None, 

3380 "iteration_of_sampling": 2, 

3381 }, 

3382 "(23,3)": { 

3383 "data": {"id_1": "23", "id_2": "3"}, 

3384 "constraint_type": None, 

3385 "constraint_type_previous": [], 

3386 "is_hidden": False, 

3387 "to_annotate": True, 

3388 "to_review": False, 

3389 "to_fix_conflict": False, 

3390 "comment": "", 

3391 "date_of_update": None, 

3392 "iteration_of_sampling": 2, 

3393 }, 

3394 "(17,5)": { 

3395 "data": {"id_1": "17", "id_2": "5"}, 

3396 "constraint_type": None, 

3397 "constraint_type_previous": [], 

3398 "is_hidden": False, 

3399 "to_annotate": True, 

3400 "to_review": False, 

3401 "to_fix_conflict": False, 

3402 "comment": "", 

3403 "date_of_update": None, 

3404 "iteration_of_sampling": 2, 

3405 }, 

3406 "(20,5)": { 

3407 "data": {"id_1": "20", "id_2": "5"}, 

3408 "constraint_type": None, 

3409 "constraint_type_previous": [], 

3410 "is_hidden": False, 

3411 "to_annotate": True, 

3412 "to_review": False, 

3413 "to_fix_conflict": False, 

3414 "comment": "", 

3415 "date_of_update": None, 

3416 "iteration_of_sampling": 2, 

3417 }, 

3418 "(13,17)": { 

3419 "data": {"id_1": "13", "id_2": "17"}, 

3420 "constraint_type": None, 

3421 "constraint_type_previous": [], 

3422 "is_hidden": False, 

3423 "to_annotate": True, 

3424 "to_review": False, 

3425 "to_fix_conflict": False, 

3426 "comment": "", 

3427 "date_of_update": None, 

3428 "iteration_of_sampling": 2, 

3429 }, 

3430 "(18,5)": { 

3431 "data": {"id_1": "18", "id_2": "5"}, 

3432 "constraint_type": None, 

3433 "constraint_type_previous": [], 

3434 "is_hidden": False, 

3435 "to_annotate": True, 

3436 "to_review": False, 

3437 "to_fix_conflict": False, 

3438 "comment": "", 

3439 "date_of_update": None, 

3440 "iteration_of_sampling": 2, 

3441 }, 

3442 "(13,23)": { 

3443 "data": {"id_1": "13", "id_2": "23"}, 

3444 "constraint_type": None, 

3445 "constraint_type_previous": [], 

3446 "is_hidden": False, 

3447 "to_annotate": True, 

3448 "to_review": False, 

3449 "to_fix_conflict": False, 

3450 "comment": "", 

3451 "date_of_update": None, 

3452 "iteration_of_sampling": 2, 

3453 }, 

3454 "(23,9)": { 

3455 "data": {"id_1": "23", "id_2": "9"}, 

3456 "constraint_type": None, 

3457 "constraint_type_previous": [], 

3458 "is_hidden": False, 

3459 "to_annotate": True, 

3460 "to_review": False, 

3461 "to_fix_conflict": False, 

3462 "comment": "", 

3463 "date_of_update": None, 

3464 "iteration_of_sampling": 2, 

3465 }, 

3466 "(23,5)": { 

3467 "data": {"id_1": "23", "id_2": "5"}, 

3468 "constraint_type": None, 

3469 "constraint_type_previous": [], 

3470 "is_hidden": False, 

3471 "to_annotate": True, 

3472 "to_review": False, 

3473 "to_fix_conflict": False, 

3474 "comment": "", 

3475 "date_of_update": None, 

3476 "iteration_of_sampling": 2, 

3477 }, 

3478 "(23,4)": { 

3479 "data": {"id_1": "23", "id_2": "4"}, 

3480 "constraint_type": None, 

3481 "constraint_type_previous": [], 

3482 "is_hidden": False, 

3483 "to_annotate": True, 

3484 "to_review": False, 

3485 "to_fix_conflict": False, 

3486 "comment": "", 

3487 "date_of_update": None, 

3488 "iteration_of_sampling": 2, 

3489 }, 

3490 "(15,22)": { 

3491 "data": {"id_1": "15", "id_2": "22"}, 

3492 "constraint_type": None, 

3493 "constraint_type_previous": [], 

3494 "is_hidden": False, 

3495 "to_annotate": True, 

3496 "to_review": False, 

3497 "to_fix_conflict": False, 

3498 "comment": "", 

3499 "date_of_update": None, 

3500 "iteration_of_sampling": 2, 

3501 }, 

3502 "(16,8)": { 

3503 "data": {"id_1": "16", "id_2": "8"}, 

3504 "constraint_type": None, 

3505 "constraint_type_previous": [], 

3506 "is_hidden": False, 

3507 "to_annotate": True, 

3508 "to_review": False, 

3509 "to_fix_conflict": False, 

3510 "comment": "", 

3511 "date_of_update": None, 

3512 "iteration_of_sampling": 2, 

3513 }, 

3514 "(19,5)": { 

3515 "data": {"id_1": "19", "id_2": "5"}, 

3516 "constraint_type": None, 

3517 "constraint_type_previous": [], 

3518 "is_hidden": False, 

3519 "to_annotate": True, 

3520 "to_review": False, 

3521 "to_fix_conflict": False, 

3522 "comment": "", 

3523 "date_of_update": None, 

3524 "iteration_of_sampling": 2, 

3525 }, 

3526 "(16,2)": { 

3527 "data": {"id_1": "16", "id_2": "2"}, 

3528 "constraint_type": None, 

3529 "constraint_type_previous": [], 

3530 "is_hidden": False, 

3531 "to_annotate": True, 

3532 "to_review": False, 

3533 "to_fix_conflict": False, 

3534 "comment": "", 

3535 "date_of_update": None, 

3536 "iteration_of_sampling": 2, 

3537 }, 

3538 "(1,23)": { 

3539 "data": {"id_1": "1", "id_2": "23"}, 

3540 "constraint_type": None, 

3541 "constraint_type_previous": [], 

3542 "is_hidden": False, 

3543 "to_annotate": True, 

3544 "to_review": False, 

3545 "to_fix_conflict": False, 

3546 "comment": "", 

3547 "date_of_update": None, 

3548 "iteration_of_sampling": 2, 

3549 }, 

3550 "(21,5)": { 

3551 "data": {"id_1": "21", "id_2": "5"}, 

3552 "constraint_type": None, 

3553 "constraint_type_previous": [], 

3554 "is_hidden": False, 

3555 "to_annotate": True, 

3556 "to_review": False, 

3557 "to_fix_conflict": False, 

3558 "comment": "", 

3559 "date_of_update": None, 

3560 "iteration_of_sampling": 2, 

3561 }, 

3562 "(15,18)": { 

3563 "data": {"id_1": "15", "id_2": "18"}, 

3564 "constraint_type": None, 

3565 "constraint_type_previous": [], 

3566 "is_hidden": False, 

3567 "to_annotate": True, 

3568 "to_review": False, 

3569 "to_fix_conflict": False, 

3570 "comment": "", 

3571 "date_of_update": None, 

3572 "iteration_of_sampling": 2, 

3573 }, 

3574 "(16,21)": { 

3575 "data": {"id_1": "16", "id_2": "21"}, 

3576 "constraint_type": None, 

3577 "constraint_type_previous": [], 

3578 "is_hidden": False, 

3579 "to_annotate": True, 

3580 "to_review": False, 

3581 "to_fix_conflict": False, 

3582 "comment": "", 

3583 "date_of_update": None, 

3584 "iteration_of_sampling": 2, 

3585 }, 

3586 "(22,5)": { 

3587 "data": {"id_1": "22", "id_2": "5"}, 

3588 "constraint_type": None, 

3589 "constraint_type_previous": [], 

3590 "is_hidden": False, 

3591 "to_annotate": True, 

3592 "to_review": False, 

3593 "to_fix_conflict": False, 

3594 "comment": "", 

3595 "date_of_update": None, 

3596 "iteration_of_sampling": 2, 

3597 }, 

3598 "(23,7)": { 

3599 "data": {"id_1": "23", "id_2": "7"}, 

3600 "constraint_type": None, 

3601 "constraint_type_previous": [], 

3602 "is_hidden": False, 

3603 "to_annotate": True, 

3604 "to_review": False, 

3605 "to_fix_conflict": False, 

3606 "comment": "", 

3607 "date_of_update": None, 

3608 "iteration_of_sampling": 2, 

3609 }, 

3610 "(10,16)": { 

3611 "data": {"id_1": "10", "id_2": "16"}, 

3612 "constraint_type": None, 

3613 "constraint_type_previous": [], 

3614 "is_hidden": False, 

3615 "to_annotate": True, 

3616 "to_review": False, 

3617 "to_fix_conflict": False, 

3618 "comment": "", 

3619 "date_of_update": None, 

3620 "iteration_of_sampling": 2, 

3621 }, 

3622 "(0,16)": { 

3623 "data": {"id_1": "0", "id_2": "16"}, 

3624 "constraint_type": None, 

3625 "constraint_type_previous": [], 

3626 "is_hidden": False, 

3627 "to_annotate": True, 

3628 "to_review": False, 

3629 "to_fix_conflict": False, 

3630 "comment": "", 

3631 "date_of_update": None, 

3632 "iteration_of_sampling": 2, 

3633 }, 

3634 "(13,20)": { 

3635 "data": {"id_1": "13", "id_2": "20"}, 

3636 "constraint_type": None, 

3637 "constraint_type_previous": [], 

3638 "is_hidden": False, 

3639 "to_annotate": True, 

3640 "to_review": False, 

3641 "to_fix_conflict": False, 

3642 "comment": "", 

3643 "date_of_update": None, 

3644 "iteration_of_sampling": 2, 

3645 }, 

3646 "(16,23)": { 

3647 "data": {"id_1": "16", "id_2": "23"}, 

3648 "constraint_type": None, 

3649 "constraint_type_previous": [], 

3650 "is_hidden": False, 

3651 "to_annotate": True, 

3652 "to_review": False, 

3653 "to_fix_conflict": False, 

3654 "comment": "", 

3655 "date_of_update": None, 

3656 "iteration_of_sampling": 2, 

3657 }, 

3658 "(16,3)": { 

3659 "data": {"id_1": "16", "id_2": "3"}, 

3660 "constraint_type": None, 

3661 "constraint_type_previous": [], 

3662 "is_hidden": False, 

3663 "to_annotate": True, 

3664 "to_review": False, 

3665 "to_fix_conflict": False, 

3666 "comment": "", 

3667 "date_of_update": None, 

3668 "iteration_of_sampling": 2, 

3669 }, 

3670 "(13,18)": { 

3671 "data": {"id_1": "13", "id_2": "18"}, 

3672 "constraint_type": None, 

3673 "constraint_type_previous": [], 

3674 "is_hidden": False, 

3675 "to_annotate": True, 

3676 "to_review": False, 

3677 "to_fix_conflict": False, 

3678 "comment": "", 

3679 "date_of_update": None, 

3680 "iteration_of_sampling": 2, 

3681 }, 

3682 "(16,6)": { 

3683 "data": {"id_1": "16", "id_2": "6"}, 

3684 "constraint_type": None, 

3685 "constraint_type_previous": [], 

3686 "is_hidden": False, 

3687 "to_annotate": True, 

3688 "to_review": False, 

3689 "to_fix_conflict": False, 

3690 "comment": "", 

3691 "date_of_update": None, 

3692 "iteration_of_sampling": 2, 

3693 }, 

3694 "(2,23)": { 

3695 "data": {"id_1": "2", "id_2": "23"}, 

3696 "constraint_type": None, 

3697 "constraint_type_previous": [], 

3698 "is_hidden": False, 

3699 "to_annotate": True, 

3700 "to_review": False, 

3701 "to_fix_conflict": False, 

3702 "comment": "", 

3703 "date_of_update": None, 

3704 "iteration_of_sampling": 2, 

3705 }, 

3706 "(12,16)": { 

3707 "data": {"id_1": "12", "id_2": "16"}, 

3708 "constraint_type": None, 

3709 "constraint_type_previous": [], 

3710 "is_hidden": False, 

3711 "to_annotate": True, 

3712 "to_review": False, 

3713 "to_fix_conflict": False, 

3714 "comment": "", 

3715 "date_of_update": None, 

3716 "iteration_of_sampling": 2, 

3717 }, 

3718 "(13,19)": { 

3719 "data": {"id_1": "13", "id_2": "19"}, 

3720 "constraint_type": None, 

3721 "constraint_type_previous": [], 

3722 "is_hidden": False, 

3723 "to_annotate": True, 

3724 "to_review": False, 

3725 "to_fix_conflict": False, 

3726 "comment": "", 

3727 "date_of_update": None, 

3728 "iteration_of_sampling": 2, 

3729 }, 

3730 "(23,6)": { 

3731 "data": {"id_1": "23", "id_2": "6"}, 

3732 "constraint_type": None, 

3733 "constraint_type_previous": [], 

3734 "is_hidden": False, 

3735 "to_annotate": True, 

3736 "to_review": False, 

3737 "to_fix_conflict": False, 

3738 "comment": "", 

3739 "date_of_update": None, 

3740 "iteration_of_sampling": 2, 

3741 }, 

3742 "(16,9)": { 

3743 "data": {"id_1": "16", "id_2": "9"}, 

3744 "constraint_type": None, 

3745 "constraint_type_previous": [], 

3746 "is_hidden": False, 

3747 "to_annotate": True, 

3748 "to_review": False, 

3749 "to_fix_conflict": False, 

3750 "comment": "", 

3751 "date_of_update": None, 

3752 "iteration_of_sampling": 2, 

3753 }, 

3754 "(15,20)": { 

3755 "data": {"id_1": "15", "id_2": "20"}, 

3756 "constraint_type": None, 

3757 "constraint_type_previous": [], 

3758 "is_hidden": False, 

3759 "to_annotate": True, 

3760 "to_review": False, 

3761 "to_fix_conflict": False, 

3762 "comment": "", 

3763 "date_of_update": None, 

3764 "iteration_of_sampling": 2, 

3765 }, 

3766 "(16,4)": { 

3767 "data": {"id_1": "16", "id_2": "4"}, 

3768 "constraint_type": None, 

3769 "constraint_type_previous": [], 

3770 "is_hidden": False, 

3771 "to_annotate": True, 

3772 "to_review": False, 

3773 "to_fix_conflict": False, 

3774 "comment": "", 

3775 "date_of_update": None, 

3776 "iteration_of_sampling": 2, 

3777 }, 

3778 "(13,22)": { 

3779 "data": {"id_1": "13", "id_2": "22"}, 

3780 "constraint_type": None, 

3781 "constraint_type_previous": [], 

3782 "is_hidden": False, 

3783 "to_annotate": True, 

3784 "to_review": False, 

3785 "to_fix_conflict": False, 

3786 "comment": "", 

3787 "date_of_update": None, 

3788 "iteration_of_sampling": 2, 

3789 }, 

3790 "(16,19)": { 

3791 "data": {"id_1": "16", "id_2": "19"}, 

3792 "constraint_type": None, 

3793 "constraint_type_previous": [], 

3794 "is_hidden": False, 

3795 "to_annotate": True, 

3796 "to_review": False, 

3797 "to_fix_conflict": False, 

3798 "comment": "", 

3799 "date_of_update": None, 

3800 "iteration_of_sampling": 2, 

3801 }, 

3802 "(15,17)": { 

3803 "data": {"id_1": "15", "id_2": "17"}, 

3804 "constraint_type": None, 

3805 "constraint_type_previous": [], 

3806 "is_hidden": False, 

3807 "to_annotate": True, 

3808 "to_review": False, 

3809 "to_fix_conflict": False, 

3810 "comment": "", 

3811 "date_of_update": None, 

3812 "iteration_of_sampling": 2, 

3813 }, 

3814 "(15,21)": { 

3815 "data": {"id_1": "15", "id_2": "21"}, 

3816 "constraint_type": None, 

3817 "constraint_type_previous": [], 

3818 "is_hidden": False, 

3819 "to_annotate": True, 

3820 "to_review": False, 

3821 "to_fix_conflict": False, 

3822 "comment": "", 

3823 "date_of_update": None, 

3824 "iteration_of_sampling": 2, 

3825 }, 

3826 "(16,20)": { 

3827 "data": {"id_1": "16", "id_2": "20"}, 

3828 "constraint_type": None, 

3829 "constraint_type_previous": [], 

3830 "is_hidden": False, 

3831 "to_annotate": True, 

3832 "to_review": False, 

3833 "to_fix_conflict": False, 

3834 "comment": "", 

3835 "date_of_update": None, 

3836 "iteration_of_sampling": 2, 

3837 }, 

3838 "(12,23)": { 

3839 "data": {"id_1": "12", "id_2": "23"}, 

3840 "constraint_type": None, 

3841 "constraint_type_previous": [], 

3842 "is_hidden": False, 

3843 "to_annotate": True, 

3844 "to_review": False, 

3845 "to_fix_conflict": False, 

3846 "comment": "", 

3847 "date_of_update": None, 

3848 "iteration_of_sampling": 2, 

3849 }, 

3850 "(16,18)": { 

3851 "data": {"id_1": "16", "id_2": "18"}, 

3852 "constraint_type": None, 

3853 "constraint_type_previous": [], 

3854 "is_hidden": False, 

3855 "to_annotate": True, 

3856 "to_review": False, 

3857 "to_fix_conflict": False, 

3858 "comment": "", 

3859 "date_of_update": None, 

3860 "iteration_of_sampling": 2, 

3861 }, 

3862 "(13,21)": { 

3863 "data": {"id_1": "13", "id_2": "21"}, 

3864 "constraint_type": None, 

3865 "constraint_type_previous": [], 

3866 "is_hidden": False, 

3867 "to_annotate": True, 

3868 "to_review": False, 

3869 "to_fix_conflict": False, 

3870 "comment": "", 

3871 "date_of_update": None, 

3872 "iteration_of_sampling": 2, 

3873 }, 

3874 "(23,8)": { 

3875 "data": {"id_1": "23", "id_2": "8"}, 

3876 "constraint_type": None, 

3877 "constraint_type_previous": [], 

3878 "is_hidden": False, 

3879 "to_annotate": True, 

3880 "to_review": False, 

3881 "to_fix_conflict": False, 

3882 "comment": "", 

3883 "date_of_update": None, 

3884 "iteration_of_sampling": 2, 

3885 }, 

3886 "(1,16)": { 

3887 "data": {"id_1": "1", "id_2": "16"}, 

3888 "constraint_type": None, 

3889 "constraint_type_previous": [], 

3890 "is_hidden": False, 

3891 "to_annotate": True, 

3892 "to_review": False, 

3893 "to_fix_conflict": False, 

3894 "comment": "", 

3895 "date_of_update": None, 

3896 "iteration_of_sampling": 2, 

3897 }, 

3898 "(16,5)": { 

3899 "data": {"id_1": "16", "id_2": "5"}, 

3900 "constraint_type": None, 

3901 "constraint_type_previous": [], 

3902 "is_hidden": False, 

3903 "to_annotate": True, 

3904 "to_review": False, 

3905 "to_fix_conflict": False, 

3906 "comment": "", 

3907 "date_of_update": None, 

3908 "iteration_of_sampling": 2, 

3909 }, 

3910 "(16,22)": { 

3911 "data": {"id_1": "16", "id_2": "22"}, 

3912 "constraint_type": None, 

3913 "constraint_type_previous": [], 

3914 "is_hidden": False, 

3915 "to_annotate": True, 

3916 "to_review": False, 

3917 "to_fix_conflict": False, 

3918 "comment": "", 

3919 "date_of_update": None, 

3920 "iteration_of_sampling": 2, 

3921 }, 

3922 "(11,16)": { 

3923 "data": {"id_1": "11", "id_2": "16"}, 

3924 "constraint_type": None, 

3925 "constraint_type_previous": [], 

3926 "is_hidden": False, 

3927 "to_annotate": True, 

3928 "to_review": False, 

3929 "to_fix_conflict": False, 

3930 "comment": "", 

3931 "date_of_update": None, 

3932 "iteration_of_sampling": 2, 

3933 }, 

3934 "(0,23)": { 

3935 "data": {"id_1": "0", "id_2": "23"}, 

3936 "constraint_type": None, 

3937 "constraint_type_previous": [], 

3938 "is_hidden": False, 

3939 "to_annotate": True, 

3940 "to_review": False, 

3941 "to_fix_conflict": False, 

3942 "comment": "", 

3943 "date_of_update": None, 

3944 "iteration_of_sampling": 2, 

3945 }, 

3946 "(16,7)": { 

3947 "data": {"id_1": "16", "id_2": "7"}, 

3948 "constraint_type": None, 

3949 "constraint_type_previous": [], 

3950 "is_hidden": False, 

3951 "to_annotate": True, 

3952 "to_review": False, 

3953 "to_fix_conflict": False, 

3954 "comment": "", 

3955 "date_of_update": None, 

3956 "iteration_of_sampling": 2, 

3957 }, 

3958 "(16,17)": { 

3959 "data": {"id_1": "16", "id_2": "17"}, 

3960 "constraint_type": None, 

3961 "constraint_type_previous": [], 

3962 "is_hidden": False, 

3963 "to_annotate": True, 

3964 "to_review": False, 

3965 "to_fix_conflict": False, 

3966 "comment": "", 

3967 "date_of_update": None, 

3968 "iteration_of_sampling": 2, 

3969 }, 

3970 "(10,23)": { 

3971 "data": {"id_1": "10", "id_2": "23"}, 

3972 "constraint_type": None, 

3973 "constraint_type_previous": [], 

3974 "is_hidden": False, 

3975 "to_annotate": True, 

3976 "to_review": False, 

3977 "to_fix_conflict": False, 

3978 "comment": "", 

3979 "date_of_update": None, 

3980 "iteration_of_sampling": 2, 

3981 }, 

3982 "(15,23)": { 

3983 "data": {"id_1": "15", "id_2": "23"}, 

3984 "constraint_type": None, 

3985 "constraint_type_previous": [], 

3986 "is_hidden": False, 

3987 "to_annotate": True, 

3988 "to_review": False, 

3989 "to_fix_conflict": False, 

3990 "comment": "", 

3991 "date_of_update": None, 

3992 "iteration_of_sampling": 2, 

3993 }, 

3994 }, 

3995 "parameters": { 

3996 "without_hidden_constraints": True, 

3997 "sorted_by": "iteration_of_sampling", 

3998 "sorted_reverse": False, 

3999 }, 

4000 } 

4001 

4002 

4003# ============================================================================== 

4004# test_ok_by_to_annotate 

4005# ============================================================================== 

4006 

4007 

4008@pytest.mark.asyncio() 

4009async def test_ok_by_to_annotate(async_client, tmp_path): 

4010 """ 

4011 Test the `GET /api/projects/{project_id}/constraints` route. 

4012 

4013 Arguments: 

4014 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

4015 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

4016 """ 

4017 # Assert HTTP client is created. 

4018 assert async_client 

4019 

4020 # Create dummy projects. 

4021 create_dummy_projects( 

4022 tmp_path=tmp_path, 

4023 list_of_dummy_project_ids=[ 

4024 "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

4025 ], 

4026 ) 

4027 

4028 # Assert route `GET /api/projects/{project_id}/constraints` works. 

4029 response_get = await async_client.get( 

4030 url="/api/projects/1l_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints?sorted_by=to_annotate" 

4031 ) 

4032 assert response_get.status_code == 200 

4033 list_of_hidden_marks = [ 

4034 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

4035 ] 

4036 assert True not in list_of_hidden_marks 

4037 list_of_to_annotate = [ 

4038 constraint_value["to_annotate"] for constraint_value in response_get.json()["constraints"].values() 

4039 ] 

4040 assert list_of_to_annotate == sorted(list_of_to_annotate, reverse=True) 

4041 assert response_get.json() == { 

4042 "project_id": "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

4043 "constraints": { 

4044 "(0,4)": { 

4045 "data": {"id_1": "0", "id_2": "4"}, 

4046 "constraint_type": "MUST_LINK", 

4047 "constraint_type_previous": [ 

4048 None, 

4049 "MUST_LINK", 

4050 None, 

4051 "MUST_LINK", 

4052 None, 

4053 None, 

4054 None, 

4055 "MUST_LINK", 

4056 "MUST_LINK", 

4057 "CANNOT_LINK", 

4058 ], 

4059 "is_hidden": False, 

4060 "to_annotate": False, 

4061 "to_review": False, 

4062 "to_fix_conflict": False, 

4063 "comment": "", 

4064 "date_of_update": 1657545443.884245, 

4065 "iteration_of_sampling": 1, 

4066 }, 

4067 "(12,9)": { 

4068 "data": {"id_1": "12", "id_2": "9"}, 

4069 "constraint_type": "MUST_LINK", 

4070 "constraint_type_previous": [None, "CANNOT_LINK"], 

4071 "is_hidden": False, 

4072 "to_annotate": False, 

4073 "to_review": False, 

4074 "to_fix_conflict": False, 

4075 "comment": "", 

4076 "date_of_update": 1657543315.242459, 

4077 "iteration_of_sampling": 1, 

4078 }, 

4079 "(10,9)": { 

4080 "data": {"id_1": "10", "id_2": "9"}, 

4081 "constraint_type": "MUST_LINK", 

4082 "constraint_type_previous": [None], 

4083 "is_hidden": False, 

4084 "to_annotate": False, 

4085 "to_review": False, 

4086 "to_fix_conflict": False, 

4087 "comment": "", 

4088 "date_of_update": 1657543432.412055, 

4089 "iteration_of_sampling": 1, 

4090 }, 

4091 "(1,2)": { 

4092 "data": {"id_1": "1", "id_2": "2"}, 

4093 "constraint_type": "MUST_LINK", 

4094 "constraint_type_previous": [None], 

4095 "is_hidden": False, 

4096 "to_annotate": False, 

4097 "to_review": False, 

4098 "to_fix_conflict": False, 

4099 "comment": "", 

4100 "date_of_update": 1657543438.389156, 

4101 "iteration_of_sampling": 1, 

4102 }, 

4103 "(22,6)": { 

4104 "data": {"id_1": "22", "id_2": "6"}, 

4105 "constraint_type": "CANNOT_LINK", 

4106 "constraint_type_previous": [None], 

4107 "is_hidden": False, 

4108 "to_annotate": False, 

4109 "to_review": False, 

4110 "to_fix_conflict": False, 

4111 "comment": "", 

4112 "date_of_update": 1657543454.547808, 

4113 "iteration_of_sampling": 1, 

4114 }, 

4115 "(20,22)": { 

4116 "data": {"id_1": "20", "id_2": "22"}, 

4117 "constraint_type": "MUST_LINK", 

4118 "constraint_type_previous": [None], 

4119 "is_hidden": False, 

4120 "to_annotate": False, 

4121 "to_review": False, 

4122 "to_fix_conflict": False, 

4123 "comment": "", 

4124 "date_of_update": 1657543457.282708, 

4125 "iteration_of_sampling": 1, 

4126 }, 

4127 "(1,3)": { 

4128 "data": {"id_1": "1", "id_2": "3"}, 

4129 "constraint_type": "MUST_LINK", 

4130 "constraint_type_previous": [None], 

4131 "is_hidden": False, 

4132 "to_annotate": False, 

4133 "to_review": False, 

4134 "to_fix_conflict": False, 

4135 "comment": "", 

4136 "date_of_update": 1657543464.28536, 

4137 "iteration_of_sampling": 1, 

4138 }, 

4139 "(4,7)": { 

4140 "data": {"id_1": "4", "id_2": "7"}, 

4141 "constraint_type": "MUST_LINK", 

4142 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

4143 "is_hidden": False, 

4144 "to_annotate": False, 

4145 "to_review": True, 

4146 "to_fix_conflict": False, 

4147 "comment": "Même intention (gestion carte virtuelle).", 

4148 "date_of_update": 1657546214.538204, 

4149 "iteration_of_sampling": 1, 

4150 }, 

4151 "(21,22)": { 

4152 "data": {"id_1": "21", "id_2": "22"}, 

4153 "constraint_type": "MUST_LINK", 

4154 "constraint_type_previous": [None], 

4155 "is_hidden": False, 

4156 "to_annotate": False, 

4157 "to_review": False, 

4158 "to_fix_conflict": False, 

4159 "comment": "", 

4160 "date_of_update": 1657543471.789491, 

4161 "iteration_of_sampling": 1, 

4162 }, 

4163 "(11,12)": { 

4164 "data": {"id_1": "11", "id_2": "12"}, 

4165 "constraint_type": "MUST_LINK", 

4166 "constraint_type_previous": [None], 

4167 "is_hidden": False, 

4168 "to_annotate": False, 

4169 "to_review": False, 

4170 "to_fix_conflict": False, 

4171 "comment": "", 

4172 "date_of_update": 1657543475.46025, 

4173 "iteration_of_sampling": 1, 

4174 }, 

4175 "(10,11)": { 

4176 "data": {"id_1": "10", "id_2": "11"}, 

4177 "constraint_type": "MUST_LINK", 

4178 "constraint_type_previous": [None], 

4179 "is_hidden": False, 

4180 "to_annotate": False, 

4181 "to_review": False, 

4182 "to_fix_conflict": False, 

4183 "comment": "", 

4184 "date_of_update": 1657543487.605554, 

4185 "iteration_of_sampling": 1, 

4186 }, 

4187 "(1,6)": { 

4188 "data": {"id_1": "1", "id_2": "6"}, 

4189 "constraint_type": "MUST_LINK", 

4190 "constraint_type_previous": [None], 

4191 "is_hidden": False, 

4192 "to_annotate": False, 

4193 "to_review": True, 

4194 "to_fix_conflict": False, 

4195 "comment": "", 

4196 "date_of_update": 1657543490.330898, 

4197 "iteration_of_sampling": 1, 

4198 }, 

4199 "(2,4)": { 

4200 "data": {"id_1": "2", "id_2": "4"}, 

4201 "constraint_type": "MUST_LINK", 

4202 "constraint_type_previous": [None], 

4203 "is_hidden": False, 

4204 "to_annotate": False, 

4205 "to_review": False, 

4206 "to_fix_conflict": False, 

4207 "comment": "", 

4208 "date_of_update": 1657543493.240642, 

4209 "iteration_of_sampling": 1, 

4210 }, 

4211 "(8,9)": { 

4212 "data": {"id_1": "8", "id_2": "9"}, 

4213 "constraint_type": "MUST_LINK", 

4214 "constraint_type_previous": [None], 

4215 "is_hidden": False, 

4216 "to_annotate": False, 

4217 "to_review": False, 

4218 "to_fix_conflict": False, 

4219 "comment": "", 

4220 "date_of_update": 1657543496.268081, 

4221 "iteration_of_sampling": 1, 

4222 }, 

4223 "(17,22)": { 

4224 "data": {"id_1": "17", "id_2": "22"}, 

4225 "constraint_type": "MUST_LINK", 

4226 "constraint_type_previous": [None], 

4227 "is_hidden": False, 

4228 "to_annotate": False, 

4229 "to_review": False, 

4230 "to_fix_conflict": False, 

4231 "comment": "", 

4232 "date_of_update": 1657543500.755786, 

4233 "iteration_of_sampling": 1, 

4234 }, 

4235 "(19,22)": { 

4236 "data": {"id_1": "19", "id_2": "22"}, 

4237 "constraint_type": "MUST_LINK", 

4238 "constraint_type_previous": [None], 

4239 "is_hidden": False, 

4240 "to_annotate": False, 

4241 "to_review": False, 

4242 "to_fix_conflict": False, 

4243 "comment": "", 

4244 "date_of_update": 1657543503.891212, 

4245 "iteration_of_sampling": 1, 

4246 }, 

4247 "(1,7)": { 

4248 "data": {"id_1": "1", "id_2": "7"}, 

4249 "constraint_type": "MUST_LINK", 

4250 "constraint_type_previous": [None], 

4251 "is_hidden": False, 

4252 "to_annotate": False, 

4253 "to_review": True, 

4254 "to_fix_conflict": False, 

4255 "comment": "", 

4256 "date_of_update": 1657543507.347849, 

4257 "iteration_of_sampling": 1, 

4258 }, 

4259 "(22,8)": { 

4260 "data": {"id_1": "22", "id_2": "8"}, 

4261 "constraint_type": "CANNOT_LINK", 

4262 "constraint_type_previous": [None], 

4263 "is_hidden": False, 

4264 "to_annotate": False, 

4265 "to_review": False, 

4266 "to_fix_conflict": False, 

4267 "comment": "", 

4268 "date_of_update": 1657543535.036781, 

4269 "iteration_of_sampling": 1, 

4270 }, 

4271 "(18,22)": { 

4272 "data": {"id_1": "18", "id_2": "22"}, 

4273 "constraint_type": "MUST_LINK", 

4274 "constraint_type_previous": [None], 

4275 "is_hidden": False, 

4276 "to_annotate": False, 

4277 "to_review": False, 

4278 "to_fix_conflict": False, 

4279 "comment": "", 

4280 "date_of_update": 1657543537.76648, 

4281 "iteration_of_sampling": 1, 

4282 }, 

4283 "(15,16)": { 

4284 "data": {"id_1": "15", "id_2": "16"}, 

4285 "constraint_type": "CANNOT_LINK", 

4286 "constraint_type_previous": [None], 

4287 "is_hidden": False, 

4288 "to_annotate": False, 

4289 "to_review": False, 

4290 "to_fix_conflict": False, 

4291 "comment": "", 

4292 "date_of_update": 1657545325.795985, 

4293 "iteration_of_sampling": 1, 

4294 }, 

4295 "(13,16)": { 

4296 "data": {"id_1": "13", "id_2": "16"}, 

4297 "constraint_type": "CANNOT_LINK", 

4298 "constraint_type_previous": [None], 

4299 "is_hidden": False, 

4300 "to_annotate": False, 

4301 "to_review": False, 

4302 "to_fix_conflict": False, 

4303 "comment": "", 

4304 "date_of_update": 1657545332.124029, 

4305 "iteration_of_sampling": 1, 

4306 }, 

4307 "(4,6)": { 

4308 "data": {"id_1": "4", "id_2": "6"}, 

4309 "constraint_type": "MUST_LINK", 

4310 "constraint_type_previous": [None], 

4311 "is_hidden": False, 

4312 "to_annotate": False, 

4313 "to_review": True, 

4314 "to_fix_conflict": False, 

4315 "comment": "", 

4316 "date_of_update": 1657545344.703469, 

4317 "iteration_of_sampling": 1, 

4318 }, 

4319 "(18,8)": { 

4320 "data": {"id_1": "18", "id_2": "8"}, 

4321 "constraint_type": "CANNOT_LINK", 

4322 "constraint_type_previous": [None], 

4323 "is_hidden": False, 

4324 "to_annotate": False, 

4325 "to_review": False, 

4326 "to_fix_conflict": False, 

4327 "comment": "", 

4328 "date_of_update": 1657545348.247546, 

4329 "iteration_of_sampling": 1, 

4330 }, 

4331 }, 

4332 "parameters": { 

4333 "without_hidden_constraints": True, 

4334 "sorted_by": "to_annotate", 

4335 "sorted_reverse": False, 

4336 }, 

4337 } 

4338 

4339 

4340# ============================================================================== 

4341# test_ok_by_to_review 

4342# ============================================================================== 

4343 

4344 

4345@pytest.mark.asyncio() 

4346async def test_ok_by_to_review(async_client, tmp_path): 

4347 """ 

4348 Test the `GET /api/projects/{project_id}/constraints` route. 

4349 

4350 Arguments: 

4351 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

4352 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

4353 """ 

4354 # Assert HTTP client is created. 

4355 assert async_client 

4356 

4357 # Create dummy projects. 

4358 create_dummy_projects( 

4359 tmp_path=tmp_path, 

4360 list_of_dummy_project_ids=[ 

4361 "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

4362 ], 

4363 ) 

4364 

4365 # Assert route `GET /api/projects/{project_id}/constraints` works. 

4366 response_get = await async_client.get( 

4367 url="/api/projects/1l_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints?sorted_by=to_review" 

4368 ) 

4369 assert response_get.status_code == 200 

4370 list_of_hidden_marks = [ 

4371 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

4372 ] 

4373 assert True not in list_of_hidden_marks 

4374 list_of_to_review = [ 

4375 constraint_value["to_review"] for constraint_value in response_get.json()["constraints"].values() 

4376 ] 

4377 assert list_of_to_review == sorted(list_of_to_review, reverse=True) 

4378 assert response_get.json() == { 

4379 "project_id": "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

4380 "constraints": { 

4381 "(4,7)": { 

4382 "data": {"id_1": "4", "id_2": "7"}, 

4383 "constraint_type": "MUST_LINK", 

4384 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

4385 "is_hidden": False, 

4386 "to_annotate": False, 

4387 "to_review": True, 

4388 "to_fix_conflict": False, 

4389 "comment": "Même intention (gestion carte virtuelle).", 

4390 "date_of_update": 1657546214.538204, 

4391 "iteration_of_sampling": 1, 

4392 }, 

4393 "(1,6)": { 

4394 "data": {"id_1": "1", "id_2": "6"}, 

4395 "constraint_type": "MUST_LINK", 

4396 "constraint_type_previous": [None], 

4397 "is_hidden": False, 

4398 "to_annotate": False, 

4399 "to_review": True, 

4400 "to_fix_conflict": False, 

4401 "comment": "", 

4402 "date_of_update": 1657543490.330898, 

4403 "iteration_of_sampling": 1, 

4404 }, 

4405 "(1,7)": { 

4406 "data": {"id_1": "1", "id_2": "7"}, 

4407 "constraint_type": "MUST_LINK", 

4408 "constraint_type_previous": [None], 

4409 "is_hidden": False, 

4410 "to_annotate": False, 

4411 "to_review": True, 

4412 "to_fix_conflict": False, 

4413 "comment": "", 

4414 "date_of_update": 1657543507.347849, 

4415 "iteration_of_sampling": 1, 

4416 }, 

4417 "(4,6)": { 

4418 "data": {"id_1": "4", "id_2": "6"}, 

4419 "constraint_type": "MUST_LINK", 

4420 "constraint_type_previous": [None], 

4421 "is_hidden": False, 

4422 "to_annotate": False, 

4423 "to_review": True, 

4424 "to_fix_conflict": False, 

4425 "comment": "", 

4426 "date_of_update": 1657545344.703469, 

4427 "iteration_of_sampling": 1, 

4428 }, 

4429 "(0,4)": { 

4430 "data": {"id_1": "0", "id_2": "4"}, 

4431 "constraint_type": "MUST_LINK", 

4432 "constraint_type_previous": [ 

4433 None, 

4434 "MUST_LINK", 

4435 None, 

4436 "MUST_LINK", 

4437 None, 

4438 None, 

4439 None, 

4440 "MUST_LINK", 

4441 "MUST_LINK", 

4442 "CANNOT_LINK", 

4443 ], 

4444 "is_hidden": False, 

4445 "to_annotate": False, 

4446 "to_review": False, 

4447 "to_fix_conflict": False, 

4448 "comment": "", 

4449 "date_of_update": 1657545443.884245, 

4450 "iteration_of_sampling": 1, 

4451 }, 

4452 "(12,9)": { 

4453 "data": {"id_1": "12", "id_2": "9"}, 

4454 "constraint_type": "MUST_LINK", 

4455 "constraint_type_previous": [None, "CANNOT_LINK"], 

4456 "is_hidden": False, 

4457 "to_annotate": False, 

4458 "to_review": False, 

4459 "to_fix_conflict": False, 

4460 "comment": "", 

4461 "date_of_update": 1657543315.242459, 

4462 "iteration_of_sampling": 1, 

4463 }, 

4464 "(10,9)": { 

4465 "data": {"id_1": "10", "id_2": "9"}, 

4466 "constraint_type": "MUST_LINK", 

4467 "constraint_type_previous": [None], 

4468 "is_hidden": False, 

4469 "to_annotate": False, 

4470 "to_review": False, 

4471 "to_fix_conflict": False, 

4472 "comment": "", 

4473 "date_of_update": 1657543432.412055, 

4474 "iteration_of_sampling": 1, 

4475 }, 

4476 "(1,2)": { 

4477 "data": {"id_1": "1", "id_2": "2"}, 

4478 "constraint_type": "MUST_LINK", 

4479 "constraint_type_previous": [None], 

4480 "is_hidden": False, 

4481 "to_annotate": False, 

4482 "to_review": False, 

4483 "to_fix_conflict": False, 

4484 "comment": "", 

4485 "date_of_update": 1657543438.389156, 

4486 "iteration_of_sampling": 1, 

4487 }, 

4488 "(22,6)": { 

4489 "data": {"id_1": "22", "id_2": "6"}, 

4490 "constraint_type": "CANNOT_LINK", 

4491 "constraint_type_previous": [None], 

4492 "is_hidden": False, 

4493 "to_annotate": False, 

4494 "to_review": False, 

4495 "to_fix_conflict": False, 

4496 "comment": "", 

4497 "date_of_update": 1657543454.547808, 

4498 "iteration_of_sampling": 1, 

4499 }, 

4500 "(20,22)": { 

4501 "data": {"id_1": "20", "id_2": "22"}, 

4502 "constraint_type": "MUST_LINK", 

4503 "constraint_type_previous": [None], 

4504 "is_hidden": False, 

4505 "to_annotate": False, 

4506 "to_review": False, 

4507 "to_fix_conflict": False, 

4508 "comment": "", 

4509 "date_of_update": 1657543457.282708, 

4510 "iteration_of_sampling": 1, 

4511 }, 

4512 "(1,3)": { 

4513 "data": {"id_1": "1", "id_2": "3"}, 

4514 "constraint_type": "MUST_LINK", 

4515 "constraint_type_previous": [None], 

4516 "is_hidden": False, 

4517 "to_annotate": False, 

4518 "to_review": False, 

4519 "to_fix_conflict": False, 

4520 "comment": "", 

4521 "date_of_update": 1657543464.28536, 

4522 "iteration_of_sampling": 1, 

4523 }, 

4524 "(21,22)": { 

4525 "data": {"id_1": "21", "id_2": "22"}, 

4526 "constraint_type": "MUST_LINK", 

4527 "constraint_type_previous": [None], 

4528 "is_hidden": False, 

4529 "to_annotate": False, 

4530 "to_review": False, 

4531 "to_fix_conflict": False, 

4532 "comment": "", 

4533 "date_of_update": 1657543471.789491, 

4534 "iteration_of_sampling": 1, 

4535 }, 

4536 "(11,12)": { 

4537 "data": {"id_1": "11", "id_2": "12"}, 

4538 "constraint_type": "MUST_LINK", 

4539 "constraint_type_previous": [None], 

4540 "is_hidden": False, 

4541 "to_annotate": False, 

4542 "to_review": False, 

4543 "to_fix_conflict": False, 

4544 "comment": "", 

4545 "date_of_update": 1657543475.46025, 

4546 "iteration_of_sampling": 1, 

4547 }, 

4548 "(10,11)": { 

4549 "data": {"id_1": "10", "id_2": "11"}, 

4550 "constraint_type": "MUST_LINK", 

4551 "constraint_type_previous": [None], 

4552 "is_hidden": False, 

4553 "to_annotate": False, 

4554 "to_review": False, 

4555 "to_fix_conflict": False, 

4556 "comment": "", 

4557 "date_of_update": 1657543487.605554, 

4558 "iteration_of_sampling": 1, 

4559 }, 

4560 "(2,4)": { 

4561 "data": {"id_1": "2", "id_2": "4"}, 

4562 "constraint_type": "MUST_LINK", 

4563 "constraint_type_previous": [None], 

4564 "is_hidden": False, 

4565 "to_annotate": False, 

4566 "to_review": False, 

4567 "to_fix_conflict": False, 

4568 "comment": "", 

4569 "date_of_update": 1657543493.240642, 

4570 "iteration_of_sampling": 1, 

4571 }, 

4572 "(8,9)": { 

4573 "data": {"id_1": "8", "id_2": "9"}, 

4574 "constraint_type": "MUST_LINK", 

4575 "constraint_type_previous": [None], 

4576 "is_hidden": False, 

4577 "to_annotate": False, 

4578 "to_review": False, 

4579 "to_fix_conflict": False, 

4580 "comment": "", 

4581 "date_of_update": 1657543496.268081, 

4582 "iteration_of_sampling": 1, 

4583 }, 

4584 "(17,22)": { 

4585 "data": {"id_1": "17", "id_2": "22"}, 

4586 "constraint_type": "MUST_LINK", 

4587 "constraint_type_previous": [None], 

4588 "is_hidden": False, 

4589 "to_annotate": False, 

4590 "to_review": False, 

4591 "to_fix_conflict": False, 

4592 "comment": "", 

4593 "date_of_update": 1657543500.755786, 

4594 "iteration_of_sampling": 1, 

4595 }, 

4596 "(19,22)": { 

4597 "data": {"id_1": "19", "id_2": "22"}, 

4598 "constraint_type": "MUST_LINK", 

4599 "constraint_type_previous": [None], 

4600 "is_hidden": False, 

4601 "to_annotate": False, 

4602 "to_review": False, 

4603 "to_fix_conflict": False, 

4604 "comment": "", 

4605 "date_of_update": 1657543503.891212, 

4606 "iteration_of_sampling": 1, 

4607 }, 

4608 "(22,8)": { 

4609 "data": {"id_1": "22", "id_2": "8"}, 

4610 "constraint_type": "CANNOT_LINK", 

4611 "constraint_type_previous": [None], 

4612 "is_hidden": False, 

4613 "to_annotate": False, 

4614 "to_review": False, 

4615 "to_fix_conflict": False, 

4616 "comment": "", 

4617 "date_of_update": 1657543535.036781, 

4618 "iteration_of_sampling": 1, 

4619 }, 

4620 "(18,22)": { 

4621 "data": {"id_1": "18", "id_2": "22"}, 

4622 "constraint_type": "MUST_LINK", 

4623 "constraint_type_previous": [None], 

4624 "is_hidden": False, 

4625 "to_annotate": False, 

4626 "to_review": False, 

4627 "to_fix_conflict": False, 

4628 "comment": "", 

4629 "date_of_update": 1657543537.76648, 

4630 "iteration_of_sampling": 1, 

4631 }, 

4632 "(15,16)": { 

4633 "data": {"id_1": "15", "id_2": "16"}, 

4634 "constraint_type": "CANNOT_LINK", 

4635 "constraint_type_previous": [None], 

4636 "is_hidden": False, 

4637 "to_annotate": False, 

4638 "to_review": False, 

4639 "to_fix_conflict": False, 

4640 "comment": "", 

4641 "date_of_update": 1657545325.795985, 

4642 "iteration_of_sampling": 1, 

4643 }, 

4644 "(13,16)": { 

4645 "data": {"id_1": "13", "id_2": "16"}, 

4646 "constraint_type": "CANNOT_LINK", 

4647 "constraint_type_previous": [None], 

4648 "is_hidden": False, 

4649 "to_annotate": False, 

4650 "to_review": False, 

4651 "to_fix_conflict": False, 

4652 "comment": "", 

4653 "date_of_update": 1657545332.124029, 

4654 "iteration_of_sampling": 1, 

4655 }, 

4656 "(18,8)": { 

4657 "data": {"id_1": "18", "id_2": "8"}, 

4658 "constraint_type": "CANNOT_LINK", 

4659 "constraint_type_previous": [None], 

4660 "is_hidden": False, 

4661 "to_annotate": False, 

4662 "to_review": False, 

4663 "to_fix_conflict": False, 

4664 "comment": "", 

4665 "date_of_update": 1657545348.247546, 

4666 "iteration_of_sampling": 1, 

4667 }, 

4668 }, 

4669 "parameters": { 

4670 "without_hidden_constraints": True, 

4671 "sorted_by": "to_review", 

4672 "sorted_reverse": False, 

4673 }, 

4674 } 

4675 

4676 

4677# ============================================================================== 

4678# test_ok_by_to_fix_conflict 

4679# ============================================================================== 

4680 

4681 

4682@pytest.mark.asyncio() 

4683async def test_ok_by_to_fix_conflict(async_client, tmp_path): 

4684 """ 

4685 Test the `GET /api/projects/{project_id}/constraints` route. 

4686 

4687 Arguments: 

4688 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

4689 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

4690 """ 

4691 # Assert HTTP client is created. 

4692 assert async_client 

4693 

4694 # Create dummy projects. 

4695 create_dummy_projects( 

4696 tmp_path=tmp_path, 

4697 list_of_dummy_project_ids=[ 

4698 "1h_ANNOTATION_WITH_OUTDATED_MODELIZATION_WITH_CONFLICTS", 

4699 ], 

4700 ) 

4701 

4702 # Assert route `GET /api/projects/{project_id}/constraints` works. 

4703 response_get = await async_client.get( 

4704 url="/api/projects/1h_ANNOTATION_WITH_OUTDATED_MODELIZATION_WITH_CONFLICTS/constraints?sorted_by=to_fix_conflict" 

4705 ) 

4706 assert response_get.status_code == 200 

4707 list_of_hidden_marks = [ 

4708 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

4709 ] 

4710 assert True not in list_of_hidden_marks 

4711 list_of_to_fix_conflict = [ 

4712 constraint_value["to_fix_conflict"] for constraint_value in response_get.json()["constraints"].values() 

4713 ] 

4714 assert True in list_of_to_fix_conflict 

4715 assert list_of_to_fix_conflict == sorted(list_of_to_fix_conflict, reverse=True) 

4716 assert response_get.json() == { 

4717 "project_id": "1h_ANNOTATION_WITH_OUTDATED_MODELIZATION_WITH_CONFLICTS", 

4718 "constraints": { 

4719 "(1,7)": { 

4720 "data": {"id_1": "1", "id_2": "7"}, 

4721 "constraint_type": "MUST_LINK", 

4722 "constraint_type_previous": [None], 

4723 "is_hidden": False, 

4724 "to_annotate": False, 

4725 "to_review": True, 

4726 "to_fix_conflict": True, 

4727 "comment": "", 

4728 "date_of_update": 1657543507.347849, 

4729 "iteration_of_sampling": 1, 

4730 }, 

4731 "(0,4)": { 

4732 "data": {"id_1": "0", "id_2": "4"}, 

4733 "constraint_type": "MUST_LINK", 

4734 "constraint_type_previous": [ 

4735 None, 

4736 "MUST_LINK", 

4737 None, 

4738 "MUST_LINK", 

4739 None, 

4740 None, 

4741 None, 

4742 "MUST_LINK", 

4743 "MUST_LINK", 

4744 "CANNOT_LINK", 

4745 ], 

4746 "is_hidden": False, 

4747 "to_annotate": False, 

4748 "to_review": False, 

4749 "to_fix_conflict": False, 

4750 "comment": "", 

4751 "date_of_update": 1657545443.884245, 

4752 "iteration_of_sampling": 1, 

4753 }, 

4754 "(12,9)": { 

4755 "data": {"id_1": "12", "id_2": "9"}, 

4756 "constraint_type": "MUST_LINK", 

4757 "constraint_type_previous": [None, "CANNOT_LINK"], 

4758 "is_hidden": False, 

4759 "to_annotate": False, 

4760 "to_review": False, 

4761 "to_fix_conflict": False, 

4762 "comment": "", 

4763 "date_of_update": 1657543315.242459, 

4764 "iteration_of_sampling": 1, 

4765 }, 

4766 "(10,9)": { 

4767 "data": {"id_1": "10", "id_2": "9"}, 

4768 "constraint_type": "MUST_LINK", 

4769 "constraint_type_previous": [None], 

4770 "is_hidden": False, 

4771 "to_annotate": False, 

4772 "to_review": False, 

4773 "to_fix_conflict": False, 

4774 "comment": "", 

4775 "date_of_update": 1657543432.412055, 

4776 "iteration_of_sampling": 1, 

4777 }, 

4778 "(1,2)": { 

4779 "data": {"id_1": "1", "id_2": "2"}, 

4780 "constraint_type": "MUST_LINK", 

4781 "constraint_type_previous": [None], 

4782 "is_hidden": False, 

4783 "to_annotate": False, 

4784 "to_review": False, 

4785 "to_fix_conflict": False, 

4786 "comment": "", 

4787 "date_of_update": 1657543438.389156, 

4788 "iteration_of_sampling": 1, 

4789 }, 

4790 "(22,6)": { 

4791 "data": {"id_1": "22", "id_2": "6"}, 

4792 "constraint_type": "CANNOT_LINK", 

4793 "constraint_type_previous": [None], 

4794 "is_hidden": False, 

4795 "to_annotate": False, 

4796 "to_review": False, 

4797 "to_fix_conflict": False, 

4798 "comment": "", 

4799 "date_of_update": 1657543454.547808, 

4800 "iteration_of_sampling": 1, 

4801 }, 

4802 "(20,22)": { 

4803 "data": {"id_1": "20", "id_2": "22"}, 

4804 "constraint_type": "MUST_LINK", 

4805 "constraint_type_previous": [None], 

4806 "is_hidden": False, 

4807 "to_annotate": False, 

4808 "to_review": False, 

4809 "to_fix_conflict": False, 

4810 "comment": "", 

4811 "date_of_update": 1657543457.282708, 

4812 "iteration_of_sampling": 1, 

4813 }, 

4814 "(1,3)": { 

4815 "data": {"id_1": "1", "id_2": "3"}, 

4816 "constraint_type": "MUST_LINK", 

4817 "constraint_type_previous": [None], 

4818 "is_hidden": False, 

4819 "to_annotate": False, 

4820 "to_review": False, 

4821 "to_fix_conflict": False, 

4822 "comment": "", 

4823 "date_of_update": 1657543464.28536, 

4824 "iteration_of_sampling": 1, 

4825 }, 

4826 "(4,7)": { 

4827 "data": {"id_1": "4", "id_2": "7"}, 

4828 "constraint_type": "CANNOT_LINK", 

4829 "constraint_type_previous": [None, "MUST_LINK"], 

4830 "is_hidden": False, 

4831 "to_annotate": False, 

4832 "to_review": True, 

4833 "to_fix_conflict": False, 

4834 "comment": "", 

4835 "date_of_update": 1657545553.46324, 

4836 "iteration_of_sampling": 1, 

4837 }, 

4838 "(21,22)": { 

4839 "data": {"id_1": "21", "id_2": "22"}, 

4840 "constraint_type": "MUST_LINK", 

4841 "constraint_type_previous": [None], 

4842 "is_hidden": False, 

4843 "to_annotate": False, 

4844 "to_review": False, 

4845 "to_fix_conflict": False, 

4846 "comment": "", 

4847 "date_of_update": 1657543471.789491, 

4848 "iteration_of_sampling": 1, 

4849 }, 

4850 "(11,12)": { 

4851 "data": {"id_1": "11", "id_2": "12"}, 

4852 "constraint_type": "MUST_LINK", 

4853 "constraint_type_previous": [None], 

4854 "is_hidden": False, 

4855 "to_annotate": False, 

4856 "to_review": False, 

4857 "to_fix_conflict": False, 

4858 "comment": "", 

4859 "date_of_update": 1657543475.46025, 

4860 "iteration_of_sampling": 1, 

4861 }, 

4862 "(10,11)": { 

4863 "data": {"id_1": "10", "id_2": "11"}, 

4864 "constraint_type": "MUST_LINK", 

4865 "constraint_type_previous": [None], 

4866 "is_hidden": False, 

4867 "to_annotate": False, 

4868 "to_review": False, 

4869 "to_fix_conflict": False, 

4870 "comment": "", 

4871 "date_of_update": 1657543487.605554, 

4872 "iteration_of_sampling": 1, 

4873 }, 

4874 "(1,6)": { 

4875 "data": {"id_1": "1", "id_2": "6"}, 

4876 "constraint_type": "MUST_LINK", 

4877 "constraint_type_previous": [None], 

4878 "is_hidden": False, 

4879 "to_annotate": False, 

4880 "to_review": True, 

4881 "to_fix_conflict": False, 

4882 "comment": "", 

4883 "date_of_update": 1657543490.330898, 

4884 "iteration_of_sampling": 1, 

4885 }, 

4886 "(2,4)": { 

4887 "data": {"id_1": "2", "id_2": "4"}, 

4888 "constraint_type": "MUST_LINK", 

4889 "constraint_type_previous": [None], 

4890 "is_hidden": False, 

4891 "to_annotate": False, 

4892 "to_review": False, 

4893 "to_fix_conflict": False, 

4894 "comment": "", 

4895 "date_of_update": 1657543493.240642, 

4896 "iteration_of_sampling": 1, 

4897 }, 

4898 "(8,9)": { 

4899 "data": {"id_1": "8", "id_2": "9"}, 

4900 "constraint_type": "MUST_LINK", 

4901 "constraint_type_previous": [None], 

4902 "is_hidden": False, 

4903 "to_annotate": False, 

4904 "to_review": False, 

4905 "to_fix_conflict": False, 

4906 "comment": "", 

4907 "date_of_update": 1657543496.268081, 

4908 "iteration_of_sampling": 1, 

4909 }, 

4910 "(17,22)": { 

4911 "data": {"id_1": "17", "id_2": "22"}, 

4912 "constraint_type": "MUST_LINK", 

4913 "constraint_type_previous": [None], 

4914 "is_hidden": False, 

4915 "to_annotate": False, 

4916 "to_review": False, 

4917 "to_fix_conflict": False, 

4918 "comment": "", 

4919 "date_of_update": 1657543500.755786, 

4920 "iteration_of_sampling": 1, 

4921 }, 

4922 "(19,22)": { 

4923 "data": {"id_1": "19", "id_2": "22"}, 

4924 "constraint_type": "MUST_LINK", 

4925 "constraint_type_previous": [None], 

4926 "is_hidden": False, 

4927 "to_annotate": False, 

4928 "to_review": False, 

4929 "to_fix_conflict": False, 

4930 "comment": "", 

4931 "date_of_update": 1657543503.891212, 

4932 "iteration_of_sampling": 1, 

4933 }, 

4934 "(22,8)": { 

4935 "data": {"id_1": "22", "id_2": "8"}, 

4936 "constraint_type": "CANNOT_LINK", 

4937 "constraint_type_previous": [None], 

4938 "is_hidden": False, 

4939 "to_annotate": False, 

4940 "to_review": False, 

4941 "to_fix_conflict": False, 

4942 "comment": "", 

4943 "date_of_update": 1657543535.036781, 

4944 "iteration_of_sampling": 1, 

4945 }, 

4946 "(18,22)": { 

4947 "data": {"id_1": "18", "id_2": "22"}, 

4948 "constraint_type": "MUST_LINK", 

4949 "constraint_type_previous": [None], 

4950 "is_hidden": False, 

4951 "to_annotate": False, 

4952 "to_review": False, 

4953 "to_fix_conflict": False, 

4954 "comment": "", 

4955 "date_of_update": 1657543537.76648, 

4956 "iteration_of_sampling": 1, 

4957 }, 

4958 "(15,16)": { 

4959 "data": {"id_1": "15", "id_2": "16"}, 

4960 "constraint_type": "CANNOT_LINK", 

4961 "constraint_type_previous": [None], 

4962 "is_hidden": False, 

4963 "to_annotate": False, 

4964 "to_review": False, 

4965 "to_fix_conflict": False, 

4966 "comment": "", 

4967 "date_of_update": 1657545325.795985, 

4968 "iteration_of_sampling": 1, 

4969 }, 

4970 "(13,16)": { 

4971 "data": {"id_1": "13", "id_2": "16"}, 

4972 "constraint_type": "CANNOT_LINK", 

4973 "constraint_type_previous": [None], 

4974 "is_hidden": False, 

4975 "to_annotate": False, 

4976 "to_review": False, 

4977 "to_fix_conflict": False, 

4978 "comment": "", 

4979 "date_of_update": 1657545332.124029, 

4980 "iteration_of_sampling": 1, 

4981 }, 

4982 "(4,6)": { 

4983 "data": {"id_1": "4", "id_2": "6"}, 

4984 "constraint_type": "MUST_LINK", 

4985 "constraint_type_previous": [None], 

4986 "is_hidden": False, 

4987 "to_annotate": False, 

4988 "to_review": True, 

4989 "to_fix_conflict": False, 

4990 "comment": "", 

4991 "date_of_update": 1657545344.703469, 

4992 "iteration_of_sampling": 1, 

4993 }, 

4994 "(18,8)": { 

4995 "data": {"id_1": "18", "id_2": "8"}, 

4996 "constraint_type": "CANNOT_LINK", 

4997 "constraint_type_previous": [None], 

4998 "is_hidden": False, 

4999 "to_annotate": False, 

5000 "to_review": False, 

5001 "to_fix_conflict": False, 

5002 "comment": "", 

5003 "date_of_update": 1657545348.247546, 

5004 "iteration_of_sampling": 1, 

5005 }, 

5006 }, 

5007 "parameters": { 

5008 "without_hidden_constraints": True, 

5009 "sorted_by": "to_fix_conflict", 

5010 "sorted_reverse": False, 

5011 }, 

5012 } 

5013 

5014 

5015# ============================================================================== 

5016# test_ok_by_sorted_reverse 

5017# ============================================================================== 

5018 

5019 

5020@pytest.mark.asyncio() 

5021async def test_ok_by_sorted_reverse(async_client, tmp_path): 

5022 """ 

5023 Test the `GET /api/projects/{project_id}/constraints` route. 

5024 

5025 Arguments: 

5026 async_client: Fixture providing an HTTP client, declared in `conftest.py`. 

5027 tmp_path: The temporary path given for this test, declared in `conftest.py`. 

5028 """ 

5029 # Assert HTTP client is created. 

5030 assert async_client 

5031 

5032 # Create dummy projects. 

5033 create_dummy_projects( 

5034 tmp_path=tmp_path, 

5035 list_of_dummy_project_ids=[ 

5036 "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

5037 ], 

5038 ) 

5039 

5040 # Assert route `GET /api/projects/{project_id}/constraints` works. 

5041 response_get = await async_client.get( 

5042 url="/api/projects/1l_ANNOTATION_WITH_UPTODATE_MODELIZATION/constraints?sorted_reverse=True" 

5043 ) 

5044 assert response_get.status_code == 200 

5045 list_of_hidden_marks = [ 

5046 constraint_value["is_hidden"] for constraint_value in response_get.json()["constraints"].values() 

5047 ] 

5048 assert True not in list_of_hidden_marks 

5049 assert response_get.json() == { 

5050 "project_id": "1l_ANNOTATION_WITH_UPTODATE_MODELIZATION", 

5051 "constraints": { 

5052 "(8,9)": { 

5053 "data": {"id_1": "8", "id_2": "9"}, 

5054 "constraint_type": "MUST_LINK", 

5055 "constraint_type_previous": [None], 

5056 "is_hidden": False, 

5057 "to_annotate": False, 

5058 "to_review": False, 

5059 "to_fix_conflict": False, 

5060 "comment": "", 

5061 "date_of_update": 1657543496.268081, 

5062 "iteration_of_sampling": 1, 

5063 }, 

5064 "(4,7)": { 

5065 "data": {"id_1": "4", "id_2": "7"}, 

5066 "constraint_type": "MUST_LINK", 

5067 "constraint_type_previous": [None, "MUST_LINK", "CANNOT_LINK"], 

5068 "is_hidden": False, 

5069 "to_annotate": False, 

5070 "to_review": True, 

5071 "to_fix_conflict": False, 

5072 "comment": "Même intention (gestion carte virtuelle).", 

5073 "date_of_update": 1657546214.538204, 

5074 "iteration_of_sampling": 1, 

5075 }, 

5076 "(4,6)": { 

5077 "data": {"id_1": "4", "id_2": "6"}, 

5078 "constraint_type": "MUST_LINK", 

5079 "constraint_type_previous": [None], 

5080 "is_hidden": False, 

5081 "to_annotate": False, 

5082 "to_review": True, 

5083 "to_fix_conflict": False, 

5084 "comment": "", 

5085 "date_of_update": 1657545344.703469, 

5086 "iteration_of_sampling": 1, 

5087 }, 

5088 "(22,8)": { 

5089 "data": {"id_1": "22", "id_2": "8"}, 

5090 "constraint_type": "CANNOT_LINK", 

5091 "constraint_type_previous": [None], 

5092 "is_hidden": False, 

5093 "to_annotate": False, 

5094 "to_review": False, 

5095 "to_fix_conflict": False, 

5096 "comment": "", 

5097 "date_of_update": 1657543535.036781, 

5098 "iteration_of_sampling": 1, 

5099 }, 

5100 "(22,6)": { 

5101 "data": {"id_1": "22", "id_2": "6"}, 

5102 "constraint_type": "CANNOT_LINK", 

5103 "constraint_type_previous": [None], 

5104 "is_hidden": False, 

5105 "to_annotate": False, 

5106 "to_review": False, 

5107 "to_fix_conflict": False, 

5108 "comment": "", 

5109 "date_of_update": 1657543454.547808, 

5110 "iteration_of_sampling": 1, 

5111 }, 

5112 "(21,22)": { 

5113 "data": {"id_1": "21", "id_2": "22"}, 

5114 "constraint_type": "MUST_LINK", 

5115 "constraint_type_previous": [None], 

5116 "is_hidden": False, 

5117 "to_annotate": False, 

5118 "to_review": False, 

5119 "to_fix_conflict": False, 

5120 "comment": "", 

5121 "date_of_update": 1657543471.789491, 

5122 "iteration_of_sampling": 1, 

5123 }, 

5124 "(20,22)": { 

5125 "data": {"id_1": "20", "id_2": "22"}, 

5126 "constraint_type": "MUST_LINK", 

5127 "constraint_type_previous": [None], 

5128 "is_hidden": False, 

5129 "to_annotate": False, 

5130 "to_review": False, 

5131 "to_fix_conflict": False, 

5132 "comment": "", 

5133 "date_of_update": 1657543457.282708, 

5134 "iteration_of_sampling": 1, 

5135 }, 

5136 "(2,4)": { 

5137 "data": {"id_1": "2", "id_2": "4"}, 

5138 "constraint_type": "MUST_LINK", 

5139 "constraint_type_previous": [None], 

5140 "is_hidden": False, 

5141 "to_annotate": False, 

5142 "to_review": False, 

5143 "to_fix_conflict": False, 

5144 "comment": "", 

5145 "date_of_update": 1657543493.240642, 

5146 "iteration_of_sampling": 1, 

5147 }, 

5148 "(19,22)": { 

5149 "data": {"id_1": "19", "id_2": "22"}, 

5150 "constraint_type": "MUST_LINK", 

5151 "constraint_type_previous": [None], 

5152 "is_hidden": False, 

5153 "to_annotate": False, 

5154 "to_review": False, 

5155 "to_fix_conflict": False, 

5156 "comment": "", 

5157 "date_of_update": 1657543503.891212, 

5158 "iteration_of_sampling": 1, 

5159 }, 

5160 "(18,8)": { 

5161 "data": {"id_1": "18", "id_2": "8"}, 

5162 "constraint_type": "CANNOT_LINK", 

5163 "constraint_type_previous": [None], 

5164 "is_hidden": False, 

5165 "to_annotate": False, 

5166 "to_review": False, 

5167 "to_fix_conflict": False, 

5168 "comment": "", 

5169 "date_of_update": 1657545348.247546, 

5170 "iteration_of_sampling": 1, 

5171 }, 

5172 "(18,22)": { 

5173 "data": {"id_1": "18", "id_2": "22"}, 

5174 "constraint_type": "MUST_LINK", 

5175 "constraint_type_previous": [None], 

5176 "is_hidden": False, 

5177 "to_annotate": False, 

5178 "to_review": False, 

5179 "to_fix_conflict": False, 

5180 "comment": "", 

5181 "date_of_update": 1657543537.76648, 

5182 "iteration_of_sampling": 1, 

5183 }, 

5184 "(17,22)": { 

5185 "data": {"id_1": "17", "id_2": "22"}, 

5186 "constraint_type": "MUST_LINK", 

5187 "constraint_type_previous": [None], 

5188 "is_hidden": False, 

5189 "to_annotate": False, 

5190 "to_review": False, 

5191 "to_fix_conflict": False, 

5192 "comment": "", 

5193 "date_of_update": 1657543500.755786, 

5194 "iteration_of_sampling": 1, 

5195 }, 

5196 "(15,16)": { 

5197 "data": {"id_1": "15", "id_2": "16"}, 

5198 "constraint_type": "CANNOT_LINK", 

5199 "constraint_type_previous": [None], 

5200 "is_hidden": False, 

5201 "to_annotate": False, 

5202 "to_review": False, 

5203 "to_fix_conflict": False, 

5204 "comment": "", 

5205 "date_of_update": 1657545325.795985, 

5206 "iteration_of_sampling": 1, 

5207 }, 

5208 "(13,16)": { 

5209 "data": {"id_1": "13", "id_2": "16"}, 

5210 "constraint_type": "CANNOT_LINK", 

5211 "constraint_type_previous": [None], 

5212 "is_hidden": False, 

5213 "to_annotate": False, 

5214 "to_review": False, 

5215 "to_fix_conflict": False, 

5216 "comment": "", 

5217 "date_of_update": 1657545332.124029, 

5218 "iteration_of_sampling": 1, 

5219 }, 

5220 "(12,9)": { 

5221 "data": {"id_1": "12", "id_2": "9"}, 

5222 "constraint_type": "MUST_LINK", 

5223 "constraint_type_previous": [None, "CANNOT_LINK"], 

5224 "is_hidden": False, 

5225 "to_annotate": False, 

5226 "to_review": False, 

5227 "to_fix_conflict": False, 

5228 "comment": "", 

5229 "date_of_update": 1657543315.242459, 

5230 "iteration_of_sampling": 1, 

5231 }, 

5232 "(11,12)": { 

5233 "data": {"id_1": "11", "id_2": "12"}, 

5234 "constraint_type": "MUST_LINK", 

5235 "constraint_type_previous": [None], 

5236 "is_hidden": False, 

5237 "to_annotate": False, 

5238 "to_review": False, 

5239 "to_fix_conflict": False, 

5240 "comment": "", 

5241 "date_of_update": 1657543475.46025, 

5242 "iteration_of_sampling": 1, 

5243 }, 

5244 "(10,9)": { 

5245 "data": {"id_1": "10", "id_2": "9"}, 

5246 "constraint_type": "MUST_LINK", 

5247 "constraint_type_previous": [None], 

5248 "is_hidden": False, 

5249 "to_annotate": False, 

5250 "to_review": False, 

5251 "to_fix_conflict": False, 

5252 "comment": "", 

5253 "date_of_update": 1657543432.412055, 

5254 "iteration_of_sampling": 1, 

5255 }, 

5256 "(10,11)": { 

5257 "data": {"id_1": "10", "id_2": "11"}, 

5258 "constraint_type": "MUST_LINK", 

5259 "constraint_type_previous": [None], 

5260 "is_hidden": False, 

5261 "to_annotate": False, 

5262 "to_review": False, 

5263 "to_fix_conflict": False, 

5264 "comment": "", 

5265 "date_of_update": 1657543487.605554, 

5266 "iteration_of_sampling": 1, 

5267 }, 

5268 "(1,7)": { 

5269 "data": {"id_1": "1", "id_2": "7"}, 

5270 "constraint_type": "MUST_LINK", 

5271 "constraint_type_previous": [None], 

5272 "is_hidden": False, 

5273 "to_annotate": False, 

5274 "to_review": True, 

5275 "to_fix_conflict": False, 

5276 "comment": "", 

5277 "date_of_update": 1657543507.347849, 

5278 "iteration_of_sampling": 1, 

5279 }, 

5280 "(1,6)": { 

5281 "data": {"id_1": "1", "id_2": "6"}, 

5282 "constraint_type": "MUST_LINK", 

5283 "constraint_type_previous": [None], 

5284 "is_hidden": False, 

5285 "to_annotate": False, 

5286 "to_review": True, 

5287 "to_fix_conflict": False, 

5288 "comment": "", 

5289 "date_of_update": 1657543490.330898, 

5290 "iteration_of_sampling": 1, 

5291 }, 

5292 "(1,3)": { 

5293 "data": {"id_1": "1", "id_2": "3"}, 

5294 "constraint_type": "MUST_LINK", 

5295 "constraint_type_previous": [None], 

5296 "is_hidden": False, 

5297 "to_annotate": False, 

5298 "to_review": False, 

5299 "to_fix_conflict": False, 

5300 "comment": "", 

5301 "date_of_update": 1657543464.28536, 

5302 "iteration_of_sampling": 1, 

5303 }, 

5304 "(1,2)": { 

5305 "data": {"id_1": "1", "id_2": "2"}, 

5306 "constraint_type": "MUST_LINK", 

5307 "constraint_type_previous": [None], 

5308 "is_hidden": False, 

5309 "to_annotate": False, 

5310 "to_review": False, 

5311 "to_fix_conflict": False, 

5312 "comment": "", 

5313 "date_of_update": 1657543438.389156, 

5314 "iteration_of_sampling": 1, 

5315 }, 

5316 "(0,4)": { 

5317 "data": {"id_1": "0", "id_2": "4"}, 

5318 "constraint_type": "MUST_LINK", 

5319 "constraint_type_previous": [ 

5320 None, 

5321 "MUST_LINK", 

5322 None, 

5323 "MUST_LINK", 

5324 None, 

5325 None, 

5326 None, 

5327 "MUST_LINK", 

5328 "MUST_LINK", 

5329 "CANNOT_LINK", 

5330 ], 

5331 "is_hidden": False, 

5332 "to_annotate": False, 

5333 "to_review": False, 

5334 "to_fix_conflict": False, 

5335 "comment": "", 

5336 "date_of_update": 1657545443.884245, 

5337 "iteration_of_sampling": 1, 

5338 }, 

5339 }, 

5340 "parameters": { 

5341 "without_hidden_constraints": True, 

5342 "sorted_by": "id", 

5343 "sorted_reverse": True, 

5344 }, 

5345 }