edu-rdm-integration 3.10.3__py3-none-any.whl → 3.11.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of edu-rdm-integration might be problematic. Click here for more details.

Files changed (73) hide show
  1. edu_rdm_integration/adapters/apps.py +3 -3
  2. edu_rdm_integration/adapters/caches.py +4 -4
  3. edu_rdm_integration/adapters/errors.py +2 -2
  4. edu_rdm_integration/adapters/functions.py +9 -9
  5. edu_rdm_integration/adapters/helpers.py +7 -7
  6. edu_rdm_integration/adapters/receivers.py +3 -3
  7. edu_rdm_integration/adapters/runners.py +13 -13
  8. edu_rdm_integration/adapters/strategies.py +7 -7
  9. edu_rdm_integration/adapters/validators.py +6 -6
  10. edu_rdm_integration/collect_and_export_data/migrations/0003_auto_20250704_0725.py +37 -0
  11. edu_rdm_integration/collect_and_export_data/models.py +1 -1
  12. edu_rdm_integration/core/helpers.py +6 -4
  13. edu_rdm_integration/core/registry/apps.py +1 -1
  14. edu_rdm_integration/core/utils.py +3 -3
  15. edu_rdm_integration/migrations/0018_auto_20250704_0725.py +154 -0
  16. edu_rdm_integration/pipelines/transfer/actions.py +2 -2
  17. edu_rdm_integration/pipelines/transfer/mixins.py +2 -2
  18. edu_rdm_integration/pipelines/transfer/models.py +2 -2
  19. edu_rdm_integration/pipelines/transfer/tasks.py +8 -8
  20. edu_rdm_integration/rdm_entities/entities.py +6 -6
  21. edu_rdm_integration/rdm_entities/migrations/0001_initial.py +1 -1
  22. edu_rdm_integration/rdm_entities/migrations/0002_rename_regionaldatamartentityenum_rdmentityenum.py +20 -0
  23. edu_rdm_integration/rdm_entities/mixins.py +2 -2
  24. edu_rdm_integration/rdm_entities/models.py +1 -1
  25. edu_rdm_integration/rdm_models/migrations/0001_initial.py +1 -1
  26. edu_rdm_integration/rdm_models/migrations/0002_rename_regionaldatamartmodelenum_rdmmodelenum.py +19 -0
  27. edu_rdm_integration/rdm_models/mixins.py +2 -2
  28. edu_rdm_integration/rdm_models/models.py +7 -7
  29. edu_rdm_integration/stages/collect_data/function_templates/function_collect_data_template/functions.py-tpl +2 -2
  30. edu_rdm_integration/stages/collect_data/functions/base/functions.py +9 -9
  31. edu_rdm_integration/stages/collect_data/functions/base/managers.py +6 -6
  32. edu_rdm_integration/stages/collect_data/functions/base/mixins.py +14 -16
  33. edu_rdm_integration/stages/collect_data/generators.py +3 -3
  34. edu_rdm_integration/stages/collect_data/helpers.py +18 -18
  35. edu_rdm_integration/stages/collect_data/management/base.py +2 -4
  36. edu_rdm_integration/stages/collect_data/migrations/0001_initial.py +1 -1
  37. edu_rdm_integration/stages/collect_data/migrations/0002_edurdmcollectdatacommandprogress.py +1 -0
  38. edu_rdm_integration/stages/collect_data/migrations/0003_auto_20250704_0810.py +35 -0
  39. edu_rdm_integration/stages/collect_data/migrations/0004_auto_20250704_0825.py +40 -0
  40. edu_rdm_integration/stages/collect_data/mixins.py +4 -4
  41. edu_rdm_integration/stages/collect_data/models.py +35 -64
  42. edu_rdm_integration/stages/collect_data/operations.py +7 -7
  43. edu_rdm_integration/stages/collect_data/registry/actions.py +10 -10
  44. edu_rdm_integration/stages/collect_data/registry/apps.py +1 -1
  45. edu_rdm_integration/stages/collect_data/registry/ui.py +2 -4
  46. edu_rdm_integration/stages/collect_data/tests.py +5 -5
  47. edu_rdm_integration/stages/export_data/function_templates/function_export_data_template/functions.py-tpl +2 -2
  48. edu_rdm_integration/stages/export_data/functions/base/functions.py +13 -13
  49. edu_rdm_integration/stages/export_data/functions/base/managers.py +10 -10
  50. edu_rdm_integration/stages/export_data/generators.py +3 -5
  51. edu_rdm_integration/stages/export_data/helpers.py +19 -19
  52. edu_rdm_integration/stages/export_data/management/base.py +2 -4
  53. edu_rdm_integration/stages/export_data/migrations/0001_initial.py +1 -0
  54. edu_rdm_integration/stages/export_data/migrations/0002_auto_20250704_0810.py +47 -0
  55. edu_rdm_integration/stages/export_data/mixins.py +5 -5
  56. edu_rdm_integration/stages/export_data/models.py +39 -52
  57. edu_rdm_integration/stages/export_data/operations.py +8 -10
  58. edu_rdm_integration/stages/export_data/registry/actions.py +18 -18
  59. edu_rdm_integration/stages/export_data/registry/apps.py +1 -1
  60. edu_rdm_integration/stages/export_data/registry/ui.py +2 -4
  61. edu_rdm_integration/stages/upload_data/consts.py +4 -4
  62. edu_rdm_integration/stages/upload_data/export_managers.py +23 -23
  63. edu_rdm_integration/stages/upload_data/helpers.py +10 -10
  64. edu_rdm_integration/stages/upload_data/management/commands/async_fix_attachment_size.py +2 -2
  65. edu_rdm_integration/stages/upload_data/management/commands/check_upload_status.py +2 -2
  66. edu_rdm_integration/stages/upload_data/migrations/0002_auto_20250704_0810.py +28 -0
  67. edu_rdm_integration/stages/upload_data/models.py +9 -9
  68. edu_rdm_integration/stages/upload_data/tasks.py +2 -2
  69. {edu_rdm_integration-3.10.3.dist-info → edu_rdm_integration-3.11.0.dist-info}/METADATA +6 -5
  70. {edu_rdm_integration-3.10.3.dist-info → edu_rdm_integration-3.11.0.dist-info}/RECORD +73 -65
  71. {edu_rdm_integration-3.10.3.dist-info → edu_rdm_integration-3.11.0.dist-info}/WHEEL +0 -0
  72. {edu_rdm_integration-3.10.3.dist-info → edu_rdm_integration-3.11.0.dist-info}/licenses/LICENSE +0 -0
  73. {edu_rdm_integration-3.10.3.dist-info → edu_rdm_integration-3.11.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,154 @@
1
+ # Generated by Django 3.2.24 on 2025-07-04 07:25
2
+
3
+ from django.db import (
4
+ migrations,
5
+ )
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ('rdm_collect_and_export_data', '0003_auto_20250704_0725'),
11
+ ('edu_rdm_integration', '0017_delete_uploaddatacommand'),
12
+ ]
13
+
14
+ operations = [
15
+ migrations.SeparateDatabaseAndState(
16
+ state_operations=[
17
+ migrations.RemoveField(
18
+ model_name='collectingexporteddatastage',
19
+ name='manager',
20
+ ),
21
+ migrations.RemoveField(
22
+ model_name='collectingexporteddatastage',
23
+ name='status',
24
+ ),
25
+ migrations.RemoveField(
26
+ model_name='collectingexporteddatasubstage',
27
+ name='function',
28
+ ),
29
+ migrations.RemoveField(
30
+ model_name='collectingexporteddatasubstage',
31
+ name='previous',
32
+ ),
33
+ migrations.RemoveField(
34
+ model_name='collectingexporteddatasubstage',
35
+ name='stage',
36
+ ),
37
+ migrations.RemoveField(
38
+ model_name='collectingexporteddatasubstage',
39
+ name='status',
40
+ ),
41
+ migrations.RemoveField(
42
+ model_name='exportingdatastage',
43
+ name='manager',
44
+ ),
45
+ migrations.RemoveField(
46
+ model_name='exportingdatastage',
47
+ name='status',
48
+ ),
49
+ migrations.RemoveField(
50
+ model_name='exportingdatasubstage',
51
+ name='function',
52
+ ),
53
+ migrations.RemoveField(
54
+ model_name='exportingdatasubstage',
55
+ name='stage',
56
+ ),
57
+ migrations.RemoveField(
58
+ model_name='exportingdatasubstage',
59
+ name='status',
60
+ ),
61
+ migrations.RemoveField(
62
+ model_name='exportingdatasubstageattachment',
63
+ name='exporting_data_sub_stage',
64
+ ),
65
+ migrations.RemoveField(
66
+ model_name='exportingdatasubstageentity',
67
+ name='entity',
68
+ ),
69
+ migrations.RemoveField(
70
+ model_name='exportingdatasubstageentity',
71
+ name='exporting_data_sub_stage',
72
+ ),
73
+ migrations.RemoveField(
74
+ model_name='exportingdatasubstageuploaderclientlog',
75
+ name='attachment',
76
+ ),
77
+ migrations.RemoveField(
78
+ model_name='exportingdatasubstageuploaderclientlog',
79
+ name='entry',
80
+ ),
81
+ migrations.RemoveField(
82
+ model_name='exportingdatasubstageuploaderclientlog',
83
+ name='sub_stage',
84
+ ),
85
+ migrations.DeleteModel(
86
+ name='RegionalDataMartModelEnum',
87
+ ),
88
+ migrations.RemoveField(
89
+ model_name='transferredentity',
90
+ name='entity',
91
+ ),
92
+ migrations.RemoveField(
93
+ model_name='uploadstatusrequestlog',
94
+ name='entry',
95
+ ),
96
+ migrations.RemoveField(
97
+ model_name='uploadstatusrequestlog',
98
+ name='request_status',
99
+ ),
100
+ migrations.RemoveField(
101
+ model_name='uploadstatusrequestlog',
102
+ name='upload',
103
+ ),
104
+ migrations.DeleteModel(
105
+ name='UploaderClientLog',
106
+ ),
107
+ migrations.DeleteModel(
108
+ name='CollectingDataStageStatus',
109
+ ),
110
+ migrations.DeleteModel(
111
+ name='CollectingDataSubStageStatus',
112
+ ),
113
+ migrations.DeleteModel(
114
+ name='CollectingExportedDataStage',
115
+ ),
116
+ migrations.DeleteModel(
117
+ name='CollectingExportedDataSubStage',
118
+ ),
119
+ migrations.DeleteModel(
120
+ name='DataMartRequestStatus',
121
+ ),
122
+ migrations.DeleteModel(
123
+ name='ExportingDataStage',
124
+ ),
125
+ migrations.DeleteModel(
126
+ name='ExportingDataStageStatus',
127
+ ),
128
+ migrations.DeleteModel(
129
+ name='ExportingDataSubStage',
130
+ ),
131
+ migrations.DeleteModel(
132
+ name='ExportingDataSubStageAttachment',
133
+ ),
134
+ migrations.DeleteModel(
135
+ name='ExportingDataSubStageEntity',
136
+ ),
137
+ migrations.DeleteModel(
138
+ name='ExportingDataSubStageStatus',
139
+ ),
140
+ migrations.DeleteModel(
141
+ name='ExportingDataSubStageUploaderClientLog',
142
+ ),
143
+ migrations.DeleteModel(
144
+ name='RegionalDataMartEntityEnum',
145
+ ),
146
+ migrations.DeleteModel(
147
+ name='TransferredEntity',
148
+ ),
149
+ migrations.DeleteModel(
150
+ name='UploadStatusRequestLog',
151
+ ),
152
+ ],
153
+ ),
154
+ ]
@@ -24,7 +24,7 @@ from edu_rdm_integration.pipelines.transfer.ui import (
24
24
  TransferredEntityListWindow,
25
25
  )
