port-ocean 0.1.4.dev7__py3-none-any.whl → 0.1.4.dev9__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.

@@ -30,9 +30,9 @@ class IntegrationClientMixin:
30
30
  )
31
31
  return response
32
32
 
33
- async def get_current_integration(self) -> dict[str, Any]:
33
+ async def get_current_integration(self, should_raise: bool = True, should_log: bool = True) -> dict[str, Any]:
34
34
  response = await self._get_current_integration()
35
- handle_status_code(response)
35
+ handle_status_code(response, should_raise, should_log)
36
36
  return response.json()["integration"]
37
37
 
38
38
  async def create_integration(
@@ -9,7 +9,7 @@ LogLevelType = Literal["ERROR", "WARNING", "INFO", "DEBUG", "CRITICAL"]
9
9
 
10
10
 
11
11
  class ApplicationSettings(BaseSettings):
12
- log_level: LogLevelType = "DEBUG"
12
+ log_level: LogLevelType = "INFO"
13
13
  port: int = 8000
14
14
 
15
15
  class Config:
@@ -2,6 +2,7 @@ from contextlib import contextmanager
2
2
  from typing import Awaitable, Generator, Callable
3
3
 
4
4
  from loguru import logger
5
+
5
6
  from port_ocean.core.ocean_types import (
6
7
  ASYNC_GENERATOR_RESYNC_TYPE,
7
8
  RAW_RESULT,
@@ -44,7 +45,7 @@ async def resync_generator_wrapper(
44
45
  try:
45
46
  with resync_error_handling():
46
47
  result = await anext(generator)
47
- yield validate_result([result])[0]
48
+ yield validate_result(result)
48
49
  except OceanAbortException as error:
49
50
  errors.append(error)
50
51
  except StopAsyncIteration:
@@ -15,7 +15,7 @@ class EntityDiff(TypedDict):
15
15
 
16
16
  RAW_ITEM = dict[Any, Any]
17
17
  RAW_RESULT = list[RAW_ITEM]
18
- ASYNC_GENERATOR_RESYNC_TYPE = AsyncIterator[RAW_ITEM]
18
+ ASYNC_GENERATOR_RESYNC_TYPE = AsyncIterator[RAW_RESULT]
19
19
  RESYNC_RESULT = list[RAW_ITEM | ASYNC_GENERATOR_RESYNC_TYPE]
20
20
 
21
21
  LISTENER_RESULT = Awaitable[RAW_RESULT] | ASYNC_GENERATOR_RESYNC_TYPE
@@ -10,8 +10,10 @@ def setup_logger(level: LogLevelType) -> None:
10
10
  logger_format = (
11
11
  "<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | "
12
12
  "<level>{level: <8}</level> | "
13
- "<level>{message}</level> | {extra}"
13
+ "<level>{message}</level>"
14
14
  )
15
+ if level == "DEBUG":
16
+ logger_format += " | {extra}"
15
17
 
16
18
  logger.remove()
17
19
  logger.add(
@@ -41,7 +41,7 @@ class Defaults(BaseModel):
41
41
 
42
42
  async def _is_integration_exists(port_client: PortClient) -> bool:
43
43
  try:
44
- await port_client.get_current_integration()
44
+ await port_client.get_current_integration(should_log=False)
45
45
  return True
46
46
  except httpx.HTTPStatusError as e:
47
47
  if e.response.status_code != status.HTTP_404_NOT_FOUND:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.1.4.dev7
3
+ Version: 0.1.4.dev9
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
@@ -32,13 +32,13 @@ port_ocean/clients/port/client.py,sha256=3nEAaJjF1z9P6_NdowzFk8EGwLtKFTcTweaOWyq
32
32
  port_ocean/clients/port/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  port_ocean/clients/port/mixins/blueprints.py,sha256=15e8sA1rQCC6aUcKapDu1VJsnAuup6QQvwk7ViuCvyg,2928
34
34
  port_ocean/clients/port/mixins/entities.py,sha256=KfghZDFAoOX_0kypuzkcF6aNx2xb8VHi9jWb5f8o5xw,5623
35
- port_ocean/clients/port/mixins/integrations.py,sha256=wbK3EXqPv5pRZytQjIVKwDa2aLPJK_FRCMdLIkP0M9U,3909
35
+ port_ocean/clients/port/mixins/integrations.py,sha256=Yb-pTTboekiRFCx6oLszwK5kx1ueqAF8yBj2yC1wk88,3987
36
36
  port_ocean/clients/port/types.py,sha256=NnT1W2H_tZ_9cyEFoDhb90q3apf8p9emkHYspbPoZJQ,593
37
37
  port_ocean/clients/port/utils.py,sha256=jgF0Gq8lZA9qkpsHlzPTuKoAdY6AlvF1Bl5JB4SnQGE,781
38
38
  port_ocean/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  port_ocean/config/base.py,sha256=nqHIZJZK3IyR48cOQGKQaQv4kz5IG_oUhrP9dJScC-U,4011
40
40
  port_ocean/config/dynamic.py,sha256=CIRDnqFUPSnNMLZ-emRCMVAjEQNBlIujhZ7OGwi_aKs,1816
41
- port_ocean/config/settings.py,sha256=Ghg71GJgeIPzFMyvAanErfCMCVDbc-roDGkdtgtTYf8,1231
41
+ port_ocean/config/settings.py,sha256=2QmMrKpAZ3dHVbo-nCoo-GiHFXWwUV1FddKcDWSrjW8,1230
42
42
  port_ocean/consumers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  port_ocean/consumers/base_consumer.py,sha256=L0gW0DvUpeGVdb1RH83-wgbI37V6fsUKfd9Yox42-Gs,125
44
44
  port_ocean/consumers/kafka_consumer.py,sha256=7Nf3KH2jG2TL8gQrO4lmfSRJXrTz7W6dS2OrH3F76HM,4147
@@ -75,9 +75,9 @@ port_ocean/core/integrations/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
75
75
  port_ocean/core/integrations/mixins/events.py,sha256=yjh5jmZcGoklqDIV8MBvTCGK1r_b7oc9H7htIvssfGk,698
76
76
  port_ocean/core/integrations/mixins/handler.py,sha256=3chtZ1RCIH2h1V19hd9CteAV8M0wuhTNnta6_Jlviog,2569
77
77
  port_ocean/core/integrations/mixins/sync.py,sha256=DM6bQjLpeOlGRWUYlmvNtl_kl2pyHOdkKjzVzUinhOk,12350
78
- port_ocean/core/integrations/mixins/utils.py,sha256=KC3wEbNmCFRBoM0BdMumOdXp-Fj5rHF39ZPjifD63ao,1747
78
+ port_ocean/core/integrations/mixins/utils.py,sha256=zoXaayu-npBLFDUA2qGUkq4QT8j_CFSPp_MVDhCpKAM,1743
79
79
  port_ocean/core/models.py,sha256=aLo1iCrSLgfwxMBrqMjrrfHWychPr6LwA0OezhbMh1M,642
80
- port_ocean/core/ocean_types.py,sha256=gQANgXkxYXV98M9ukQfv_UCuUFRBrhyYN9I707OLKqM,781
80
+ port_ocean/core/ocean_types.py,sha256=X5r3FCWrGeKCyXPr9NzW-ClGkLn7QliLoB6xzwEa-RQ,783
81
81
  port_ocean/core/utils.py,sha256=B040Wokk28g9tQj_06qk_uvm85RIXc6XGXysZV6gtQw,1957
82
82
  port_ocean/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
83
  port_ocean/exceptions/api.py,sha256=TLmTMqn4uHGaHgZK8PMIJ0TVJlPB4iP7xl9rx7GtCyY,426
@@ -86,15 +86,15 @@ port_ocean/exceptions/clients.py,sha256=LKLLs-Zy3caNG85rwxfOw2rMr8qqVV6SHUq4fRCZ
86
86
  port_ocean/exceptions/context.py,sha256=8pUlWbXpRof5tlArpPooXCbEVHQCyY2sBAnMgPLzyEM,235
87
87
  port_ocean/exceptions/core.py,sha256=jABHL3elMfGiGXXB_OlAWh34vU4qaanMNw2Uw-_SpmI,532
88
88
  port_ocean/exceptions/port_defaults.py,sha256=R3ufJcfllb7NZSwHOpBs8kbjsIZVQLM6vKO6dz4w-EE,407
89
- port_ocean/logger_setup.py,sha256=UGTvSdbV2FMvDCQRxCGcBw6m9VpEkl-pGBNOL47BrH8,1107
89
+ port_ocean/logger_setup.py,sha256=dOA58ZBAfe9dcAoBybXFWgDfsJG-uIX1ABI0r2CyUG8,1160
90
90
  port_ocean/middlewares.py,sha256=8rGu9XSKvbNCQGzWvfaijDrp-0ATJrWAQfBji2CnSck,2475
91
91
  port_ocean/ocean.py,sha256=CBuRr1gJRpWRJ6TUStG-ocLptHohFALgJqFXMItWHL0,2263
92
- port_ocean/port_defaults.py,sha256=QzrO_7Q0hRX-bgMpm-6XTedMbTZQH73NfHby3l1FEDw,7161
92
+ port_ocean/port_defaults.py,sha256=slubEiM4SJKCzD4bHzf8Rwj3RgsHZXZuYZ0ouhcIQOA,7177
93
93
  port_ocean/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
94
  port_ocean/run.py,sha256=Bd6c6qYqQZlZqTLyRWRIkf579NQNqrr-o4mVAnBIISA,2834
95
95
  port_ocean/utils.py,sha256=2a30qmGMSPgsTxfpz2RiI3xDsM0-TkaKAbvJBaYqvCc,1007
96
- port_ocean-0.1.4.dev7.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
97
- port_ocean-0.1.4.dev7.dist-info/METADATA,sha256=KG1T3aLWbbTSjXzv9hhJHkdjc173u_TpUugwmiI7p78,6361
98
- port_ocean-0.1.4.dev7.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
99
- port_ocean-0.1.4.dev7.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
100
- port_ocean-0.1.4.dev7.dist-info/RECORD,,
96
+ port_ocean-0.1.4.dev9.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
97
+ port_ocean-0.1.4.dev9.dist-info/METADATA,sha256=TIBYjJxanrpR8729Nah0Pn1hjwF7cowioZtba4N8wic,6361
98
+ port_ocean-0.1.4.dev9.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
99
+ port_ocean-0.1.4.dev9.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
100
+ port_ocean-0.1.4.dev9.dist-info/RECORD,,