port-ocean 0.1.3rc2__tar.gz → 0.1.3rc4__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.1.3rc2 → port_ocean-0.1.3rc4}/PKG-INFO +1 -1
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/config/base.py +6 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/config/dynamic.py +21 -2
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/pyproject.toml +1 -1
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/LICENSE +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/README.md +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cli.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/list_integrations.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/main.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/new.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/pull.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/sail.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/version.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/cookiecutter.json +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.dockerignore +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.gitignore +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/.gitignore +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/spec.yaml +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/CHANGELOG.md +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/Dockerfile +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/Makefile +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/README.md +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/changelog/.gitignore +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/config.yaml +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/debug.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/main.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/poetry.toml +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/pyproject.toml +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/utils.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/authentication.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/client.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/mixins/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/mixins/blueprints.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/mixins/entities.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/mixins/integrations.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/types.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/utils.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/config/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/config/settings.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/consumers/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/consumers/base_consumer.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/consumers/kafka_consumer.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/context/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/context/event.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/context/ocean.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/base.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/base.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/factory.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/http/event_listener.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/kafka/event_listener.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/polling/event_listener.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/polling/utils.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/base.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/port/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/port/applier.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/port/get_related_entities.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/port/order_by_entities_dependencies.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/port/validate_entity_relations.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entity_processor/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entity_processor/base.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entity_processor/jq_entity_processor.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/api.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/base.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/models.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/base.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/events.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/handler.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/sync.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/utils.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/models.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/ocean_types.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/utils.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/__init__.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/api.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/base.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/clients.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/context.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/core.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/port_defaults.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/logger_setup.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/middlewares.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/ocean.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/port_defaults.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/py.typed +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/run.py +0 -0
- {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/utils.py +0 -0
|
@@ -62,6 +62,9 @@ def decamelize_object(obj: Any) -> Any:
|
|
|
62
62
|
def parse_config(
|
|
63
63
|
config: dict[str, Any], existing_data: dict[str, Any]
|
|
64
64
|
) -> dict[str, Any]:
|
|
65
|
+
"""
|
|
66
|
+
Normalizing the config yaml file to work with snake_case and getting only the data that is missing for the settings
|
|
67
|
+
"""
|
|
65
68
|
for key, value in config.items():
|
|
66
69
|
decamelize_key = decamelize(key)
|
|
67
70
|
if isinstance(value, dict):
|
|
@@ -69,7 +72,10 @@ def parse_config(
|
|
|
69
72
|
value, existing_data.get(decamelize_key, {})
|
|
70
73
|
)
|
|
71
74
|
elif isinstance(value, str):
|
|
75
|
+
# If the value is a provider, we try to load it from the provider
|
|
72
76
|
if provider_match := re.match(PROVIDER_WRAPPER_PATTERN, value):
|
|
77
|
+
# If the there is already value for that field, we ignore it
|
|
78
|
+
# If the provider failed to load, we ignore it
|
|
73
79
|
if decamelize_key not in existing_data:
|
|
74
80
|
try:
|
|
75
81
|
existing_data[decamelize_key] = load_from_config_provider(
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import json
|
|
1
2
|
from typing import Type, Any, Optional
|
|
2
3
|
|
|
3
4
|
from humps import decamelize
|
|
4
|
-
from pydantic import BaseModel, AnyUrl, create_model, Extra, parse_obj_as
|
|
5
|
+
from pydantic import BaseModel, AnyUrl, create_model, Extra, parse_obj_as, validator
|
|
6
|
+
from pydantic.fields import ModelField
|
|
5
7
|
|
|
6
8
|
|
|
7
9
|
class Configuration(BaseModel, extra=Extra.allow):
|
|
@@ -11,6 +13,18 @@ class Configuration(BaseModel, extra=Extra.allow):
|
|
|
11
13
|
default: Optional[Any]
|
|
12
14
|
|
|
13
15
|
|
|
16
|
+
def dynamic_parse(value: Any, field: ModelField) -> Any:
|
|
17
|
+
should_json_load = issubclass(field.annotation, dict) or issubclass(
|
|
18
|
+
field.annotation, list
|
|
19
|
+
)
|
|
20
|
+
if isinstance(value, str) and should_json_load:
|
|
21
|
+
try:
|
|
22
|
+
return json.loads(value)
|
|
23
|
+
except json.JSONDecodeError:
|
|
24
|
+
pass
|
|
25
|
+
return value
|
|
26
|
+
|
|
27
|
+
|
|
14
28
|
def default_config_factory(configurations: Any) -> Type[BaseModel]:
|
|
15
29
|
configurations = parse_obj_as(list[Configuration], configurations)
|
|
16
30
|
fields: dict[str, tuple[Any, Any]] = {}
|
|
@@ -40,4 +54,9 @@ def default_config_factory(configurations: Any) -> Type[BaseModel]:
|
|
|
40
54
|
default,
|
|
41
55
|
)
|
|
42
56
|
|
|
43
|
-
|
|
57
|
+
dynamic_model = create_model( # type: ignore
|
|
58
|
+
__model_name="Config",
|
|
59
|
+
**fields,
|
|
60
|
+
__validators__={"dynamic_parse": validator("*", pre=True)(dynamic_parse)},
|
|
61
|
+
)
|
|
62
|
+
return dynamic_model
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/http/event_listener.py
RENAMED
|
File without changes
|
{port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/kafka/event_listener.py
RENAMED
|
File without changes
|
{port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/polling/event_listener.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/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
|
|
File without changes
|
{port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entity_processor/__init__.py
RENAMED
|
File without changes
|
{port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entity_processor/base.py
RENAMED
|
File without changes
|
|
File without changes
|
{port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/base.py
RENAMED
|
File without changes
|
{port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/models.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
|