edu-rdm-integration 0.8.2__py3-none-any.whl → 0.8.4__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.
@@ -0,0 +1,30 @@
1
+ from typing import (
2
+ Tuple,
3
+ )
4
+
5
+ from edu_rdm_integration.adapters.helpers import (
6
+ WebEduFunctionHelper,
7
+ WebEduRunnerHelper,
8
+ )
9
+ from edu_rdm_integration.consts import (
10
+ ALL_OPERATIONS,
11
+ UPDATED_OPERATIONS,
12
+ )
13
+
14
+
15
+ class BaseCollectingDataRunnerHelper(WebEduRunnerHelper):
16
+ """
17
+ Базовый класс помощников ранеров функций сбора данных для интеграции с "Региональная витрина данных".
18
+ """
19
+
20
+
21
+ class BaseCollectingDataFunctionHelper(WebEduFunctionHelper):
22
+ """
23
+ Базовый класс помощников функций сбора данных для интеграции с "Региональная витрина данных".
24
+ """
25
+
26
+ def get_filtered_operations(self, with_deleted: bool = False) -> Tuple[int]:
27
+ """
28
+ Возвращает кортеж отфильтрованных операций.
29
+ """
30
+ return ALL_OPERATIONS if with_deleted else UPDATED_OPERATIONS
@@ -2,9 +2,9 @@ from typing import (
2
2
  Type,
3
3
  )
4
4
 
