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.

Files changed (99) hide show
  1. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/PKG-INFO +1 -1
  2. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/config/base.py +6 -0
  3. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/config/dynamic.py +21 -2
  4. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/pyproject.toml +1 -1
  5. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/LICENSE +0 -0
  6. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/README.md +0 -0
  7. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/__init__.py +0 -0
  8. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/__init__.py +0 -0
  9. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cli.py +0 -0
  10. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/__init__.py +0 -0
  11. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/list_integrations.py +0 -0
  12. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/main.py +0 -0
  13. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/new.py +0 -0
  14. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/pull.py +0 -0
  15. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/sail.py +0 -0
  16. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/commands/version.py +0 -0
  17. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/cookiecutter.json +0 -0
  18. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.dockerignore +0 -0
  19. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.gitignore +0 -0
  20. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/.gitignore +0 -0
  21. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/spec.yaml +0 -0
  22. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/CHANGELOG.md +0 -0
  23. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/Dockerfile +0 -0
  24. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/Makefile +0 -0
  25. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/README.md +0 -0
  26. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/changelog/.gitignore +0 -0
  27. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/config.yaml +0 -0
  28. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/debug.py +0 -0
  29. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/main.py +0 -0
  30. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/poetry.toml +0 -0
  31. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/pyproject.toml +0 -0
  32. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/__init__.py +0 -0
  33. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/cli/utils.py +0 -0
  34. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/__init__.py +0 -0
  35. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/__init__.py +0 -0
  36. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/authentication.py +0 -0
  37. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/client.py +0 -0
  38. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/mixins/__init__.py +0 -0
  39. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/mixins/blueprints.py +0 -0
  40. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/mixins/entities.py +0 -0
  41. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/mixins/integrations.py +0 -0
  42. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/types.py +0 -0
  43. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/clients/port/utils.py +0 -0
  44. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/config/__init__.py +0 -0
  45. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/config/settings.py +0 -0
  46. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/consumers/__init__.py +0 -0
  47. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/consumers/base_consumer.py +0 -0
  48. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/consumers/kafka_consumer.py +0 -0
  49. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/context/__init__.py +0 -0
  50. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/context/event.py +0 -0
  51. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/context/ocean.py +0 -0
  52. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/__init__.py +0 -0
  53. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/base.py +0 -0
  54. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/__init__.py +0 -0
  55. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/base.py +0 -0
  56. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/factory.py +0 -0
  57. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/http/event_listener.py +0 -0
  58. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/kafka/event_listener.py +0 -0
  59. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/polling/event_listener.py +0 -0
  60. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/event_listener/polling/utils.py +0 -0
  61. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/__init__.py +0 -0
  62. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/__init__.py +0 -0
  63. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/base.py +0 -0
  64. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/port/__init__.py +0 -0
  65. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/port/applier.py +0 -0
  66. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/port/get_related_entities.py +0 -0
  67. {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
  68. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entities_state_applier/port/validate_entity_relations.py +0 -0
  69. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entity_processor/__init__.py +0 -0
  70. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entity_processor/base.py +0 -0
  71. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/entity_processor/jq_entity_processor.py +0 -0
  72. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/__init__.py +0 -0
  73. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/api.py +0 -0
  74. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/base.py +0 -0
  75. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/handlers/port_app_config/models.py +0 -0
  76. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/__init__.py +0 -0
  77. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/base.py +0 -0
  78. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/__init__.py +0 -0
  79. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/events.py +0 -0
  80. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/handler.py +0 -0
  81. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/sync.py +0 -0
  82. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/integrations/mixins/utils.py +0 -0
  83. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/models.py +0 -0
  84. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/ocean_types.py +0 -0
  85. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/core/utils.py +0 -0
  86. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/__init__.py +0 -0
  87. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/api.py +0 -0
  88. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/base.py +0 -0
  89. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/clients.py +0 -0
  90. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/context.py +0 -0
  91. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/core.py +0 -0
  92. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/exceptions/port_defaults.py +0 -0
  93. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/logger_setup.py +0 -0
  94. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/middlewares.py +0 -0
  95. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/ocean.py +0 -0
  96. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/port_defaults.py +0 -0
  97. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/py.typed +0 -0
  98. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/run.py +0 -0
  99. {port_ocean-0.1.3rc2 → port_ocean-0.1.3rc4}/port_ocean/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.1.3rc2
3
+ Version: 0.1.3rc4
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
@@ -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
- return create_model("Config", **fields) # type: ignore
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "port-ocean"
3
- version = "0.1.3rc2"
3
+ version = "0.1.3rc4"
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"
File without changes
File without changes