zepben.ewb 1.0.0b8__py3-none-any.whl → 1.0.0b9__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.
@@ -413,9 +413,7 @@ class NetworkTrace(Traversal[NetworkTraceStep[T], 'NetworkTrace[T]'], Generic[T]
413
413
  return self._tracker.visit(terminal, phases)
414
414
 
415
415
 
416
- def default_condition_step_type(step_type: CanActionItem):
417
- if step_type is None:
418
- return False
416
+ def default_condition_step_type(step_type: CanActionItem) -> NetworkTraceStep.Type:
419
417
  if step_type == NetworkTraceActionType.ALL_STEPS:
420
418
  return NetworkTraceStep.Type.ALL
421
419
  elif step_type == NetworkTraceActionType.FIRST_STEP_ON_EQUIPMENT:
@@ -432,19 +430,4 @@ def compute_data_with_action_type(compute_data: ComputeData[T], action_type: Can
432
430
  current_step.data if next_path.traced_internally else compute_data.compute_next(current_step, current_context, next_path)
433
431
  )
434
432
  )
435
- raise Exception(f'{action_type.__class__}: step doesnt match expected types')
436
-
437
-
438
- def with_paths_with_action_type(self, action_type: NetworkTraceActionType) -> ComputeDataWithPaths[T]:
439
- if action_type == NetworkTraceActionType.ALL_STEPS:
440
- return self
441
- elif action_type == NetworkTraceActionType.FIRST_STEP_ON_EQUIPMENT:
442
- return ComputeDataWithPaths(
443
- lambda current_step, current_context, next_path, next_paths: (
444
- current_step.data if next_path.traced_internally else self.compute_next(current_step, current_context, next_path, next_paths)
445
- )
446
- )
447
- raise Exception('step doesnt match expected types')
448
-
449
-
450
- ComputeDataWithPaths[T].with_action_type = with_paths_with_action_type
433
+ raise Exception(f'{action_type.__name__}: step doesnt match expected types')
@@ -2,14 +2,14 @@
2
2
  # This Source Code Form is subject to the terms of the Mozilla Public
3
3
  # License, v. 2.0. If a copy of the MPL was not distributed with this
4
4
  # file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
- from typing import Callable, Set, Any
5
+ from typing import Callable, FrozenSet, Any
6
6
  from enum import Enum
7
7
 
8
8
  from zepben.ewb import Terminal, SinglePhaseKind
9
9
  from zepben.ewb.services.network.tracing.networktrace.network_trace_step import NetworkTraceStep
10
10
  from zepben.ewb.services.network.tracing.traversal.step_context import StepContext
11
11
 
12
- HasTracked = Callable[[Terminal, Set[SinglePhaseKind]], bool]
12
+ HasTracked = Callable[[Terminal, FrozenSet[SinglePhaseKind]], bool]
13
13
  CanActionItem = Callable[[NetworkTraceStep[Any], StepContext, HasTracked], bool]
14
14
 
15
15
 
@@ -95,7 +95,10 @@ class NetworkTraceStep(Generic[T]):
95
95
  def next_num_equipment_steps(self, current_num: int) -> int:
96
96
  return current_num + 1 if self.traced_externally else current_num
97
97
 
98
- Type = Enum('Type', ('ALL', 'INTERNAL', 'EXTERNAL'))
98
+ class Type(Enum):
99
+ ALL = 'ALL'
100
+ INTERNAL = 'INTERNAL'
101
+ EXTERNAL = 'EXTERNAL'
99
102
 
100
103
  def __init__(self, path: Path, num_terminal_steps: int, num_equipment_steps: int, data: T):
101
104
  self.path = path
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zepben.ewb
3
- Version: 1.0.0b8
3
+ Version: 1.0.0b9
4
4
  Summary: Python SDK for interacting with the Energy Workbench platform
5
5
  Author-email: Kurt Greaves <kurt.greaves@zepben.com>, Max Chesterfield <max.chesterfield@zepben.com>
6
6
  License-Expression: MPL-2.0
@@ -562,10 +562,10 @@ zepben/ewb/services/network/tracing/feeder/feeder_direction.py,sha256=Xdwneh6Gyj
562
562
  zepben/ewb/services/network/tracing/feeder/set_direction.py,sha256=C83E2-9m--zSL4X1KAH6ObLG5N-nGtUN1ZQEV2zcuss,7233
563
563
  zepben/ewb/services/network/tracing/networktrace/__init__.py,sha256=8-znO960twGtcAGArLGl_ijbCB9BBv0_hUNYf1eF0Lk,243
