splight-cli 4.1.0.dev0__py3-none-any.whl → 4.1.0.dev2__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 splight-cli might be problematic. Click here for more details.

@@ -51,7 +51,7 @@ class ApplyExecutor:
51
51
  local_instance.save()
52
52
  remote_instance = model.retrieve(resource_id=local_instance.id)
53
53
  return ApplyResult(True, to_dict(remote_instance))
54
- return ApplyResult(False, None)
54
+ return ApplyResult(False, to_dict(local_instance))
55
55
 
56
56
  def replace_data_addr(self):
57
57
  """Replaces assets data addresses in component's routines."""
@@ -171,7 +171,7 @@ class ApplyExecutor:
171
171
  "Do you want to update the local instance?"
172
172
  )
173
173
  if update:
174
- return ApplyResult(True, remote_instance)
174
+ return ApplyResult(True, to_dict(remote_instance))
175
175
  bprint(
176
176
  f"\nYou are about to override the remote {model_name} "
177
177
  f"with your local {model_name}:"
@@ -181,12 +181,12 @@ class ApplyExecutor:
181
181
  if update:
182
182
  local_instance.save()
183
183
  return ApplyResult(True, to_dict(local_instance))
184
- return ApplyResult(False, None)
184
+ return ApplyResult(False, to_dict(local_instance))
185
185
  bprint(
186
186
  f"Nothing to update, the same {model_name} was found "
187
187
  "remotely"
188
188
  )
189
- return ApplyResult(False, None)
189
+ return ApplyResult(False, to_dict(local_instance))
190
190
  bprint(f"\nThe following {model_name} was not found remotely")
191
191
  print(local_instance)
192
192
  self._remove_ids(model_name, local_instance)
@@ -197,7 +197,7 @@ class ApplyExecutor:
197
197
  local_instance.save()
198
198
  remote_instance = model.retrieve(resource_id=local_instance.id)
199
199
  return ApplyResult(True, to_dict(remote_instance))
200
- return ApplyResult(False, None)
200
+ return ApplyResult(False, to_dict(local_instance))
201
201
 
202
202
  def _remove_ids(self, model: SplightTypes, local_instance: SplightTypes):
203
203
  """Removes ids to a given dictionary representing a particular model.
cli/solution/solution.py CHANGED
@@ -48,14 +48,14 @@ class SolutionManager:
48
48
  )
49
49
 
50
50
  def execute(self):
51
- console.print("\nStarting plan step...", style=PRINT_STYLE)
52
- self._generate_assets_state()
53
- self._generate_components_state()
54
-
55
51
  if self._apply:
56
52
  console.print("\nStarting apply step...", style=PRINT_STYLE)
57
53
  self._apply_assets_state()
58
54
  self._apply_components_state()
55
+ else:
56
+ console.print("\nStarting plan step...", style=PRINT_STYLE)
57
+ self._generate_assets_state()
58
+ self._generate_components_state()
59
59
 
60
60
  def _generate_state_from_plan(self):
61
61
  """Generates the state file if not passed."""
@@ -105,12 +105,12 @@ class SolutionManager:
105
105
  model=Component, local_instance=component
106
106
  )
107
107
  if result.update:
108
- updated_routines = self._apply_routines_state(
109
- component, Component.parse_obj(result.updated_dict)
110
- )
111
108
  components_list[i] = Component.parse_obj(result.updated_dict)
112
- components_list[i].routines = updated_routines
113
109
  save_yaml(self._state_path, self._state)
110
+ components_list[i].routines = self._apply_routines_state(
111
+ component, Component.parse_obj(result.updated_dict)
112
+ )
113
+ save_yaml(self._state_path, self._state)
114
114
 
115
115
  def _apply_routines_state(
116
116
  self, component: Component, updated_component: Component
cli/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "4.1.0.dev0"
1
+ __version__ = "4.1.0.dev2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: splight-cli
3
- Version: 4.1.0.dev0
3
+ Version: 4.1.0.dev2
4
4
  Summary: CLI tool to build and run Splight components
5
5
  Home-page: UNKNOWN
6
6
  Author: Splight
@@ -12,6 +12,7 @@ Requires-Dist: case-converter (==1.1.0)
12
12
  Requires-Dist: click-default-group (==1.2.2)
13
13
  Requires-Dist: click (==8.0.4)
14
14
  Requires-Dist: colorama (==0.4.4)
15
+ Requires-Dist: deepdiff (==6.3.1)
15
16
  Requires-Dist: packaging (==23.0)
16
17
  Requires-Dist: pathspec (==0.11.1)
17
18
  Requires-Dist: py7zr (==0.18.5)
@@ -2,7 +2,7 @@ cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  cli/cli.py,sha256=BgukRST8EW6HD6SP5Gl8hRgwNh7fWFQIAOfE9mKwOBo,1069
3
3
  cli/constants.py,sha256=ope-1uVfI3yZgNV1HdZdJBTgZE1Bq7Mnh6xYywps1B8,1577
4
4
  cli/settings.py,sha256=wNPC6RLbJzXqPNzin-sK9hjK-24J6mFbpfy27I3MeOc,653
5
- cli/version.py,sha256=UhSsUCodiTuRFFVYGXXoYLZx6uBltrkzVn1SdgxH8Pk,27
5
+ cli/version.py,sha256=_aYM-eunKzi_sRQpcwMN0dIwV7qeUX5JHmtrFwTo_iA,27
6
6
  cli/component/__init__.py,sha256=leYcpVgpJ5yEpfdPBAACXeqnlTLKaQBVH1Durd-LRBE,4538
7
7
  cli/component/component.py,sha256=UR3zzjo5y0iJ_d7JzmSmSczyxg0m7FYcTFoyJD9vGig,8289
8
8
  cli/component/exceptions.py,sha256=936K_NhkvvdpKWeQrY80CFn2eMi2BUSw324vCJvM9Mo,1521
@@ -38,10 +38,10 @@ cli/hub/component/__init__.py,sha256=m7y73pD5QHDul24zJLcNKWQ_ZqSU3nE2PJmaGkwrO2Q
38
38
  cli/hub/component/exceptions.py,sha256=DCrGkGk3OxhajYbt5O96qfEplKbXAQxvUkIR6erBU1E,1264
39
39
  cli/hub/component/hub_manager.py,sha256=494oI76XN6E6u8-cBgrlW2OumcfeeYWLCx6wJLBq8aw,4614
40
40
  cli/solution/__init__.py,sha256=DieGf7zxL8H_Vg2XoKSiwFLSeJrbF3R4BsDBtF_uSu0,1488
41
- cli/solution/apply_exec.py,sha256=f93Wh4qlHWGkMdHG0GKnjHxiGSHQOH4fSC9xJNru1I0,7499
41
+ cli/solution/apply_exec.py,sha256=3XoK_Dn7qmf4fgNxWtbJcEU9BDOG7O4fZxRjVuuEoY4,7584
42
42
  cli/solution/models.py,sha256=FEpcGw6R5OTkElSbvrCEnwWOj2fiG5R6EkH4V9qSoX8,1224
43
43
  cli/solution/plan_exec.py,sha256=jmslF6EqbllX38Z_qWoWsGaDQrw01EblrO60HUnalzg,5051
44
- cli/solution/solution.py,sha256=Dv7Tt6VdCu0v7hTLTkS4Ml-9u8gFfT07whRXI3gLy-c,4677
44
+ cli/solution/solution.py,sha256=Z4XWf8-XIzsnWcT3WEwXJYTN0Dhl512qZkaaHhYB_A0,4691
45
45
  cli/solution/utils.py,sha256=2phat3fT3cYnDxsex83x1OunSWSZXfHcgbva70VKeKQ,3853
46
46
  cli/utils/__init__.py,sha256=lZg1_NuB7SC5YZvt_jfwgY67OBD-Uj-nD7-c6FrnkKM,299
47
47
  cli/utils/input.py,sha256=lDNUtrWEtJGjLLCIfGA3M_8KCBRw8M4gTj4ndyKnhb8,2692
@@ -51,8 +51,8 @@ cli/utils/pprint.py,sha256=q2-UizF_Zq4etoJnZKr9XUNL4Nsu6jbY_bn-QpGr8z8,1079
51
51
  cli/utils/template.py,sha256=D6YgaT-7OxOvLdS8TT33hlT0Qe9NAPE1t5_QQiQZniM,436
52
52
  cli/utils/yaml.py,sha256=jhNdQa_ExlSaXsPnlfLKKMOKbF1fJLpx0o264AdCNrg,754
53
53
  cli/workspace/__init__.py,sha256=oQfZtfGIAQckbnuY74nXbfdqIij3h2g3lomtKh6D8v8,2831
54
- splight_cli-4.1.0.dev0.dist-info/METADATA,sha256=8EQo5mixKFGMkxrgPsyZryUdfCSIPC4zYujdvAbbiHc,1290
55
- splight_cli-4.1.0.dev0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
56
- splight_cli-4.1.0.dev0.dist-info/entry_points.txt,sha256=IDM6zGhinztZLBDM4bx17B1Bw7Ruo2_yzEa91Fe8i2Y,41
57
- splight_cli-4.1.0.dev0.dist-info/top_level.txt,sha256=HmpDxSFAbd4V_5A36MKSqpOO_JlkyBLYDfR8F8Vjp7E,12
58
- splight_cli-4.1.0.dev0.dist-info/RECORD,,
54
+ splight_cli-4.1.0.dev2.dist-info/METADATA,sha256=AZOC8cXgVWGGUHRYCcJgrr87jNi3YO1Fg-jI0o5wK7k,1324
55
+ splight_cli-4.1.0.dev2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
56
+ splight_cli-4.1.0.dev2.dist-info/entry_points.txt,sha256=IDM6zGhinztZLBDM4bx17B1Bw7Ruo2_yzEa91Fe8i2Y,41
57
+ splight_cli-4.1.0.dev2.dist-info/top_level.txt,sha256=HmpDxSFAbd4V_5A36MKSqpOO_JlkyBLYDfR8F8Vjp7E,12
58
+ splight_cli-4.1.0.dev2.dist-info/RECORD,,