port-ocean 0.12.2.dev7__py3-none-any.whl → 0.12.2.dev10__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 port-ocean might be problematic. Click here for more details.

@@ -3,7 +3,6 @@ import inspect
3
3
  import typing
4
4
  from typing import Callable, Awaitable, Any
5
5
 
6
- import httpx
7
6
  from loguru import logger
8
7
 
9
8
  from port_ocean.clients.port.types import UserAgentType
@@ -174,48 +173,48 @@ class SyncRawMixin(HandlerMixin, EventsMixin):
174
173
  ) -> tuple[list[Entity], list[Exception]]:
175
174
  results, errors = await self._get_resource_raw_results(resource_config)
176
175
  passed_entities = []
177
- # async_generators: list[ASYNC_GENERATOR_RESYNC_TYPE] = []
178
- # raw_results: RAW_RESULT = []
179
- # for result in results:
180
- # if isinstance(result, dict):
181
- # raw_results.append(result)
182
- # else:
183
- # async_generators.append(result)
184
- #
185
- # send_raw_data_examples_amount = (
186
- # SEND_RAW_DATA_EXAMPLES_AMOUNT if ocean.config.send_raw_data_examples else 0
187
- # )
188
- # all_entities, register_errors = await self._register_resource_raw(
189
- # resource_config,
190
- # raw_results,
191
- # user_agent_type,
192
- # send_raw_data_examples_amount=send_raw_data_examples_amount,
193
- # )
194
- # errors.extend(register_errors)
195
- # passed_entities = list(all_entities.passed)
196
- #
197
- # for generator in async_generators:
198
- # try:
199
- # async for items in generator:
200
- # if send_raw_data_examples_amount > 0:
201
- # send_raw_data_examples_amount = max(
202
- # 0, send_raw_data_examples_amount - len(passed_entities)
203
- # )
204
- #
205
- # entities, register_errors = await self._register_resource_raw(
206
- # resource_config,
207
- # items,
208
- # user_agent_type,
209
- # send_raw_data_examples_amount=send_raw_data_examples_amount,
210
- # )
211
- # errors.extend(register_errors)
212
- # passed_entities.extend(entities.passed)
213
- # except* OceanAbortException as error:
214
- # errors.append(error)
215
- #
216
- # logger.info(
217
- # f"Finished registering change for {len(results)} raw results for kind: {resource_config.kind}. {len(passed_entities)} entities were affected"
218
- # )
176
+ async_generators: list[ASYNC_GENERATOR_RESYNC_TYPE] = []
177
+ raw_results: RAW_RESULT = []
178
+ for result in results:
179
+ if isinstance(result, dict):
180
+ raw_results.append(result)
181
+ else:
182
+ async_generators.append(result)
183
+
184
+ send_raw_data_examples_amount = (
185
+ SEND_RAW_DATA_EXAMPLES_AMOUNT if ocean.config.send_raw_data_examples else 0
186
+ )
187
+ all_entities, register_errors = await self._register_resource_raw(
188
+ resource_config,
189
+ raw_results,
190
+ user_agent_type,
191
+ send_raw_data_examples_amount=send_raw_data_examples_amount,
192
+ )
193
+ errors.extend(register_errors)
194
+ passed_entities = list(all_entities.passed)
195
+
196
+ for generator in async_generators:
197
+ try:
198
+ async for items in generator:
199
+ if send_raw_data_examples_amount > 0:
200
+ send_raw_data_examples_amount = max(
201
+ 0, send_raw_data_examples_amount - len(passed_entities)
202
+ )
203
+
204
+ # entities, register_errors = await self._register_resource_raw(
205
+ # resource_config,
206
+ # items,
207
+ # user_agent_type,
208
+ # send_raw_data_examples_amount=send_raw_data_examples_amount,
209
+ # )
210
+ # errors.extend(register_errors)
211
+ # passed_entities.extend(entities.passed)
212
+ except* OceanAbortException as error:
213
+ errors.append(error)
214
+
215
+ logger.info(
216
+ f"Finished registering change for {len(results)} raw results for kind: {resource_config.kind}. {len(passed_entities)} entities were affected"
217
+ )
219
218
  return passed_entities, errors
220
219
 
221
220
  async def register_raw(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.12.2.dev7
3
+ Version: 0.12.2.dev10
4
4
  Summary: Port Ocean is a CLI tool for managing your Port projects.
5
5
  Home-page: https://app.getport.io
6
6
  Keywords: ocean,port-ocean,port
@@ -94,7 +94,7 @@ port_ocean/core/integrations/mixins/__init__.py,sha256=FA1FEKMM6P-L2_m7Q4L20mFa4
94
94
  port_ocean/core/integrations/mixins/events.py,sha256=Ddfx2L4FpghV38waF8OfVeOV0bHBxNIgjU-q5ffillI,2341
95
95
  port_ocean/core/integrations/mixins/handler.py,sha256=mZ7-0UlG3LcrwJttFbMe-R4xcOU2H_g33tZar7PwTv8,3771
96
96
  port_ocean/core/integrations/mixins/sync.py,sha256=B9fEs8faaYLLikH9GBjE_E61vo0bQDjIGQsQ1SRXOlA,3931
97
- port_ocean/core/integrations/mixins/sync_raw.py,sha256=uJpcCDYXkS42snXkt6LXWTCO14xhQDWUDwJEEdRXAMk,19109
97
+ port_ocean/core/integrations/mixins/sync_raw.py,sha256=tZFWCPthhSaQ1x2TsBDnSN_G_WgzYVX0xE6kBvDCtHc,19000
98
98
  port_ocean/core/integrations/mixins/utils.py,sha256=7y1rGETZIjOQadyIjFJXIHKkQFKx_SwiP-TrAIsyyLY,2303
99
99
  port_ocean/core/models.py,sha256=dJ2_olTdbjUpObQJNmg7e7EENU_zZiX6XOaknNp54B0,1342
100
100
  port_ocean/core/ocean_types.py,sha256=3_d8-n626f1kWLQ_Jxw194LEyrOVupz05qs_Y1pvB-A,990
@@ -140,8 +140,8 @@ port_ocean/utils/repeat.py,sha256=0EFWM9d8lLXAhZmAyczY20LAnijw6UbIECf5lpGbOas,32
140
140
  port_ocean/utils/signal.py,sha256=K-6kKFQTltcmKDhtyZAcn0IMa3sUpOHGOAUdWKgx0_E,1369
141
141
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
142
142
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
143
- port_ocean-0.12.2.dev7.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
144
- port_ocean-0.12.2.dev7.dist-info/METADATA,sha256=o1pzpgK4cR7i9nTf5E7PQoq4oSQxSbcOehJEPNUd8AY,6619
145
- port_ocean-0.12.2.dev7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
146
- port_ocean-0.12.2.dev7.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
147
- port_ocean-0.12.2.dev7.dist-info/RECORD,,
143
+ port_ocean-0.12.2.dev10.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
144
+ port_ocean-0.12.2.dev10.dist-info/METADATA,sha256=vu6FGJXNIMpMvRjD8k9BqXX86Zegx7_EQeqKphg22F0,6620
145
+ port_ocean-0.12.2.dev10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
146
+ port_ocean-0.12.2.dev10.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
147
+ port_ocean-0.12.2.dev10.dist-info/RECORD,,