5
- from edu_rdm_integration.adapters.helpers import (
6
- WebEduFunctionHelper,
7
- WebEduRunnerHelper,
5
+ from edu_rdm_integration.collect_data.base.helpers import (
6
+ BaseCollectingDataFunctionHelper,
7
+ BaseCollectingDataRunnerHelper,
8
8
  )
9
9
  from edu_rdm_integration.collect_data.calculated.base.caches import (
10
10
  BaseCollectingCalculatedExportedDataFunctionCacheStorage,
@@ -12,7 +12,7 @@ from edu_rdm_integration.collect_data.calculated.base.caches import (
12
12
  )
13
13
 
14
14
 
15
- class BaseCollectingCalculatedExportedDataRunnerHelper(WebEduRunnerHelper):
15
+ class BaseCollectingCalculatedExportedDataRunnerHelper(BaseCollectingDataRunnerHelper):
16
16
  """
17
17
  Базовый класс помощников ранеров функций сбора расчетных данных для интеграции с "Региональная витрина данных".
18
18
  """
@@ -24,7 +24,7 @@ class BaseCollectingCalculatedExportedDataRunnerHelper(WebEduRunnerHelper):
24
24
  return BaseCollectingCalculatedExportedDataRunnerCacheStorage
25
25
 
26
26
 
27
- class BaseCollectingCalculatedExportedDataFunctionHelper(WebEduFunctionHelper):
27
+ class BaseCollectingCalculatedExportedDataFunctionHelper(BaseCollectingDataFunctionHelper):
28
28
  """
29
29
  Базовый класс помощников функций сбора расчетных данных для интеграции с "Региональная витрина данных".
30
30
  """
@@ -2,9 +2,9 @@ from typing import (
2
2
  Type,
3
3
  )
4
4
 
5
- from edu_rdm_integration.adapters.helpers import (
6
- WebEduFunctionHelper,
7
- WebEduRunnerHelper,
5
+ from edu_rdm_integration.collect_data.base.helpers import (
6
+ BaseCollectingDataFunctionHelper,
7
+ BaseCollectingDataRunnerHelper,
8
8
  )
9
9
  from edu_rdm_integration.collect_data.non_calculated.base.caches import (
10
10
  BaseCollectingExportedDataFunctionCacheStorage,
@@ -12,7 +12,7 @@ from edu_rdm_integration.collect_data.non_calculated.base.caches import (
12
12
  )
13
13
 
14
14
 
15
- class BaseCollectingExportedDataRunnerHelper(WebEduRunnerHelper):
15
+ class BaseCollectingExportedDataRunnerHelper(BaseCollectingDataRunnerHelper):
16
16
  """
17
17
  Базовый класс помощников ранеров функций сбора данных для интеграции с "Региональная витрина данных".
18
18
  """
@@ -24,7 +24,7 @@ class BaseCollectingExportedDataRunnerHelper(WebEduRunnerHelper):
24
24
  return BaseCollectingExportedDataRunnerCacheStorage
25
25
 
26
26
 
27
- class BaseCollectingExportedDataFunctionHelper(WebEduFunctionHelper):
27
+ class BaseCollectingExportedDataFunctionHelper(BaseCollectingDataFunctionHelper):
28
28
  """
29
29
  Базовый класс помощников функций сбора данных для интеграции с "Региональная витрина данных".
30
30
  """
@@ -1,3 +1,8 @@
1
+ from educommon.integration_entities.enums import (
2
+ EntityLogOperation,
3
+ )
4
+
5
+
1
6
  REGIONAL_DATA_MART_INTEGRATION_COLLECTING_DATA = 'regional_data_mart_integration_collecting_data'
2
7
  REGIONAL_DATA_MART_INTEGRATION_EXPORTING_DATA = 'regional_data_mart_integration_exporting_data'
3
8
 
@@ -25,3 +30,8 @@ ACADEMIC_YEAR = {
25
30
  }
26
31
 
27
32
  TASK_QUEUE_NAME = 'RDM'
33
+
34
+
35
+ # Кортеж операций для обновления данных
36
+ UPDATED_OPERATIONS = (EntityLogOperation.CREATE, EntityLogOperation.UPDATE)
37
+ ALL_OPERATIONS = UPDATED_OPERATIONS + (EntityLogOperation.DELETE, )
@@ -834,8 +834,17 @@ class UploaderClientLog(Entry):
834
834
  """Статус-код запроса к витрине."""
835
835
  try:
836
836
  http_status = self.response.split(' ')[0].strip('[]')
837
- except IndexError:
837
+
838
+ if not http_status:
839
+ return None
840
+
841
+ if 200 <= int(http_status) < 300:
842
+ http_status = "Успех"
843
+ elif int(http_status) >= 400:
844
+ http_status = "Ошибка"
845
+ except (IndexError, AttributeError):
838
846
  http_status = None
847
+
839
848
  return http_status
840
849
 
841
850
  @property
@@ -25,7 +25,6 @@ from educommon.objectpack.actions import (
25
25
  ExtObjectRowsAction,
26
26
  )
27
27
  from educommon.objectpack.filters import (
28
- BoolChoicesFilter,
29
28
  ColumnFilterEngine,
30
29
  DateFilterByAnnotatedField,
31
30
  )
@@ -34,6 +33,7 @@ from educommon.utils.object_grid import (
34
33
  boolean_column_renderer,
35
34
  )
36
35
  from educommon.utils.ui import (
36
+ ChoicesFilter,
37
37
  append_template_globals,
38
38
  )
39
39
 
@@ -41,6 +41,7 @@ from edu_rdm_integration.models import (
41
41
  UploaderClientLog,
42
42
  )
43
43
  from edu_rdm_integration.uploader_log.ui import (
44
+ UploaderLogListWindow,
44
45
  UploaderLogInfoWindow,
45
46
  )
46
47
 
@@ -53,6 +54,7 @@ class UploaderLogPack(ObjectPack):
53
54
  title = 'Журнал логов РВД'
54
55
  model = UploaderClientLog
55
56
 
57
+ list_window = UploaderLogListWindow
56
58
  edit_window = UploaderLogInfoWindow
57
59
 
58
60
  _is_primary_for_model = False
@@ -81,7 +83,7 @@ class UploaderLogPack(ObjectPack):
81
83
  {
82
84
  'header': 'URL',
83
85
  'data_index': 'request_url',
84
- 'searchable': True,
86
+ 'searchable': False,
85
87
  'sortable': False,
86
88
  'width': 21,
87
89
  },
@@ -142,7 +144,11 @@ class UploaderLogPack(ObjectPack):
142
144
  'header': 'Режим эмуляции',
143
145
  'data_index': 'is_emulation',
144
146
  'sortable': False,
145
- 'filter': BoolChoicesFilter('is_emulation'),
147
+ 'filter': ChoicesFilter(
148
+ choices=((True, 'Да'), (False, 'Нет')),
149
+ parser='boolean',
150
+ lookup='is_emulation',
151
+ ),
146
152
  'column_renderer': boolean_column_renderer(),
147
153
  'width': 5,
148
154
  }
@@ -151,7 +157,6 @@ class UploaderLogPack(ObjectPack):
151
157
  def __init__(self):
152
158
  """Инициализация."""
153
159
  super(UploaderLogPack, self).__init__()
154
-
155
160
  self.edit_window_action.perm_code = 'view'
156
161
  self.replace_action('rows_action', ExtObjectRowsAction())
157
162
 
@@ -164,7 +169,7 @@ class UploaderLogPack(ObjectPack):
164
169
  def get_row(self, row_id: Optional[int]) -> 'UploaderClientLog':
165
170
  """Возвращает объект по идентификатору."""
166
171
  if row_id:
167
- record = self.model.base_objects.get(id=row_id)
172
+ record = self.model.objects.get(id=row_id)
168
173
  else:
169
174
  record = super().get_row(row_id)
170
175
 
@@ -3,6 +3,7 @@ from m3_ext.ui.fields import (
3
3
  )
4
4
  from objectpack.ui import (
5
5
  BaseEditWindow,
6
+ BaseListWindow,
6
7
  )
7
8
 
8
9
  from educommon.utils.ui import (
@@ -16,7 +17,6 @@ class UploaderLogInfoWindow(BaseEditWindow):
16
17
  def _init_components(self):
17
18
  """Инициализация компонентов окна."""
18
19
  super(UploaderLogInfoWindow, self)._init_components()
19
-
20
20
  self.field__request = ExtTextArea(
21
21
  label='Запрос',
22
22
  name='request',
@@ -62,3 +62,13 @@ class UploaderLogInfoWindow(BaseEditWindow):
62
62
 
63
63
  switch_window_in_read_only_mode(self)
64
64
  self.make_read_only()
65
+
66
+
67
+ class UploaderLogListWindow(BaseListWindow):
68
+ """Окно для списка логов Загрузчика данных в витрину."""
69
+
70
+ def _init_components(self):
71
+ super()._init_components()
72
+
73
+ self.grid.allow_paging = True
74
+ self.grid.paging_bar.page_size = 35
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: edu-rdm-integration
3
- Version: 0.8.2
3
+ Version: 0.8.4
4
4
  Summary: Интеграция с Региональной витриной данных
5
5
  Home-page:
6
6
  Download-URL:
@@ -289,6 +289,24 @@ Requires-Dist: uploader-client <1,>=0.2.1
289
289
 
290
290
  ### Удалено
291
291
 
292
+ ## [0.8.4] - 2023-12-13
293
+
294
+ Создание базовых хэлперов BaseCollectingDataFunctionHelper, BaseCollectingDataRunnerHelper.
295
+ Создание нового метода get_filtered_operations в BaseCollectingDataFunctionHelper.
296
+
297
+ ### Добавлено
298
+
299
+ - [EDUSCHL-21029](https://jira.bars.group/browse/EDUSCHL-21029)
300
+ MINOR Создание базовых хэлперов.
301
+
302
+ ## [0.8.3] - 2023-12-13
303
+
304
+ Исправление ошибок и несоответствий в журнале логов
305
+ ### Изменено
306
+
307
+ - [EDUCLLG-8103](https://jira.bars.group/browse/EDUCLLG-8103)
308
+ MINOR Исправление ошибок и несоответствий в журнале логов .
309
+
292
310
  ## [0.8.2] - 2023-12-11
293
311
 
294
312
  Поднятие версии m3-db-utils,изменение UploaderClientLogManager
@@ -1,11 +1,11 @@
1
1
  edu_rdm_integration/__init__.py,sha256=fVCvQ7QGI_iCyAeE8dMapyY8gOM617ye5GQqAVGPlZI,72
2
2
  edu_rdm_integration/app_settings.py,sha256=kideEO9SvYU8RXPB-8hTVosL4bAspPHNHtyz-R0F7v4,1822
3
3
  edu_rdm_integration/apps.py,sha256=5OgNdmuqe26fbu4wYb69haQJe-XFO_rDbnU1vPqJU-U,3571
4
- edu_rdm_integration/consts.py,sha256=chOsPOOY4_JLzN-8idg-VjbLWSlp6r3maFWqnvUsapg,806
4
+ edu_rdm_integration/consts.py,sha256=FFwcMHNsfjP_s9LfkccLAHjJMEMp7ppPmrRlJcgV88k,1104
5
5
  edu_rdm_integration/entities.py,sha256=mAjsYlcIbemo4xT5CSCr4payZubiBHB7Rb3Ow1CVsy0,14552
6
6
  edu_rdm_integration/enums.py,sha256=6Gv_hpYrC6v75ZtBA_xBrHqvza9NbJKhMa1TdTHkzys,4048
7
7
  edu_rdm_integration/mapping.py,sha256=bwa2fJCbV4YjQcAgRrgT3hgM6dJhr_uBtQgx3L3F2Ck,473
8
- edu_rdm_integration/models.py,sha256=tC3mghWG9Z14nMHpDV1ywcaV2RMydsLPHJcrgdKBkas,27232
8
+ edu_rdm_integration/models.py,sha256=nc9dpCFWGrDHqX_ErB8JtajG6__9YjddzYBed3S7ZX8,27489
9
9
  edu_rdm_integration/signals.py,sha256=3eRlpkDcFCF6TN80-QM8yBYLcyozzcmoPjz6r4_ApWg,73
10
10
  edu_rdm_integration/storages.py,sha256=o5WqUG7SnkeuMt-z8spUi-IraivST-7KHzfY-M3v7FA,6807
11
11
  edu_rdm_integration/utils.py,sha256=vjme0N6tEXnHt6SaqjavZshjwc-mVv4X3Pz37a5YgTw,7092
@@ -34,6 +34,7 @@ edu_rdm_integration/collect_data/tests.py,sha256=I_xLu1qwEhC3nikH3D8gJNJPwJrjYV7
34
34
  edu_rdm_integration/collect_data/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  edu_rdm_integration/collect_data/base/caches.py,sha256=3BaJxYBk9fi0aiAVzym-Jz8aNP1eSOqh4Y8OVw1HnSg,763
36
36
  edu_rdm_integration/collect_data/base/functions.py,sha256=HT23EyiD-H50p4NLx2_LtioktTHHFVLRmAgWdbuHErw,2379
37
+ edu_rdm_integration/collect_data/base/helpers.py,sha256=ONbPEELI_9ImpqCLrdIL3kb9aIQ2xQcF6XMa2C5KlDw,1017
37
38
  edu_rdm_integration/collect_data/base/managers.py,sha256=izbIHAwLAPHSP4a_Gte3AVNkcbczq06ouB6onKx4mBk,8205
38
39
  edu_rdm_integration/collect_data/base/mixins.py,sha256=Rp3ECccl3vOWZH2QHR_ArAbibQMq92IMGPoP5XAfgVc,3180
39
40
  edu_rdm_integration/collect_data/base/runners.py,sha256=OjhdTmMab6dCoIZp2zmXZTK4H5Haz__QHddwGxjOuB0,2829
@@ -45,7 +46,7 @@ edu_rdm_integration/collect_data/calculated/base/consts.py,sha256=DsgPOF_2iCzZTP
45
46
  edu_rdm_integration/collect_data/calculated/base/enums.py,sha256=BSmwrkzYwEQhz9NbZCJsldY532PqgZJzxzsVk6ue0bM,93
46
47
  edu_rdm_integration/collect_data/calculated/base/errors.py,sha256=bDVjmB43pZJ2C8sNnqF177qMB4l_XskDpVTFqTmxjj8,326
47
48
  edu_rdm_integration/collect_data/calculated/base/functions.py,sha256=x9kM8DQGkdzgybMhbu0CQBpdJNiSJyKLAJMNcO1FueI,1670
48
- edu_rdm_integration/collect_data/calculated/base/helpers.py,sha256=CgsoBujMsd1z17PhilAXo5wk08dyZTAQfzd3vtpdxYA,1490
49
+ edu_rdm_integration/collect_data/calculated/base/helpers.py,sha256=CLfqei9apxRNCgoemwVhzh2h5RvLzQXtRO4V7P6BLa8,1547
49
50
  edu_rdm_integration/collect_data/calculated/base/managers.py,sha256=lE25p_nxXYDyksGIjz8g2DHZKb0MJpBZ3FjzNKy1k54,838
50
51
  edu_rdm_integration/collect_data/calculated/base/presenters.py,sha256=enTNDOCoIEeoQK4r2CaSzU6jVgFt5Cd1HOYgdk1Wj5c,438
51
52
  edu_rdm_integration/collect_data/calculated/base/results.py,sha256=5anIB_kRrSJm2I9fN5O3AYrNJugjgqFRd-wpdAc0o0I,708
@@ -61,7 +62,7 @@ edu_rdm_integration/collect_data/non_calculated/base/consts.py,sha256=pds1t4eHzo
61
62
  edu_rdm_integration/collect_data/non_calculated/base/enums.py,sha256=BSmwrkzYwEQhz9NbZCJsldY532PqgZJzxzsVk6ue0bM,93
62
63
  edu_rdm_integration/collect_data/non_calculated/base/errors.py,sha256=dGawEQ2ItTxlFt9ynhYhpqx40Qmrlg2rOskH0DsNVnQ,297
63
64
  edu_rdm_integration/collect_data/non_calculated/base/functions.py,sha256=9Ua2793iwegv2cwkA4rhmxBmXL0BFRzuct9puSkdjBU,1563
64
- edu_rdm_integration/collect_data/non_calculated/base/helpers.py,sha256=5tKnzBJUG7Z6ufYMTCz1Mdm8tythY7CqmC24PNkFXKE,1376
65
+ edu_rdm_integration/collect_data/non_calculated/base/helpers.py,sha256=38hwAmKEWngUpmjOvCn9fUDAQ9TMISGtVnZA3zZSaRw,1433
65
66
  edu_rdm_integration/collect_data/non_calculated/base/managers.py,sha256=dBMh0yrdG5qL2NFAKPytejNOjnicBt2ZrN8coeGZmKI,783
66
67
  edu_rdm_integration/collect_data/non_calculated/base/presenters.py,sha256=TYjWlajWv3R2mwPoI1fbCDMZFTeLxQrL_ZgsTHei5_0,409
67
68
  edu_rdm_integration/collect_data/non_calculated/base/results.py,sha256=GWhPSmAM1Ikt5p6Q01yw86iEQ0fJR_hA03IQa7O6aUI,674
@@ -140,14 +141,14 @@ edu_rdm_integration/migrations/0006_request_status_data.py,sha256=g5JZtP0q0fOrbK
140
141
  edu_rdm_integration/migrations/0007_delete_upload_status.py,sha256=GAQKX6N1vDDWiCTXLGg--0gzLQr7VveAPFYzC9QpUpU,457
141
142
  edu_rdm_integration/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
142
143
  edu_rdm_integration/uploader_log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
143
- edu_rdm_integration/uploader_log/actions.py,sha256=CIFfmft5m7Nnl_9Drw7FdCVWr9htKJcbcimb4Dcl3EQ,6568
144
+ edu_rdm_integration/uploader_log/actions.py,sha256=SGYYYNL4MdST1FYCZBCYAxj3_-PsJ8IcXBYwxpZqucg,6755
144
145
  edu_rdm_integration/uploader_log/apps.py,sha256=tYJj4-sDlq8fLOSvw18L_yys7SILpTKWNmE2Qug6GnE,265
145
146
  edu_rdm_integration/uploader_log/enums.py,sha256=rgSO3BL2rh2xpfm0Pt4waQW8fB1VMJLdsGmr3SXwH_U,266
146
147
  edu_rdm_integration/uploader_log/managers.py,sha256=y5wTSMzF9hpOpIU_A7nIafL_LBU3QEie6LAYWoB-pBQ,3203
147
- edu_rdm_integration/uploader_log/ui.py,sha256=i3q4dNYiKPcZMP3QgbKFD0aTysBntXE-Hu_B6nSjrYU,1789
148
- edu_rdm_integration-0.8.2.dist-info/LICENSE,sha256=uw43Gjjj-1vXWCItfSrNDpbejnOwZMrNerUh8oWbq8Q,3458
149
- edu_rdm_integration-0.8.2.dist-info/METADATA,sha256=-_Kx5oGvNuTRkh5hMYULM1rlu_kecx7gn0gSSZzu9f0,46433
150
- edu_rdm_integration-0.8.2.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
151
- edu_rdm_integration-0.8.2.dist-info/namespace_packages.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
152
- edu_rdm_integration-0.8.2.dist-info/top_level.txt,sha256=nRJV0O14UtNE-jGIYG03sohgFnZClvf57H5m6VBXe9Y,20
153
- edu_rdm_integration-0.8.2.dist-info/RECORD,,
148
+ edu_rdm_integration/uploader_log/ui.py,sha256=YM9Buqp2wxE95Wf5gvAATBzuYzDOossK1sEmvFk07cI,2110
149
+ edu_rdm_integration-0.8.4.dist-info/LICENSE,sha256=uw43Gjjj-1vXWCItfSrNDpbejnOwZMrNerUh8oWbq8Q,3458
150
+ edu_rdm_integration-0.8.4.dist-info/METADATA,sha256=38i9e_ptucbQ04R8Agb7kUL3tfgV5FRGfHZsmxba3pw,47139
151
+ edu_rdm_integration-0.8.4.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
152
+ edu_rdm_integration-0.8.4.dist-info/namespace_packages.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
153
+ edu_rdm_integration-0.8.4.dist-info/top_level.txt,sha256=nRJV0O14UtNE-jGIYG03sohgFnZClvf57H5m6VBXe9Y,20
154
+ edu_rdm_integration-0.8.4.dist-info/RECORD,,