26
26
  from edu_rdm_integration.rdm_entities.models import (
27
- RegionalDataMartEntityEnum,
27
+ RDMEntityEnum,
28
28
  )
29
29
 
30
30
 
@@ -32,7 +32,7 @@ class EntitySelectPack(ObjectPack):
32
32
  """Пак выбора сущностей для сбора и экспорта данных."""
33
33
 
34
34
  title = 'Сущность РВД'
35
- model = RegionalDataMartEntityEnum
35
+ model = RDMEntityEnum
36
36
  _is_primary_for_model = False
37
37
 
38
38
  list_sort_order = ('order_number',)
@@ -17,7 +17,7 @@ from edu_rdm_integration.core.storages import (
17
17
  RegionalDataMartEntityStorage,
18
18
  )
19
19
  from edu_rdm_integration.rdm_entities.models import (
20
- RegionalDataMartEntityEnum,
20
+ RDMEntityEnum,
21
21
  )
22
22
  from edu_rdm_integration.stages.collect_data.helpers import (
23
23
  get_collecting_managers_max_period_ended_dates,
@@ -67,7 +67,7 @@ class BaseTransferLatestEntitiesDataMixin:
67
67
  def _collect_transferred_entities(self) -> None:
68
68
  """Собирает сущности РВД, по которым будет произведен сбор и экспорт данных."""
69
69
  self._transferred_entities = [
70
- (RegionalDataMartEntityEnum.get_model_enum_value(key=entity), export_enabled)
70
+ (RDMEntityEnum.get_model_enum_value(key=entity), export_enabled)
71
71
  for entity, export_enabled in self.get_entity_qs().values_list('entity', 'export_enabled')
72
72
  ]
73
73
 
@@ -15,7 +15,7 @@ from edu_rdm_integration.pipelines.transfer.enums import (
15
15
  EntityLevelQueueTypeEnum,
16
16
  )
17
17
  from edu_rdm_integration.rdm_entities.models import (
18
- RegionalDataMartEntityEnum,
18
+ RDMEntityEnum,
19
19
  )
20
20
 
21
21
 
@@ -23,7 +23,7 @@ class TransferredEntity(BaseObjectModel):
23
23
  """Сущность, по которой должен быть произведен сбор и экспорт данных."""
24
24
 
25
25
  entity = OneToOneField(
26
- to=RegionalDataMartEntityEnum,
26
+ to=RDMEntityEnum,
27
27
  verbose_name='Сущность',
28
28
  on_delete=CASCADE,
29
29
  )
@@ -55,13 +55,13 @@ from edu_rdm_integration.pipelines.transfer.models import (
55
55
  TransferredEntity,
56
56
  )
57
57
  from edu_rdm_integration.stages.collect_data.models import (
58
- EduRdmCollectDataCommandProgress,
58
+ RDMCollectingDataCommandProgress,
59
59
  )
60
60
  from edu_rdm_integration.stages.collect_data.operations import (
61
61
  BaseCollectLatestModelsData,
62
62
  )
63
63
  from edu_rdm_integration.stages.export_data.models import (
64
- EduRdmExportDataCommandProgress,
64
+ RDMExportingDataCommandProgress,
65
65
  )
66
66
  from edu_rdm_integration.stages.export_data.operations import (
67
67
  ExportLatestEntitiesData,
@@ -112,7 +112,7 @@ class BaseTransferLatestEntitiesDataPeriodicTask(BaseTransferLatestEntitiesDataM
112
112
  command.refresh_from_db(fields=['stage_id'])
113
113
  save_command_log_link(command, settings.RDM_EXPORT_LOG_DIR)
114
114
 
115
- def _create_collect_command(self, model: str, task_id: str) -> EduRdmCollectDataCommandProgress:
115
+ def _create_collect_command(self, model: str, task_id: str) -> RDMCollectingDataCommandProgress:
116
116
  """Создает команду сбора данных моделей РВД."""
117
117
  manager = self._collecting_data_managers[model]
118
118
  manager_last_collected = (
@@ -122,7 +122,7 @@ class BaseTransferLatestEntitiesDataPeriodicTask(BaseTransferLatestEntitiesDataM
122
122
  period_started_at = manager_last_collected
123
123
  period_ended_at = self._get_period_ended_at()
124
124
 
125
- return EduRdmCollectDataCommandProgress.objects.create(
125
+ return RDMCollectingDataCommandProgress.objects.create(
126
126
  model_id=model,
127
127
  logs_period_started_at=period_started_at,
128
128
  logs_period_ended_at=period_ended_at,
@@ -130,7 +130,7 @@ class BaseTransferLatestEntitiesDataPeriodicTask(BaseTransferLatestEntitiesDataM
130
130
  type=CommandType.AUTO,
131
131
  )
132
132
 
133
- def _create_export_command(self, entity: str, task_id: str) -> Optional[EduRdmExportDataCommandProgress]:
133
+ def _create_export_command(self, entity: str, task_id: str) -> Optional[RDMExportingDataCommandProgress]:
134
134
  """Создает команду экспорта данных сущностей РВД."""
135
135
  manager = self._exporting_data_managers[entity]
136
136
  manager_last_exported = self._exporting_data_manager_to_period_end.get(manager.uuid)
@@ -139,7 +139,7 @@ class BaseTransferLatestEntitiesDataPeriodicTask(BaseTransferLatestEntitiesDataM
139
139
  period_started_at = manager_last_exported
140
140
  period_ended_at = timezone.now()
141
141
 
142
- return EduRdmExportDataCommandProgress.objects.create(
142
+ return RDMExportingDataCommandProgress.objects.create(
143
143
  entity_id=entity,
144
144
  period_started_at=period_started_at,
145
145
  period_ended_at=period_ended_at,
@@ -150,7 +150,7 @@ class BaseTransferLatestEntitiesDataPeriodicTask(BaseTransferLatestEntitiesDataM
150
150
  return None
151
151
 
152
152
  def _prepare_collect_model_data_class(
153
- self, command: EduRdmCollectDataCommandProgress
153
+ self, command: RDMCollectingDataCommandProgress
154
154
  ) -> BaseCollectLatestModelsData:
155
155
  """Подготавливает объект класса сбора данных моделей РВД."""
156
156
  return BaseCollectLatestModelsData(
@@ -161,7 +161,7 @@ class BaseTransferLatestEntitiesDataPeriodicTask(BaseTransferLatestEntitiesDataM
161
161
  use_times_limit=True,
162
162
  )
163
163
 
164
- def _prepare_export_entity_data_class(self, command: EduRdmExportDataCommandProgress) -> ExportLatestEntitiesData:
164
+ def _prepare_export_entity_data_class(self, command: RDMExportingDataCommandProgress) -> ExportLatestEntitiesData:
165
165
  """Подготавливает объект класса экспорта данных сущностей РВД.
166
166
 
167
167
  При экспорте данных передаем параметр task_id для обновления поля "Описание"
@@ -19,7 +19,7 @@ from edu_rdm_integration.rdm_entities.mixins import (
19
19
  EntityEnumRegisterMixin,
20
20
  )
21
21
  from edu_rdm_integration.rdm_models.models import (
22
- RegionalDataMartModelEnum,
22
+ RDMModelEnum,
23
23
  )
24
24
 
25
25
 
@@ -123,7 +123,7 @@ class AddressEntity(EntityEnumRegisterMixin, BaseEntity):
123
123
 
124
124
  !!! Временное решение. Будет удалено в рамках EDUSCHL-20938.
125
125
  """
126
- return RegionalDataMartModelEnum.ADDRESS
126
+ return RDMModelEnum.ADDRESS
127
127
 
128
128
 
129
129
  @dataclass
@@ -192,7 +192,7 @@ class AddressOrganisationEntity(EntityEnumRegisterMixin, BaseEntity):
192
192
 
193
193
  !!! Временное решение. Будет удалено в рамках EDUSCHL-20938.
194
194
  """
195
- return RegionalDataMartModelEnum.ADDRESS_ORGANISATION
195
+ return RDMModelEnum.ADDRESS_ORGANISATION
196
196
 
197
197
  # TODO EDUSCHL-20938 Удалить в рамках задачи
198
198
  @classmethod
@@ -203,7 +203,7 @@ class AddressOrganisationEntity(EntityEnumRegisterMixin, BaseEntity):
203
203
 
204
204
  !!! Временное решение. Будет удалено в рамках EDUSCHL-20938.
205
205
  """
206
- return (RegionalDataMartModelEnum.ORGANISATION,)
206
+ return (RDMModelEnum.ORGANISATION,)
207
207
 
208
208
 
209
209
  @dataclass
@@ -288,7 +288,7 @@ class TelecomEntity(EntityEnumRegisterMixin, BaseEntity):
288
288
 
289
289
  !!! Временное решение. Будет удалено в рамках EDUSCHL-20938.
290
290
  """
291
- return RegionalDataMartModelEnum.TELECOM
291
+ return RDMModelEnum.TELECOM
292
292
 
293
293
 
294
294
  @dataclass
@@ -415,4 +415,4 @@ class OrganisationsEntity(EntityEnumRegisterMixin, BaseEntity):
415
415
 
416
416
  !!! Временное решение. Будет удалено в рамках EDUSCHL-20938.
417
417
  """
418
- return RegionalDataMartModelEnum.ORGANISATION
418
+ return RDMModelEnum.ORGANISATION
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
10
10
  initial = True
11
11
 
12
12
  dependencies = [
13
- ('edu_rdm_integration', '0017_delete_uploaddatacommand'),
13
+ ('edu_rdm_integration', '0018_auto_20250704_0725'),
14
14
  ]
15
15
 
16
16
  operations = [
@@ -0,0 +1,20 @@
1
+ # Generated by Django 3.2.24 on 2025-07-04 08:10
2
+
3
+ from django.db import (
4
+ migrations,
5
+ )
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ('edu_rdm_integration_export_data_stage', '0001_initial'),
11
+ ('edu_rdm_integration_transfer_pipeline', '0001_initial'),
12
+ ('edu_rdm_integration_entities', '0001_initial'),
13
+ ]
14
+
15
+ operations = [
16
+ migrations.RenameModel(
17
+ old_name='RegionalDataMartEntityEnum',
18
+ new_name='RDMEntityEnum',
19
+ ),
20
+ ]
@@ -17,14 +17,14 @@ from edu_rdm_integration.core.utils import (
17
17
  camel_to_underscore,
18
18
  )
19
19
  from edu_rdm_integration.rdm_entities.models import (
20
- RegionalDataMartEntityEnum,
20
+ RDMEntityEnum,
21
21
  )
22
22
 
23
23
 
24
24
  class EntityEnumRegisterMixin(BaseEnumRegisterMixin):
25
25
  """Миксин, для регистрации сущности в RegionalDataMartEntityEnum."""
26
26
 
27
- enum = RegionalDataMartEntityEnum
27
+ enum = RDMEntityEnum
28
28
  """Модель-перечисление в которую регистрируется сущность."""
29
29
 
30
30
  main_model_enum: ModelEnumValue
@@ -4,7 +4,7 @@ from m3_db_utils.models import (
4
4
  )
5
5
 
6
6
 
7
- class RegionalDataMartEntityEnum(TitledModelEnum):
7
+ class RDMEntityEnum(TitledModelEnum):
8
8
  """Модель-перечисление сущностей выгрузки в Региональная витрина данных.
9
9
 
10
10
  Поля:
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
10
10
  initial = True
11
11
 
12
12
  dependencies = [
13
- ('edu_rdm_integration', '0017_delete_uploaddatacommand'),
13
+ ('edu_rdm_integration', '0018_auto_20250704_0725'),
14
14
  ]
15
15
 
16
16
  operations = [
@@ -0,0 +1,19 @@
1
+ # Generated by Django 3.2.24 on 2025-07-04 08:10
2
+
3
+ from django.db import (
4
+ migrations,
5
+ )
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ('edu_rdm_integration_collect_data_stage', '0003_auto_20250704_0810'),
11
+ ('edu_rdm_integration_models', '0001_initial'),
12
+ ]
13
+
14
+ operations = [
15
+ migrations.RenameModel(
16
+ old_name='RegionalDataMartModelEnum',
17
+ new_name='RDMModelEnum',
18
+ ),
19
+ ]
@@ -21,14 +21,14 @@ from edu_rdm_integration.core.utils import (
21
21
  camel_to_underscore,
22
22
  )
23
23
  from edu_rdm_integration.rdm_models.models import (
24
- RegionalDataMartModelEnum,
24
+ RDMModelEnum,
25
25
  )
26
26
 
27
27
 
28
28
  class ModelEnumRegisterMixin(BaseEnumRegisterMixin):
29
29
  """Миксин, для регистрации модели в RegionalDataMartModelEnum."""
30
30
 
31
- enum = RegionalDataMartModelEnum
31
+ enum = RDMModelEnum
32
32
  """Модель-перечисление в которую регистрируется модель."""
33
33
 
34
34
  creating_trigger_models: tuple[models.Model, ...] = ()
@@ -19,17 +19,17 @@ from m3_db_utils.models import (
19
19
  )
20
20
 
21
21
 
22
- class BaseEntityModel(ReprStrPreModelMixin, BaseObjectModel):
23
- """Базовая модель сущности."""
22
+ class BaseRDMModel(ReprStrPreModelMixin, BaseObjectModel):
23
+ """Базовая модель РВД."""
24
24
 
25
25
  collecting_sub_stage = ForeignKey(
26
- verbose_name='Подэтап сбора данных сущности',
27
- to='edu_rdm_integration_collect_data_stage.CollectingExportedDataSubStage',
26
+ verbose_name='Подэтап сбора данных',
27
+ to='edu_rdm_integration_collect_data_stage.RDMCollectingDataSubStage',
28
28
  on_delete=CASCADE,
29
29
  )
30
30
  exporting_sub_stage = ForeignKey(
31
- verbose_name='Подэтап выгрузки',
32
- to='edu_rdm_integration_export_data_stage.ExportingDataSubStage',
31
+ verbose_name='Подэтап выгрузки данных',
32
+ to='edu_rdm_integration_export_data_stage.RDMExportingDataSubStage',
33
33
  blank=True,
34
34
  null=True,
35
35
  on_delete=CASCADE,
@@ -63,7 +63,7 @@ class BaseEntityModel(ReprStrPreModelMixin, BaseObjectModel):
63
63
  abstract = True
64
64
 
65
65
 
66
- class RegionalDataMartModelEnum(TitledModelEnum):
66
+ class RDMModelEnum(TitledModelEnum):
67
67
  """Модель-перечисление моделей "Региональная витрина данных"."""
68
68
 
69
69
  class Meta:
@@ -15,7 +15,7 @@ from edu_rdm_integration.core.consts import (
15
15
  REGIONAL_DATA_MART_INTEGRATION_COLLECTING_DATA,
16
16
  )
17
17
  from edu_rdm_integration.rdm_models.models import (
18
- RegionalDataMartModelEnum,
18
+ RDMModelEnum,
19
19
  )
20
20
 
21
21
  from {{ strategy.function_class_module }} import (
@@ -88,7 +88,7 @@ class {{ camel_case_function_name }}Function({{ strategy.function_class_name }})
88
88
  def _prepare_entities(cls) -> list['ModelEnumValue']:
89
89
  """Формирование списка ключей модели-перечисления моделей РВД."""
90
90
  rdm_models = [
91
- RegionalDataMartModelEnum.,
91
+ RDMModelEnum.,
92
92
  ]
93
93
 
94
94
  return rdm_models
@@ -16,9 +16,9 @@ from edu_rdm_integration.core.consts import (
16
16
  LOGS_DELIMITER,
17
17
  )
18
18
  from edu_rdm_integration.stages.collect_data.models import (
19
- CollectingDataSubStageStatus,
20
- CollectingExportedDataStage,
21
- CollectingExportedDataSubStage,
19
+ RDMCollectingDataStage,
20
+ RDMCollectingDataSubStage,
21
+ RDMCollectingDataSubStageStatus,
22
22
  )
23
23
 
24
24
 
@@ -29,11 +29,11 @@ class BaseCollectingCalculatedDataFunction(
29
29
  ):
30
30
  """Базовый класс функций сбора данных для интеграции с "Региональная витрина данных"."""
31
31
 
32
- def __init__(self, *args, stage: CollectingExportedDataStage, **kwargs):
32
+ def __init__(self, *args, stage: RDMCollectingDataStage, **kwargs):
33
33
  super().__init__(*args, stage=stage, **kwargs)
34
34
 
35
35
  previous_sub_stage = (
36
- CollectingExportedDataSubStage.objects.filter(
36
+ RDMCollectingDataSubStage.objects.filter(
37
37
  function_id=self.uuid,
38
38
  )
39
39
  .order_by('started_at')
@@ -41,7 +41,7 @@ class BaseCollectingCalculatedDataFunction(
41
41
  .first()
42
42
  )
43
43
 
44
- self._sub_stage = CollectingExportedDataSubStage.objects.create(
44
+ self._sub_stage = RDMCollectingDataSubStage.objects.create(
45
45
  stage=stage,
46
46
  function_id=self.uuid,
47
47
  previous_id=getattr(previous_sub_stage, 'pk', None),
@@ -53,7 +53,7 @@ class BaseCollectingCalculatedDataFunction(
53
53
 
54
54
  def _before_prepare(self, *args, **kwargs):
55
55
  """Выполнение действий функций системы."""
56
- self._sub_stage.status_id = CollectingDataSubStageStatus.IN_PROGRESS.key
56
+ self._sub_stage.status_id = RDMCollectingDataSubStageStatus.IN_PROGRESS.key
57
57
  self._sub_stage.save()
58
58
 
59
59
  logger.info(f'{LOGS_DELIMITER * 3}change status {repr(self._sub_stage)}')
@@ -76,9 +76,9 @@ class BaseCollectingCalculatedDataFunction(
76
76
  super().run(*args, **kwargs)
77
77
 
78
78
  if self.result.errors:
79
- self._sub_stage.status_id = CollectingDataSubStageStatus.FAILED.key
79
+ self._sub_stage.status_id = RDMCollectingDataSubStageStatus.FAILED.key
80
80
  else:
81
- self._sub_stage.status_id = CollectingDataSubStageStatus.READY_TO_EXPORT.key
81
+ self._sub_stage.status_id = RDMCollectingDataSubStageStatus.READY_TO_EXPORT.key
82
82
 
83
83
  self._sub_stage.save()
84
84
 
@@ -33,8 +33,8 @@ from edu_rdm_integration.core.consts import (
33
33
  LOGS_DELIMITER,
34
34
  )
35
35
  from edu_rdm_integration.stages.collect_data.models import (
36
- CollectingDataStageStatus,
37
- CollectingExportedDataStage,
36
+ RDMCollectingDataStage,
37
+ RDMCollectingDataStageStatus,
38
38
  )
39
39
 
40
40
 
@@ -64,7 +64,7 @@ class BaseCollectingDataRunnerManager(WebEduRunnerManager, metaclass=ABCMeta):
64
64
 
65
65
  self._logs_period_started_at = logs_period_started_at
66
66
  self._logs_period_ended_at = logs_period_ended_at
67
- self._stage = CollectingExportedDataStage.objects.create(
67
+ self._stage = RDMCollectingDataStage.objects.create(
68
68
  manager_id=self.uuid,
69
69
  logs_period_started_at=logs_period_started_at,
70
70
  logs_period_ended_at=logs_period_ended_at,
@@ -141,7 +141,7 @@ class BaseCollectingDataRunnerManager(WebEduRunnerManager, metaclass=ABCMeta):
141
141
 
142
142
  logger.info(f'{LOGS_DELIMITER}{self.__class__.__name__} start preparing logs records..')
143
143
 
144
- self._stage.status_id = CollectingDataStageStatus.IN_PROGRESS.key
144
+ self._stage.status_id = RDMCollectingDataStageStatus.IN_PROGRESS.key
145
145
  self._stage.save()
146
146
 
147
147
  super()._create_runner(
@@ -164,9 +164,9 @@ class BaseCollectingDataRunnerManager(WebEduRunnerManager, metaclass=ABCMeta):
164
164
  def _after_start_runner(self, *args, **kwargs):
165
165
  """Точка расширения поведения менеджера ранера после запуска ранера."""
166
166
  if self._runner.result.errors:
167
- self._stage.status_id = CollectingDataStageStatus.FAILED.key
167
+ self._stage.status_id = RDMCollectingDataStageStatus.FAILED.key
168
168
  else:
169
- self._stage.status_id = CollectingDataStageStatus.FINISHED.key
169
+ self._stage.status_id = RDMCollectingDataStageStatus.FINISHED.key
170
170
 
171
171
  self._stage.save()
172
172