port-ocean 0.10.0__tar.gz → 0.10.2__tar.gz
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.
- {port_ocean-0.10.0 → port_ocean-0.10.2}/PKG-INFO +1 -1
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/new.py +38 -4
- port_ocean-0.10.2/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.env.example +2 -0
- port_ocean-0.10.2/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/blueprints.json +41 -0
- port_ocean-0.10.2/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/port-app-config.yml +16 -0
- port_ocean-0.10.2/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/spec.yaml +15 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/CHANGELOG.md +1 -1
- port_ocean-0.10.2/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/CONTRIBUTING.md +7 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/Makefile +3 -3
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/changelog/.gitignore +1 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/main.py +16 -1
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/pyproject.toml +7 -3
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/config/settings.py +6 -5
- {port_ocean-0.10.0 → port_ocean-0.10.2}/pyproject.toml +3 -3
- port_ocean-0.10.0/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/spec.yaml +0 -15
- {port_ocean-0.10.0 → port_ocean-0.10.2}/LICENSE.md +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/README.md +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/bootstrap.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cli.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/defaults/__init___.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/defaults/clean.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/defaults/dock.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/defaults/group.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/list_integrations.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/main.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/pull.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/sail.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/commands/version.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/cookiecutter.json +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/extensions.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/hooks/post_gen_project.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.dockerignore +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.gitignore +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/.gitignore +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/Dockerfile +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/README.md +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/debug.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/poetry.toml +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/sonar-project.properties +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/test_sample.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/utils.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/authentication.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/client.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/mixins/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/mixins/blueprints.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/mixins/entities.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/mixins/integrations.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/mixins/migrations.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/retry_transport.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/types.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/clients/port/utils.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/config/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/config/base.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/config/dynamic.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/consumers/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/consumers/kafka_consumer.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/context/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/context/event.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/context/ocean.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/context/resource.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/defaults/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/defaults/clean.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/defaults/common.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/defaults/initialize.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/event_listener/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/event_listener/base.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/event_listener/factory.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/event_listener/http.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/event_listener/kafka.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/event_listener/once.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/event_listener/polling.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/base.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entities_state_applier/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entities_state_applier/base.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entities_state_applier/port/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entities_state_applier/port/applier.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entities_state_applier/port/get_related_entities.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entities_state_applier/port/order_by_entities_dependencies.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entity_processor/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entity_processor/base.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entity_processor/jq_entity_processor.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/port_app_config/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/port_app_config/api.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/port_app_config/base.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/port_app_config/models.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/resync_state_updater/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/resync_state_updater/updater.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/integrations/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/integrations/base.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/integrations/mixins/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/integrations/mixins/events.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/integrations/mixins/handler.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/integrations/mixins/sync.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/integrations/mixins/sync_raw.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/integrations/mixins/utils.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/models.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/ocean_types.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/utils.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/exceptions/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/exceptions/api.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/exceptions/base.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/exceptions/clients.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/exceptions/context.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/exceptions/core.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/exceptions/port_defaults.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/exceptions/utils.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/helpers/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/helpers/async_client.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/helpers/retry.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/log/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/log/handlers.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/log/logger_setup.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/log/sensetive.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/middlewares.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/ocean.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/py.typed +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/run.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/sonar-project.properties +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/tests/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/tests/test_sample.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/utils/__init__.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/utils/async_http.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/utils/async_iterators.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/utils/cache.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/utils/misc.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/utils/queue_utils.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/utils/repeat.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/utils/signal.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/utils/time.py +0 -0
- {port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/version.py +0 -0
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
|
|
3
3
|
import click
|
|
4
|
+
import json
|
|
4
5
|
from cookiecutter.main import cookiecutter # type: ignore
|
|
6
|
+
import os
|
|
5
7
|
|
|
6
8
|
from port_ocean.cli.commands.main import cli_start, print_logo, console
|
|
7
9
|
from port_ocean.cli.utils import cli_root_path
|
|
8
10
|
|
|
9
11
|
|
|
12
|
+
def add_vscode_configuration(result: str, name: str) -> None:
|
|
13
|
+
vscode_entry_root_path = "${workspaceFolder}/integrations/" + name
|
|
14
|
+
new_vscode_entry = {
|
|
15
|
+
"console": "integratedTerminal",
|
|
16
|
+
"cwd": vscode_entry_root_path,
|
|
17
|
+
"envFile": f"{vscode_entry_root_path}/.env",
|
|
18
|
+
"justMyCode": True,
|
|
19
|
+
"name": f"Run {name} integration",
|
|
20
|
+
"program": f"{vscode_entry_root_path}/debug.py",
|
|
21
|
+
"python": f"{vscode_entry_root_path}/.venv/bin/python",
|
|
22
|
+
"request": "launch",
|
|
23
|
+
"type": "debugpy",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
vs_code_json_path = os.path.join(os.path.dirname(result), "../.vscode/launch.json")
|
|
27
|
+
if not os.path.exists(vs_code_json_path):
|
|
28
|
+
return
|
|
29
|
+
vs_code_json = json.load(open(vs_code_json_path, "r"))
|
|
30
|
+
vs_code_json["configurations"].append(new_vscode_entry)
|
|
31
|
+
|
|
32
|
+
with open(vs_code_json_path, "w") as vs_code_json_file:
|
|
33
|
+
json.dump(vs_code_json, vs_code_json_file, indent=2)
|
|
34
|
+
vs_code_json_file.write("\n")
|
|
35
|
+
|
|
36
|
+
|
|
10
37
|
@cli_start.command()
|
|
11
38
|
@click.argument("path", default=".", type=click.Path(exists=True))
|
|
12
39
|
@click.option(
|
|
@@ -37,6 +64,9 @@ def new(path: str, is_private_integration: bool) -> None:
|
|
|
37
64
|
)
|
|
38
65
|
name = result.split("/")[-1]
|
|
39
66
|
|
|
67
|
+
if not is_private_integration:
|
|
68
|
+
add_vscode_configuration(result, name)
|
|
69
|
+
|
|
40
70
|
console.print(
|
|
41
71
|
"\n🌊 Ahoy, Captain! Your project is ready to set sail into the vast ocean of possibilities!",
|
|
42
72
|
style="bold",
|
|
@@ -47,10 +77,14 @@ def new(path: str, is_private_integration: bool) -> None:
|
|
|
47
77
|
f"▶️ [bold][blue]cd {path}/{name} && make install && . .venv/bin/activate[/blue][/bold]\n"
|
|
48
78
|
)
|
|
49
79
|
console.print(
|
|
50
|
-
"⚓️
|
|
51
|
-
f"▶️ [bold][blue]ocean sail {path}/{name}[/blue][/bold] \n"
|
|
80
|
+
f"⚓️ Copy example env file: Run [bold][blue]cp {path}/{name}.env.example {path}/{name}/.env [/blue][/bold] and set your port credentials in the created file.\n"
|
|
52
81
|
)
|
|
53
82
|
console.print(
|
|
54
|
-
"⚓️
|
|
55
|
-
f"▶️ [bold][blue]
|
|
83
|
+
"⚓️ Set sail with [blue]Ocean[/blue]: Run [bold][blue]ocean sail[/blue] <path_to_integration>[/bold] to run the project using Ocean.\n"
|
|
84
|
+
f"▶️ [bold][blue]ocean sail {path}/{name}[/blue][/bold] \n"
|
|
56
85
|
)
|
|
86
|
+
if not is_private_integration:
|
|
87
|
+
console.print(
|
|
88
|
+
"⚓️ Smooth sailing with [blue]Make[/blue]: Alternatively, you can run [bold][blue]make run[/blue][/bold] to launch your project using Make. \n"
|
|
89
|
+
f"▶️ [bold][blue]make run {path}/{name}[/blue][/bold]"
|
|
90
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"identifier": "{{ cookiecutter.integration_slug }}ExampleBlueprint",
|
|
4
|
+
"title": "{{ cookiecutter.integration_name }} Example",
|
|
5
|
+
"icon": "Blueprint",
|
|
6
|
+
"schema": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"status": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": [
|
|
11
|
+
"VALID",
|
|
12
|
+
"FAILED"
|
|
13
|
+
],
|
|
14
|
+
"enumColors": {
|
|
15
|
+
"VALID": "green",
|
|
16
|
+
"FAILED": "red"
|
|
17
|
+
},
|
|
18
|
+
"title": "Status"
|
|
19
|
+
},
|
|
20
|
+
"text": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "Text"
|
|
23
|
+
},
|
|
24
|
+
"component": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"title": "Component"
|
|
27
|
+
},
|
|
28
|
+
"service": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"title": "Service"
|
|
31
|
+
},
|
|
32
|
+
"score": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"title": "Score"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": []
|
|
38
|
+
},
|
|
39
|
+
"relations": {}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
resources:
|
|
2
|
+
- kind: {{ cookiecutter.integration_slug}}-example-kind
|
|
3
|
+
selector:
|
|
4
|
+
query: 'true'
|
|
5
|
+
port:
|
|
6
|
+
entity:
|
|
7
|
+
mappings:
|
|
8
|
+
identifier: .my_custom_id
|
|
9
|
+
title: '(.my_component + " @ " + .my_service)'
|
|
10
|
+
blueprint: '"{{ cookiecutter.integration_slug }}ExampleBlueprint"'
|
|
11
|
+
properties:
|
|
12
|
+
status: .my_enum
|
|
13
|
+
text: .my_custom_text
|
|
14
|
+
component: .my_component
|
|
15
|
+
service: .my_service
|
|
16
|
+
score: .my_special_score
|
port_ocean-0.10.2/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/spec.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
description: {{cookiecutter.integration_name}} integration for Port Ocean
|
|
2
|
+
icon: Cookiecutter # Should be one of the available icons in Port
|
|
3
|
+
features:
|
|
4
|
+
- type: exporter
|
|
5
|
+
section: Under Development # Should be one of the available sections in Port
|
|
6
|
+
resources:
|
|
7
|
+
- kind: {{ cookiecutter.integration_slug }}-example-kind
|
|
8
|
+
# - kind: <ResourceName2>
|
|
9
|
+
configurations:
|
|
10
|
+
- name: my{{ cookiecutter.integration_slug}}Token
|
|
11
|
+
# required: true
|
|
12
|
+
type: string
|
|
13
|
+
sensitive: true
|
|
14
|
+
- name: someApplicationUrl
|
|
15
|
+
type: url
|
|
@@ -55,8 +55,8 @@ lint:
|
|
|
55
55
|
run:
|
|
56
56
|
$(ACTIVATE) && ocean sail
|
|
57
57
|
|
|
58
|
-
test:
|
|
59
|
-
$(ACTIVATE) && poetry run pytest
|
|
58
|
+
test:
|
|
59
|
+
$(ACTIVATE) && poetry run pytest -n auto
|
|
60
60
|
|
|
61
61
|
clean:
|
|
62
62
|
@find . -name '.venv' -type d -exec rm -rf {} \;
|
|
@@ -71,4 +71,4 @@ clean:
|
|
|
71
71
|
rm -rf htmlcov
|
|
72
72
|
rm -rf .tox/
|
|
73
73
|
rm -rf docs/_build
|
|
74
|
-
rm -rf dist/
|
|
74
|
+
rm -rf dist/
|
|
@@ -15,6 +15,21 @@ async def on_resync(kind: str) -> list[dict[Any, Any]]:
|
|
|
15
15
|
# return [{"some_project_key": "someProjectValue", ...}]
|
|
16
16
|
# if kind == "issues":
|
|
17
17
|
# return [{"some_issue_key": "someIssueValue", ...}]
|
|
18
|
+
|
|
19
|
+
# Initial stub to show complete flow, replace this with your own logic
|
|
20
|
+
if kind == "{{ cookiecutter.integration_slug }}-example-kind":
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
"my_custom_id": f"id_{x}",
|
|
24
|
+
"my_custom_text": f"very long text with {x} in it",
|
|
25
|
+
"my_special_score": x * 32 % 3,
|
|
26
|
+
"my_component": f"component-{x}",
|
|
27
|
+
"my_service": f"service-{x %2}",
|
|
28
|
+
"my_enum": "VALID" if x % 2 == 0 else "FAILED",
|
|
29
|
+
}
|
|
30
|
+
for x in range(25)
|
|
31
|
+
]
|
|
32
|
+
|
|
18
33
|
return []
|
|
19
34
|
|
|
20
35
|
|
|
@@ -38,4 +53,4 @@ async def on_resync(kind: str) -> list[dict[Any, Any]]:
|
|
|
38
53
|
async def on_start() -> None:
|
|
39
54
|
# Something to do when the integration starts
|
|
40
55
|
# For example create a client to query 3rd party services - GitHub, Jira, etc...
|
|
41
|
-
print("Starting integration")
|
|
56
|
+
print("Starting {{ cookiecutter.integration_slug }} integration")
|
|
@@ -9,13 +9,17 @@ python = "^3.11"
|
|
|
9
9
|
port_ocean = { version = "^{% version %}", extras = ["cli"] }
|
|
10
10
|
|
|
11
11
|
[tool.poetry.group.dev.dependencies]
|
|
12
|
+
# Uncomment this if you want to debug the ocean core together with your integration
|
|
13
|
+
# port_ocean = { path = '../../', develop = true, extras = ['all'] }
|
|
12
14
|
pytest = "^7.2"
|
|
15
|
+
pytest-xdist = "^3.6.1"
|
|
16
|
+
pre-commit = "^3.7.1"
|
|
17
|
+
requests = "^2.32.3"
|
|
13
18
|
black = "^23.3.0"
|
|
14
19
|
mypy = "^1.3.0"
|
|
15
20
|
ruff = "^0.0.278"
|
|
16
21
|
pylint = "^2.17.4"
|
|
17
22
|
towncrier = "^23.6.0"
|
|
18
|
-
pytest-xdist = "^3.6.1"
|
|
19
23
|
|
|
20
24
|
[tool.towncrier]
|
|
21
25
|
directory = "changelog"
|
|
@@ -54,8 +58,8 @@ underlines = [""]
|
|
|
54
58
|
showcontent = true
|
|
55
59
|
|
|
56
60
|
[build-system]
|
|
57
|
-
requires = ["poetry>=0.
|
|
58
|
-
build-backend = "poetry.masonry.api"
|
|
61
|
+
requires = ["poetry-core>=1.0.0"]
|
|
62
|
+
build-backend = "poetry.core.masonry.api"
|
|
59
63
|
|
|
60
64
|
[tool.mypy]
|
|
61
65
|
exclude = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any, Literal, Type
|
|
1
|
+
from typing import Any, Literal, Type, cast
|
|
2
2
|
|
|
3
3
|
from pydantic import Extra, AnyHttpUrl, parse_obj_as, parse_raw_as
|
|
4
4
|
from pydantic.class_validators import root_validator, validator
|
|
@@ -55,9 +55,8 @@ class IntegrationSettings(BaseOceanModel, extra=Extra.allow):
|
|
|
55
55
|
integ_type = get_integration_name()
|
|
56
56
|
|
|
57
57
|
values["type"] = integ_type.lower() if integ_type else None
|
|
58
|
-
|
|
59
|
-
"identifier"
|
|
60
|
-
)
|
|
58
|
+
if not values.get("identifier"):
|
|
59
|
+
values["identifier"] = f"my-{integ_type}-integration".lower()
|
|
61
60
|
|
|
62
61
|
return values
|
|
63
62
|
|
|
@@ -71,7 +70,9 @@ class IntegrationConfiguration(BaseOceanSettings, extra=Extra.allow):
|
|
|
71
70
|
client_timeout: int = 30
|
|
72
71
|
send_raw_data_examples: bool = True
|
|
73
72
|
port: PortSettings
|
|
74
|
-
event_listener: EventListenerSettingsType
|
|
73
|
+
event_listener: EventListenerSettingsType = Field(
|
|
74
|
+
default=cast(EventListenerSettingsType, {"type": "POLLING"})
|
|
75
|
+
)
|
|
75
76
|
# If an identifier or type is not provided, it will be generated based on the integration name
|
|
76
77
|
integration: IntegrationSettings = Field(
|
|
77
78
|
default_factory=lambda: IntegrationSettings(type="", identifier="")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "port-ocean"
|
|
3
|
-
version = "0.10.
|
|
3
|
+
version = "0.10.2"
|
|
4
4
|
description = "Port Ocean is a CLI tool for managing your Port projects."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
homepage = "https://app.getport.io"
|
|
@@ -31,8 +31,8 @@ classifiers = [
|
|
|
31
31
|
ocean = "port_ocean.cli.cli:cli_start"
|
|
32
32
|
|
|
33
33
|
[build-system]
|
|
34
|
-
requires = ["poetry-core"]
|
|
35
|
-
build-backend = "poetry.masonry.api"
|
|
34
|
+
requires = ["poetry-core>=1.0.0"]
|
|
35
|
+
build-backend = "poetry.core.masonry.api"
|
|
36
36
|
|
|
37
37
|
[tool.poetry.dependencies]
|
|
38
38
|
python = "^3.11"
|
port_ocean-0.10.0/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/spec.yaml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
description: {{cookiecutter.integration_name}} integration for Port Ocean
|
|
2
|
-
icon: Cookiecutter # Should be one of the available icons in Port
|
|
3
|
-
features:
|
|
4
|
-
- type: exporter
|
|
5
|
-
section: Git Providers # Should be one of the available sections in Port
|
|
6
|
-
resources:
|
|
7
|
-
- kind: <ResourceName1>
|
|
8
|
-
- kind: <ResourceName2>
|
|
9
|
-
configurations:
|
|
10
|
-
- name: myGitToken
|
|
11
|
-
required: true
|
|
12
|
-
type: string
|
|
13
|
-
sensitive: true
|
|
14
|
-
- name: someApplicationUrl
|
|
15
|
-
type: url
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/cli/cookiecutter/hooks/post_gen_project.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entities_state_applier/__init__.py
RENAMED
|
File without changes
|
{port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entities_state_applier/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/entity_processor/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/port_app_config/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/resync_state_updater/__init__.py
RENAMED
|
File without changes
|
{port_ocean-0.10.0 → port_ocean-0.10.2}/port_ocean/core/handlers/resync_state_updater/updater.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|