Coverage for src\cognitivefactory\interactive_clustering_gui\models\queries.py: 100.00%
18 statements
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-22 23:23 +0100
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-22 23:23 +0100
1# -*- coding: utf-8 -*-
3"""
4* Name: cognitivefactory.interactive_clustering_gui.models.queries
5* Description: Definition of query parameters models required for application requests.
6* Author: Erwan Schild
7* Created: 07/02/2022
8* Licence: CeCILL-C License v1.0 (https://cecill.info/licences.fr.html)
9"""
11# ==============================================================================
12# IMPORT PYTHON DEPENDENCIES
13# ==============================================================================
15import enum
17# ==============================================================================
18# BASE MODEL FOR CONSTRAINTS ANNOTATION
19# ==============================================================================
22class ConstraintsValues(str, enum.Enum): # noqa: WPS600 (subclassing str)
23 """The enumeration of available constraints values."""
25 MUST_LINK: str = "MUST_LINK"
26 CANNOT_LINK: str = "CANNOT_LINK"
29# ==============================================================================
30# BASE MODEL FOR CONSTRAINTS
31# ==============================================================================
34class ConstraintsSortOptions(str, enum.Enum): # noqa: WPS600 (subclassing str)
35 """The enumeration of available options for constraints sort."""
37 ID: str = "id"
38 TEXT: str = "text"
39 CONSTRAINT_TYPE: str = "constraint_type"
40 DATE_OF_UPDATE: str = "date_of_update"
41 ITERATION_OF_SAMPLING: str = "iteration_of_sampling"
42 TO_ANNOTATE: str = "to_annotate"
43 TO_REVIEW: str = "to_review"
44 TO_FIX_CONFLICT: str = "to_fix_conflict"
47# ==============================================================================
48# BASE MODEL FOR TEXTS
49# ==============================================================================
52class TextsSortOptions(str, enum.Enum): # noqa: WPS600 (subclassing str)
53 """The enumeration of available options for texts sort."""
55 ID: str = "id"
56 ALPHABETICAL: str = "alphabetical"
57 IS_DELETED: str = "is_deleted"