564
564
  zepben/ewb/services/network/tracing/networktrace/compute_data.py,sha256=u26vBTK-X0ePibK-z2faB2PABj9AMCj5igNmcquNPrs,2661
565
- zepben/ewb/services/network/tracing/networktrace/network_trace.py,sha256=oiEVcfMF9DNgSEUQ1tKvxDR7c-S3rk-zALms45ANB1k,23141
566
- zepben/ewb/services/network/tracing/networktrace/network_trace_action_type.py,sha256=OCq_NrfaPsdLwac_mz_0LvY5rpr5jVQMqtw4RUEM69k,1844
565
+ zepben/ewb/services/network/tracing/networktrace/network_trace.py,sha256=VZVakaEsbiwsSPmwiKncojSl3E7-7UMPTiTxjfIfvZQ,22458
566
+ zepben/ewb/services/network/tracing/networktrace/network_trace_action_type.py,sha256=VBmt3Qm4TZV_3Cmgp_M26nZlNz1AZZ0dF9-u86AEmuw,1856
567
567
  zepben/ewb/services/network/tracing/networktrace/network_trace_queue_next.py,sha256=XK4JMOw8x9NPWuA0CZwnWnefDQ0Jvz54RtHqoNDYBms,4410
568
- zepben/ewb/services/network/tracing/networktrace/network_trace_step.py,sha256=1q-sOV0dVbPAR0goRwSF3WLVYPNHgKUwlnppyYgjrYw,5919
568
+ zepben/ewb/services/network/tracing/networktrace/network_trace_step.py,sha256=UhMk62LgWvQQtGbWmUQjDi7hj5NQrLFNvYfo2BEcIcc,5964
569
569
  zepben/ewb/services/network/tracing/networktrace/network_trace_step_path_provider.py,sha256=llDYE8UrmP96b5oc2-zk4qv2dx0SOl5RrVP3pX-rx78,17093
570
570
  zepben/ewb/services/network/tracing/networktrace/network_trace_tracker.py,sha256=EZAwZ9aSuKrykxKCHmNQHhDE-1LjvhwT-pGy6EScv0s,1521
571
571
  zepben/ewb/services/network/tracing/networktrace/tracing.py,sha256=gsgR_wWOqcZNGbHBYg7h8aqzi2BlSF6AqBPHIYxSN-I,6836
@@ -634,8 +634,8 @@ zepben/ewb/streaming/mutations/update_network_state_client.py,sha256=e0Oma5PRT8m
634
634
  zepben/ewb/streaming/mutations/update_network_state_service.py,sha256=irR-TO67QXRyBmK8PU8SzM31NKSSefZt_nQGHi5IhT8,3260
635
635
  zepben/ewb/testing/__init__.py,sha256=waADXEvfUG9wAN4STx5uIUHOv0UnpZLH2qU1LXgaDBc,243
636
636
  zepben/ewb/testing/test_network_builder.py,sha256=KG0o2ZHUswx3xClu-JnLs_pYIYbQ5jjtvtyZ7LI6IZ8,38092
637
- zepben_ewb-1.0.0b8.dist-info/licenses/LICENSE,sha256=aAHD66h6PQIETpkJDvg5yEObyFvXUED8u7S8dlh6K0Y,16725
638
- zepben_ewb-1.0.0b8.dist-info/METADATA,sha256=qRyKHwO8p3JuW5aHqreKOWlsaIl1EfAAuxBark4wPp4,3300
639
- zepben_ewb-1.0.0b8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
640
- zepben_ewb-1.0.0b8.dist-info/top_level.txt,sha256=eVLDJiO6FGjL_Z7KdmFE-R8uf1Q07aaVLGe9Ee4kmBw,7
641
- zepben_ewb-1.0.0b8.dist-info/RECORD,,
637
+ zepben_ewb-1.0.0b9.dist-info/licenses/LICENSE,sha256=aAHD66h6PQIETpkJDvg5yEObyFvXUED8u7S8dlh6K0Y,16725
638
+ zepben_ewb-1.0.0b9.dist-info/METADATA,sha256=yMCVU-LTNqFidSkyWxmDOgVYYFnXNzamz2jvVCx-ieQ,3300
639
+ zepben_ewb-1.0.0b9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
640
+ zepben_ewb-1.0.0b9.dist-info/top_level.txt,sha256=eVLDJiO6FGjL_Z7KdmFE-R8uf1Q07aaVLGe9Ee4kmBw,7
641
+ zepben_ewb-1.0.0b9.dist-info/RECORD,,