port-ocean 0.4.15__py3-none-any.whl → 0.4.17__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.

@@ -10,13 +10,13 @@ from port_ocean.cli.utils import cli_root_path
10
10
  @cli_start.command()
11
11
  @click.argument("path", default=".", type=click.Path(exists=True))
12
12
  @click.option(
13
- "--remove-docker-files",
14
- "remove_docker_files",
13
+ "--private/--public",
14
+ "is_private_integration",
15
15
  is_flag=True,
16
- default=False,
17
- help="Remove Docker files from the generated project. (Used for contributing to Ocean)",
16
+ default=True,
17
+ help="Handle private integrations scaffolding. (Used for contributing to Ocean when set to public)",
18
18
  )
19
- def new(path: str, remove_docker_files: bool) -> None:
19
+ def new(path: str, is_private_integration: bool) -> None:
20
20
  """
21
21
  Scaffold a new integration in the given PATH.
22
22
 
@@ -32,7 +32,7 @@ def new(path: str, remove_docker_files: bool) -> None:
32
32
  f"{cli_root_path}/cookiecutter",
33
33
  output_dir=path,
34
34
  extra_context={
35
- "remove_docker_files": remove_docker_files,
35
+ "is_private_integration": is_private_integration,
36
36
  },
37
37
  )
38
38
  name = result.split("/")[-1]
@@ -5,7 +5,7 @@
5
5
  "full_name": "Your name",
6
6
  "email": "Your address email <you@example.com>",
7
7
  "release_date": "{% now 'local' %}",
8
- "remove_docker_files": false,
8
+ "is_private_integration": true,
9
9
  "_extensions": [
10
10
  "jinja2_time.TimeExtension",
11
11
  "extensions.VersionExtension"
@@ -1,11 +1,13 @@
1
1
  import os
2
2
 
3
3
 
4
- def delete_docker_files():
5
- if "{{ cookiecutter.remove_docker_files }}" == "True":
4
+ def handle_private_integration_flags():
5
+ if "{{ cookiecutter.is_private_integration }}" == "True":
6
6
  os.remove("Dockerfile")
7
7
  os.remove(".dockerignore")
8
+ if "{{ cookiecutter.is_private_integration }}" == "False":
9
+ os.remove("sonar-project.properties")
8
10
 
9
11
 
10
12
  if __name__ == "__main__":
11
- delete_docker_files()
13
+ handle_private_integration_flags()
@@ -0,0 +1,2 @@
1
+ sonar.projectKey=port-labs_ocean_{{ cookiecutter.integration_name.lower().replace(' ', '-') }}
2
+ sonar.organization=port-labs
@@ -41,6 +41,7 @@ class IntegrationSettings(BaseModel, extra=Extra.allow):
41
41
  class IntegrationConfiguration(BaseOceanSettings, extra=Extra.allow):
42
42
  initialize_port_resources: bool = True
43
43
  scheduled_resync_interval: int | None = None
44
+ client_timeout: int = 30
44
45
  port: PortSettings
45
46
  event_listener: EventListenerSettingsType
46
47
  integration: IntegrationSettings
@@ -0,0 +1,3 @@
1
+ sonar.projectKey=port-labs_ocean_framework
2
+ sonar.organization=port-labs
3
+
port_ocean/utils.py CHANGED
@@ -18,6 +18,7 @@ from starlette.concurrency import run_in_threadpool
18
18
  from werkzeug.local import LocalStack, LocalProxy
19
19
 
20
20
  from port_ocean.helpers.async_client import OceanAsyncClient
21
+ from port_ocean.context.ocean import ocean
21
22
  from port_ocean.helpers.retry import RetryTransport
22
23
 
23
24
  _http_client: LocalStack[httpx.AsyncClient] = LocalStack()
@@ -26,7 +27,7 @@ _http_client: LocalStack[httpx.AsyncClient] = LocalStack()
26
27
  def _get_http_client_context() -> httpx.AsyncClient:
27
28
  client = _http_client.top
28
29
  if client is None:
29
- client = OceanAsyncClient(RetryTransport)
30
+ client = OceanAsyncClient(RetryTransport, timeout=ocean.config.client_timeout)
30
31
  _http_client.push(client)
31
32
 
32
33
  return client
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.4.15
3
+ Version: 0.4.17
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
@@ -9,14 +9,14 @@ port_ocean/cli/commands/defaults/dock.py,sha256=V5jm9j96r7hGxq0pC5xMf-z_w2MBcOJL
9
9
  port_ocean/cli/commands/defaults/group.py,sha256=hii_4CYoQ7jSMePbnP4AmruO_RKWCUcoV7dXXBlZafc,115
10
10
  port_ocean/cli/commands/list_integrations.py,sha256=DVVioFruGUE-_v6UUHlcemWNN6RlWwCrf1X4HmAXsf8,1134
11
11
  port_ocean/cli/commands/main.py,sha256=gj0lmuLep2XeLNuabB7Wk0UVYPT7_CD_rAw5AoUQWSE,1057
12
- port_ocean/cli/commands/new.py,sha256=FUj2tPgZDcafKu47pY0-X2JzdcMnFAw2sNOdSQZxu50,2054
12
+ port_ocean/cli/commands/new.py,sha256=y8QFeISoXb31a4RqMhXCDIPa3gJSYz2NPMGEI5p0Hxc,2074
13
13
  port_ocean/cli/commands/pull.py,sha256=VvrRjLNlfPuLIf7KzeIcbzzdi98Z0M9wCRpXC3QPxdI,2306
14
14
  port_ocean/cli/commands/sail.py,sha256=rv_lKFITsV5ta9ng3g4eR5H6AtlAsrvBQpAvH_p2DaA,2193
15
15
  port_ocean/cli/commands/version.py,sha256=hEuIEIcm6Zkamz41Z9nxeSM_4g3oNlAgWwQyDGboh-E,536
16
16
  port_ocean/cli/cookiecutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- port_ocean/cli/cookiecutter/cookiecutter.json,sha256=bBUXljV7pwvdxkRn2uw2aCoHItmEomjQ_ftI8Urn67w,479
17
+ port_ocean/cli/cookiecutter/cookiecutter.json,sha256=N5UrAP2e5JbgEDz_WTQFIZlzSveME6x32sHeA7idjh0,481
18
18
  port_ocean/cli/cookiecutter/extensions.py,sha256=eQNjZvy2enDkJpvMbBGil77Xk9-38f862wfnmCjdoBc,446
19
- port_ocean/cli/cookiecutter/hooks/post_gen_project.py,sha256=3e0fUSnTxYM7PLm1vUzQG4ba5Br0EF054_EcW6cVlvY,220
19
+ port_ocean/cli/cookiecutter/hooks/post_gen_project.py,sha256=4WpFM5O7FXuaqBMrhtnuz2LRqReMYzdVDoE5Ah6qoDI,358
20
20
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.dockerignore,sha256=9Mz_WI7XBpKzlJ7ILb4vlcuzYkh98Ql3bP_5GHN1sRY,1034
21
21
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.gitignore,sha256=32p1lDW_g5hyBz486GWfDeR9m7ikFlASVri5a8vmNoo,2698
22
22
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/.gitignore,sha256=kCpRPdl3S_jqYYZaOrc0-xa6-l3KqVjNRXc6jCkd_-Q,12
@@ -31,6 +31,7 @@ port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/debug.py,sha256=_T
31
31
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/main.py,sha256=KxxtBrRygYOP0bulXySVYwX0fm_mm3QHqeEqwDwgXgY,1669
32
32
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/poetry.toml,sha256=kENq8nNmFPIzw9vySheyG4xHxAPuBSpZO1CYGD6G2NE,46
33
33
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/pyproject.toml,sha256=r7xF1yf7gtKIXhm5WKvtbVht4JHHtLxM249BbS58J-o,1928
34
+ port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/sonar-project.properties,sha256=timmRpoSd50BdxLf45OcFUk2qs855z610kzz3yLAqJw,124
34
35
  port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
36
  port_ocean/cli/utils.py,sha256=IUK2UbWqjci-lrcDdynZXqVP5B5TcjF0w5CpEVUks-k,54
36
37
  port_ocean/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -48,7 +49,7 @@ port_ocean/clients/port/utils.py,sha256=O9mBu6zp4TfpS4SQ3qCPpn9ZVyYF8GKnji4UnYhM
48
49
  port_ocean/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
50
  port_ocean/config/base.py,sha256=e1oW66ynjo7Sp2PcLBp9aCzj59JpTaiKUXVJK8VB8TA,5540
50
51
  port_ocean/config/dynamic.py,sha256=CIRDnqFUPSnNMLZ-emRCMVAjEQNBlIujhZ7OGwi_aKs,1816
51
- port_ocean/config/settings.py,sha256=gKcc7q2HTu62JT-RyNXEZQ6TO7cafU6hXEN4Wd8DbBU,1366
52
+ port_ocean/config/settings.py,sha256=JCqwoVp2PuteRWUxx6dHkDvf24fKHOBEi0de4G79TVY,1395
52
53
  port_ocean/consumers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
54
  port_ocean/consumers/base_consumer.py,sha256=L0gW0DvUpeGVdb1RH83-wgbI37V6fsUKfd9Yox42-Gs,125
54
55
  port_ocean/consumers/kafka_consumer.py,sha256=jFgL3Vnnqf0g6I843yLvo5vGBSdMKmmC7Q3WklCUFqY,3467
@@ -111,10 +112,11 @@ port_ocean/middlewares.py,sha256=8rGu9XSKvbNCQGzWvfaijDrp-0ATJrWAQfBji2CnSck,247
111
112
  port_ocean/ocean.py,sha256=9dFBf46N6fht6ibQUjnDDizY-p0qa0Uw-415JTDQmus,3626
112
113
  port_ocean/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
113
114
  port_ocean/run.py,sha256=xvYZlfi-J-IcqsAg8tNVnvl1mEUr6wPSya_-Bbf6jAU,1811
114
- port_ocean/utils.py,sha256=VcDhnqFwUYCPr9EZFtg5M2CIUC5Y4nN1Bv7gmCF4VYc,6067
115
+ port_ocean/sonar-project.properties,sha256=X_wLzDOkEVmpGLRMb2fg9Rb0DxWwUFSvESId8qpvrPI,73
116
+ port_ocean/utils.py,sha256=EAoBp9AVFam1xYVaJ1f-JVyJIedArIyK6u9jseC6rl8,6147
115
117
  port_ocean/version.py,sha256=2ugCk8TXPsRIuFviZ8j3RPaszSw2HE-KuaW8vhgWJVM,172
116
- port_ocean-0.4.15.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
117
- port_ocean-0.4.15.dist-info/METADATA,sha256=nicI6C_YeNYnPz4NDnWBHm8R_6vrjEg0OZoiYhrw3C0,6515
118
- port_ocean-0.4.15.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
119
- port_ocean-0.4.15.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
120
- port_ocean-0.4.15.dist-info/RECORD,,
118
+ port_ocean-0.4.17.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
119
+ port_ocean-0.4.17.dist-info/METADATA,sha256=MdcM7MWumHFk1oeag-TZecf0PjrJck1owfVJUR1ixh4,6515
120
+ port_ocean-0.4.17.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
121
+ port_ocean-0.4.17.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
122
+ port_ocean-0.4.17.dist-info/RECORD,,